Skip to content
Snippets Groups Projects

WIP: Ikerperez/add gerrit

Closed Iker Sustatxa requested to merge ikerperez/add-gerrit into master

Here is included a gerrit deployment in zuul to complement the components included in !12 (merged)

#9

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Iker Sustatxa restored source branch ikerperez/add-gerrit

    restored source branch ikerperez/add-gerrit

  • Iker Sustatxa added 6 commits

    added 6 commits

    • bdd3fe49 - Create gerrit deployment
    • 64c06dff - Add entrypoint configmap
    • 5990bd4a - Add comments about gerrit
    • a9a606a4 - Add ssh-kys secret generator script
    • c9db042b - etc_zuul.yaml: Fix zuul.conf gerrit connection values
    • 708691e1 - zuul-scheduler.yaml: Include Gerrit and Zuul ssh keys

    Compare with previous version

  • Iker Sustatxa added 7 commits

    added 7 commits

    • d646c1f2 - Include README
    • 7a8497b1 - Create gerrit deployment
    • 6544d203 - Add entrypoint configmap
    • 5df18b07 - Add comments about gerrit
    • 653d026e - Add ssh-kys secret generator script
    • c1fc5041 - etc_zuul.yaml: Fix zuul.conf gerrit connection values
    • 96c00a0e - zuul-scheduler.yaml: Include Gerrit and Zuul ssh keys

    Compare with previous version

  • Iker Sustatxa added 17 commits

    added 17 commits

    • 96c00a0e...19ced783 - 10 commits from branch master
    • d3e7b388 - Create gerrit deployment
    • 65266000 - Add entrypoint configmap
    • dc2949fb - Add comments about gerrit
    • 98190f12 - Add ssh-kys secret generator script
    • e00f5ef9 - etc_zuul.yaml: Fix zuul.conf gerrit connection values
    • 109d68ee - zuul-scheduler.yaml: Include Gerrit and Zuul ssh keys
    • a3c99996 - PLAYBOOKS: Change gerrit to gerrit-service

    Compare with previous version

  • Iker Sustatxa added 2 commits

    added 2 commits

    • c6597131 - PLAYBOOKS: Change gerrit to gerrit-service and eliminate ssh-keys
    • 2ecefb41 - Create job to launch gerrit configuration script

    Compare with previous version

  • added Blocked label

  • Author Maintainer

    I will stop working on this for the meantime. I have been suggested to join the RE work and come back here once the job is done. I will try to summarize here what has been done here, what was I doing now and what remains to be done:

    Done

    • Created a gerrit pod and service.
    • I modified the entrypoint.sh file that is stored in / in the gerrit container, to include specific configuration needed for zuul. This config lines were taken from commands executed in the gerrit container in the docker-compose example in the zuul project [0]. Then I created a configmap called gerrit-entrypoint (k8s) and entrypoint.yaml (file) from the file refered before and I mounted it in/var/entrypoint``` in the container. Finally, I have overwritten the container default entrypoint to mine by including a command in the pod definition.
    • Include some notes in the README, this should be extended.
    • Create a scrip secret-gen.sh that creates ssh keys for gerrit admin and zuul user and creates secrets from them.
    • Mount ssh keys secrets on the scheduller.
    • Change server name from gerrit to gerrit-service in the playboks.yaml file.
    • Some minor fixups in etc_zuul.
    • Create a job to configure gerrit. This is what I was working now, I will continue explaining this in the next section.

    Doing

    In order to connect the scheduler and the executor with gerrit, gerrit needs to have a zuul user. The error is noticeable when the scheduler tries to get the gerrit version, if it is successful it will just display the gerrit version, if not , it will display a nasty json file.

    Successful one:

     cheduler_1     | 2020-02-12T10:09:50+00:00 Wait for mysql to start
     scheduler_1     | /var/playbooks/wait-to-start.sh: connect: Connection refused
     scheduler_1     | /var/playbooks/wait-to-start.sh: line 9: /dev/tcp/mysql/3306: Connection refused
     scheduler_1     | /var/playbooks/wait-to-start.sh: connect: Connection refused
     scheduler_1     | /var/playbooks/wait-to-start.sh: line 9: /dev/tcp/mysql/3306: Connection refused
     scheduler_1     | /var/playbooks/wait-to-start.sh: connect: Connection refused
     scheduler_1     | /var/playbooks/wait-to-start.sh: line 9: /dev/tcp/mysql/3306: Connection refused
     scheduler_1     | /var/playbooks/wait-to-start.sh: connect: Connection refused
     scheduler_1     | /var/playbooks/wait-to-start.sh: line 9: /dev/tcp/mysql/3306: Connection refused
     scheduler_1     | /var/playbooks/wait-to-start.sh: connect: Connection refused
     scheduler_1     | /var/playbooks/wait-to-start.sh: line 9: /dev/tcp/mysql/3306: Connection refused
     scheduler_1     | 2020-02-12T10:09:55+00:00 Wait for zuul user to be created
     scheduler_1     | 2020-02-12 10:10:32,033 DEBUG zuul.Scheduler: Configured logging: 3.16.1.dev7
     scheduler_1     | 2020-02-12 10:10:32,033 DEBUG zuul.Gearman_Server: Configured logging: 3.16.1.dev7
     scheduler_1     | 2020-02-12 10:10:32,037 DEBUG zuul.MergeClient: Connecting to gearman at scheduler:4730
     scheduler_1     | 2020-02-12 10:10:32,038 DEBUG zuul.MergeClient: Waiting for gearman
     scheduler_1     | 2020-02-12 10:10:32,044 DEBUG zuul.zk.ZooKeeper: ZooKeeper connection: CONNECTED
     scheduler_1     | 2020-02-12 10:10:32,122 INFO zuul.Scheduler: Starting scheduler
     scheduler_1     | 2020-02-12 10:10:32,122 DEBUG zuul.Scheduler: Statsd not configured
     scheduler_1     | 2020-02-12 10:10:32,122 DEBUG zuul.Scheduler: Starting command processor
     scheduler_1     | 2020-02-12 10:10:32,122 DEBUG zuul.Scheduler: Run handler sleeping
     scheduler_1     | 2020-02-12 10:10:32,123 DEBUG zuul.RPCListener: Connect to gearman
     scheduler_1     | 2020-02-12 10:10:32,123 DEBUG zuul.RPCListener: Waiting for server
     scheduler_1     | 2020-02-12 10:10:32,124 DEBUG zuul.RPCListener: Registering
     scheduler_1     | 2020-02-12 10:10:32,125 DEBUG zuul.GerritConnection: Starting Gerrit Connection/Watchers
     scheduler_1     | 2020-02-12 10:10:32,125 DEBUG zuul.GerritConnection: GET: http://gerrit:8080/a/config/server/version
     scheduler_1     | 2020-02-12 10:10:32,141 DEBUG zuul.GerritConnection: Received: 200 )]}'
     scheduler_1     | "3.1.2"
     scheduler_1     | 
     scheduler_1     | 2020-02-12 10:10:32,141 INFO zuul.GerritConnection: Remote version is: 3.1.2 (parsed as (3, 1, 2))

    Failed one:

     -12 16:45:38,117 DEBUG zuul.Scheduler: Configured logging: 3.16.1.dev7
     2020-02-12 16:45:38,117 DEBUG zuul.Gearman_Server: Configured logging: 3.16.1.dev7
     2020-02-12 16:45:38,122 DEBUG zuul.MergeClient: Connecting to gearman at zuul-scheduler-service:4730
     2020-02-12 16:45:38,123 DEBUG zuul.MergeClient: Waiting for gearman
     2020-02-12 16:45:38,130 DEBUG zuul.zk.ZooKeeper: ZooKeeper connection: CONNECTED
     2020-02-12 16:45:38,176 INFO zuul.Scheduler: Starting scheduler
     2020-02-12 16:45:38,176 DEBUG zuul.Scheduler: Statsd not configured
     2020-02-12 16:45:38,176 DEBUG zuul.Scheduler: Starting command processor
     2020-02-12 16:45:38,177 DEBUG zuul.Scheduler: Run handler sleeping
     2020-02-12 16:45:38,177 DEBUG zuul.RPCListener: Connect to gearman
     2020-02-12 16:45:38,177 DEBUG zuul.RPCListener: Waiting for server
     2020-02-12 16:45:38,178 DEBUG zuul.RPCListener: Registering
     2020-02-12 16:45:38,179 DEBUG zuul.GerritConnection: Starting Gerrit Connection/Watchers
     2020-02-12 16:45:38,179 DEBUG zuul.GerritConnection: GET: http://gerrit-service:8080/a/config/server/version
     2020-02-12 16:45:38,411 DEBUG zuul.GerritConnection: Received: 200 
     <!DOCTYPE html>
     <html lang="en">
     <head>
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
     <meta name="description" content="Gerrit Plugin Manager">
     <meta name="author" content="Gerrit Code Review">
     <link rel="icon" href="/favicon.ico">
     
     <title>Gerrit Plugin Manager - Introduction</title>
     
     <!-- Bootstrap core CSS -->
     <link
       href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"
       rel="stylesheet"
       integrity="sha256-MfvZlkHCEqatNoGiOXveE8FIwMzZg4W85qfrfIFBfYc= sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ=="
       crossorigin="anonymous">
     <link href="css/style.css" rel="stylesheet">
     
     <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
     <link href="css/ie10-viewport-bug-workaround.css" rel="stylesheet">
     
     <!-- Custom styles for this template -->
     <link href="css/jumbotron.css" rel="stylesheet">
     
     <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
     <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
     <script src="js/ie-emulation-modes-warning.js"></script>
     
     <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
     <!--[if lt IE 9]>
           <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
           <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
         <![endif]-->
     </head>
     
     <body>
     
       <nav class="navbar navbar-inverse navbar-fixed-top">
         <div class="container">
           <div class="navbar-header">
             <button type="button" class="navbar-toggle collapsed"
               data-toggle="collapse" data-target="#navbar"
               aria-expanded="false" aria-controls="navbar">
               <span class="sr-only">Toggle navigation</span> <span
                 class="icon-bar"></span> <span class="icon-bar"></span> <span
                 class="icon-bar"></span>
             </button>
             <a class="navbar-brand" href="../../../">&raquo; Skip intro</a>
           </div>
         </div>
       </nav>
     
       <!-- Main jumbotron for a primary marketing message or call to action -->
       <div class="jumbotron">
         <div class="container">
           <h1>Welcome!</h1>
           <p><b><a href="https://www.gerritcodereview.com" target="_blank">Gerrit Code Review</a></b> provides web-based code review and repository
             management for the Git version control system.</p>
           <p>
             Before starting using it, you may want to consider <strong>installing
               some extra plugins</strong> to extend its functionality, including <i>replication
               to remote locations</i>, integration with <i>Atlassian Jira</i>
             and other issue trackers workflow, <i>OAuth 2.0
               authentication</i> with external providers such as <i>Google
               Account</i>, <i>GitHub</i> and <i>GitLab</i> and many others.
           </p>
           <p>
           <p>
             Once you're done with your plugins selection, click on the
             top-right <strong>"&gt; Go to Gerrit"</strong> link on the
             top-right corner to access the Gerrit Code Review main screen.
           </p>
           <a class="btn btn-primary btn-lg" href="index.html" role="button">Install
             plugins &raquo;</a>
           </p>
         </div>
       </div>
     
       <div class="container">
         <!-- Example row of columns -->
         <div class="row">
           <div class="col-md-4">
             <h2><span class="glyphicon glyphicon-film" aria-hidden="true"></span>&nbsp;Learn more</h2>
             <p>Before starting using Gerrit Code Review, you may want to
               spend a few minutes learning the basic concepts and how its
               workflow works.</p>
             <p>Get information from the source, with an introduction
               video starring Shawn Pearce, the Gerrit Code Review project
               founder, at the EclipseCon 2013.</p>
             <p>
               <a class="btn btn-default"
                 href="https://www.youtube.com/watch?v=Wxx8XndqZ7A&t=15s"
                 target="_blank" role="button">Watch Video &raquo;</a>
             </p>
           </div>
           <div class="col-md-4">
             <h2><span class="glyphicon glyphicon-envelope" aria-hidden="true"></span>&nbsp;Get involved</h2>
             <p>Gerrit Code Review is backed by a thriving Community of
               users and contributors. The main channel to get in touch is
               through the "repo-discuss" mailing list.</p>
             <p>Join the discussions and feel free to ask questions.
               Share your thoughts on how to improve Gerrit workflow and user
               experience.
             <p>
               <a class="btn btn-default"
                 href="https://groups.google.com/forum/#!forum/repo-discuss"
                 target="_blank" role="button">Repo-discuss mailing list
                 &raquo;</a>
             </p>
           </div>
           <div class="col-md-4">
             <h2><span class="glyphicon glyphicon-thumbs-up" aria-hidden="true"></span>&nbsp;Keep in touch</h2>
             <p>
               Get the latest news about Gerrit Code Review releases and
               events by following the official social network channels of
               the project, including <a
                 href="https://plus.google.com/communities/111271594706618791655"
                 target="_blank">Google+</a> and <a
                 href="https://twitter.com/gerritreview">Twitter</a>.
             </p>
             <p>Follow Gerrit and tweet about your experience to share
               your thoughts and achievements with your daily code reviews.
             <p>
               <a href="https://twitter.com/gerritreview"
                 class="twitter-follow-button" data-show-count="false">Follow
                 @gerritreview</a>
               <script async src="//platform.twitter.com/widgets.js"
                 charset="utf-8"></script>
             </p>
           </div>
         </div>
     
         <hr>
     
         <footer>
           <p><a href="https://www.gerritcodereview.com" href="_blank">Gerrit Code Review</a> - Copyright &copy; 2018 The Android Open Source Project -
             Licensed under the Apache License, Version 2.0.</p>
         </footer>
       </div>
       <!-- /container -->
     </body>
     </html>
     
     2020-02-12 16:45:38,412 ERROR zuul.GerritConnection: Unable to parse result 
     <!DOCTYPE html>
     <html lang="en">
     <head>
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
     <meta name="description" content="Gerrit Plugin Manager">
     <meta name="author" content="Gerrit Code Review">
     <link rel="icon" href="/favicon.ico">
     
     <title>Gerrit Plugin Manager - Introduction</title>
     
     <!-- Bootstrap core CSS -->
     <link
       href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"
       rel="stylesheet"
       integrity="sha256-MfvZlkHCEqatNoGiOXveE8FIwMzZg4W85qfrfIFBfYc= sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ=="
       crossorigin="anonymous">
     <link href="css/style.css" rel="stylesheet">
     
     <!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
     <link href="css/ie10-viewport-bug-workaround.css" rel="stylesheet">
     
     <!-- Custom styles for this template -->
     <link href="css/jumbotron.css" rel="stylesheet">
     
     <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
     <!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
     <script src="js/ie-emulation-modes-warning.js"></script>
     
     <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
     <!--[if lt IE 9]>
           <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
           <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
         <![endif]-->
     </head>
     
     <body>
     
       <nav class="navbar navbar-inverse navbar-fixed-top">
         <div class="container">
           <div class="navbar-header">
             <button type="button" class="navbar-toggle collapsed"
               data-toggle="collapse" data-target="#navbar"
               aria-expanded="false" aria-controls="navbar">
               <span class="sr-only">Toggle navigation</span> <span
                 class="icon-bar"></span> <span class="icon-bar"></span> <span
                 class="icon-bar"></span>
             </button>
             <a class="navbar-brand" href="../../../">&raquo; Skip intro</a>
           </div>
         </div>
       </nav>
     
       <!-- Main jumbotron for a primary marketing message or call to action -->
       <div class="jumbotron">
         <div class="container">
           <h1>Welcome!</h1>
           <p><b><a href="https://www.gerritcodereview.com" target="_blank">Gerrit Code Review</a></b> provides web-based code review and repository
             management for the Git version control system.</p>
           <p>
             Before starting using it, you may want to consider <strong>installing
               some extra plugins</strong> to extend its functionality, including <i>replication
               to remote locations</i>, integration with <i>Atlassian Jira</i>
             and other issue trackers workflow, <i>OAuth 2.0
               authentication</i> with external providers such as <i>Google
               Account</i>, <i>GitHub</i> and <i>GitLab</i> and many others.
           </p>
           <p>
           <p>
             Once you're done with your plugins selection, click on the
             top-right <strong>"&gt; Go to Gerrit"</strong> link on the
             top-right corner to access the Gerrit Code Review main screen.
           </p>
           <a class="btn btn-primary btn-lg" href="index.html" role="button">Install
             plugins &raquo;</a>
           </p>
         </div>
       </div>
     
       <div class="container">
         <!-- Example row of columns -->
         <div class="row">
           <div class="col-md-4">
             <h2><span class="glyphicon glyphicon-film" aria-hidden="true"></span>&nbsp;Learn more</h2>
             <p>Before starting using Gerrit Code Review, you may want to
               spend a few minutes learning the basic concepts and how its
               workflow works.</p>
             <p>Get information from the source, with an introduction
               video starring Shawn Pearce, the Gerrit Code Review project
               founder, at the EclipseCon 2013.</p>
             <p>
               <a class="btn btn-default"
                 href="https://www.youtube.com/watch?v=Wxx8XndqZ7A&t=15s"
                 target="_blank" role="button">Watch Video &raquo;</a>
             </p>
           </div>
           <div class="col-md-4">
             <h2><span class="glyphicon glyphicon-envelope" aria-hidden="true"></span>&nbsp;Get involved</h2>
             <p>Gerrit Code Review is backed by a thriving Community of
               users and contributors. The main channel to get in touch is
               through the "repo-discuss" mailing list.</p>
             <p>Join the discussions and feel free to ask questions.
               Share your thoughts on how to improve Gerrit workflow and user
               experience.
             <p>
               <a class="btn btn-default"
                 href="https://groups.google.com/forum/#!forum/repo-discuss"
                 target="_blank" role="button">Repo-discuss mailing list
                 &raquo;</a>
             </p>
           </div>
           <div class="col-md-4">
             <h2><span class="glyphicon glyphicon-thumbs-up" aria-hidden="true"></span>&nbsp;Keep in touch</h2>
             <p>
               Get the latest news about Gerrit Code Review releases and
               events by following the official social network channels of
               the project, including <a
                 href="https://plus.google.com/communities/111271594706618791655"
                 target="_blank">Google+</a> and <a
                 href="https://twitter.com/gerritreview">Twitter</a>.
             </p>
             <p>Follow Gerrit and tweet about your experience to share
               your thoughts and achievements with your daily code reviews.
             <p>
               <a href="https://twitter.com/gerritreview"
                 class="twitter-follow-button" data-show-count="false">Follow
                 @gerritreview</a>
               <script async src="//platform.twitter.com/widgets.js"
                 charset="utf-8"></script>
             </p>
           </div>
         </div>
     
         <hr>
     
         <footer>
           <p><a href="https://www.gerritcodereview.com" href="_blank">Gerrit Code Review</a> - Copyright &copy; 2018 The Android Open Source Project -
             Licensed under the Apache License, Version 2.0.</p>
         </footer>
       </div>
       <!-- /container -->
     </body>
     </html>
      from post to http://gerrit-service:8080/a/config/server/version
     Traceback (most recent call last):
       File "/usr/local/lib/python3.7/site-packages/zuul/driver/gerrit/gerritconnection.py", line 617, in get
         ret = json.loads(r.text[4:])
       File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads
         return _default_decoder.decode(s)
       File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
         obj, end = self.raw_decode(s, idx=_w(s, 0).end())
       File "/usr/local/lib/python3.7/json/decoder.py", line 355, in raw_decode
         raise JSONDecodeError("Expecting value", s, err.value) from None
     json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
     2020-02-12 16:45:38,419 ERROR zuul.GerritConnection: Unable to determine remote Gerrit version

    My task was to achieve a way to configure the gerrit container in a "k8s" neat way. After many wrong paths I decided to create the gerrit-config job, this job contains a executor container that will execute the /var.playbooks/setup.yaml ansible scrip and will configure gerrit. After this configuration is done, it will be stored in the mariadb database, so in a case of gerrit crashing, once it is up again, it won't need to be configured again but just obtain the data form the database. So the gerrit-config only needs to be executed once. However, in software, things tend not to be a path full of unicorns, rainbows and cookies. Therefore here is my blocker at this point:

    • The ansible script has an error about a header that has something to do with the version. At the time of taking this for some reason it get thought the point it was blocked before, however I managed to replicate the previous error by using a neweer version of ansible, butthis error was happening to me inboth versions previously. I will post both set of logs here:

    New error:

     [WARNING]: No inventory was parsed, only implicit localhost is available
     
     [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
     
     
     PLAY [localhost] ********************************************************************************************************************************************************************************************
     
     TASK [Wait for Gerrit to start] *****************************************************************************************************************************************************************************
     ok: [localhost]
     
     TASK [Get Gerrit first login screen] ************************************************************************************************************************************************************************
     ok: [localhost]
     
     TASK [Add admin SSH key to Gerrit] **************************************************************************************************************************************************************************
     [DEPRECATION WARNING]: Supplying headers via HEADER_* is deprecated. Please use `headers` to supply headers for the request. This feature will be removed in version 2.9. Deprecation warnings can be 
     disabled by setting deprecation_warnings=False in ansible.cfg.
     ok: [localhost]
     
     TASK [Create temp dir for Gerrit config update] *************************************************************************************************************************************************************
     changed: [localhost]
     
     TASK [Set All-Project repo location] ************************************************************************************************************************************************************************
     ok: [localhost]
     
     TASK [Checkout All-Projects config] *************************************************************************************************************************************************************************
     fatal: [localhost]: FAILED! => {"changed": false, "cmd": "/usr/bin/git clone --origin origin ssh://gerrit-service:29418/All-Projects/ /tmp/tmp.1Kn97k2NgY/All-Projects", "msg": "Cloning into '/tmp/tmp.1Kn97k2NgY/All-Projects'...\nWarning:********@gerrit-service: Permission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.", "rc": 128, "stderr": "Cloning into '/tmp/tmp.1Kn97k2NgY/All-     Projects'...\nWarning: Permanently added '[gerrit-service]:29418,[10.96.210.234]:29418' (ECDSA) to the list of known hosts.\r\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @\r\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\nPermissions 0644 for '/var/ssh/admin' are too open.\r\nIt is required that your private key files are NOT accessible by others.\r\nThis private key will be ignored.\r\nLoad key \"/var/     ssh/admin\": bad permissions\r\nadmin@gerrit-service: Permission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n", "stderr_lines": ["Cloning into '/tmp/tmp.1Kn97k2NgY/All-Projects'...", "Warning: Permanently added '[gerrit-service]:29418,[10.96.210.234]:29418' (ECDSA) to the list of known hosts.", "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", "@         WARNING: UNPROTECTED      PRIVATE KEY FILE!          @", "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", "Permissions 0644 for '/var/ssh/admin' are too open.", "It is required that your private key files are NOT accessible by others.", "This private key will be ignored.", "Load key \"/var/ssh/admin\": bad permissions", "admin@gerrit-service: Permission denied (publickey).", "fatal: Could not read from remote repository.", "", "Please make sure you have the correct access rights", "and the repository      exists."], "stdout": "", "stdout_lines": []}
     
     PLAY RECAP **************************************************************************************************************************************************************************************************
     localhost                  : ok=5    changed=1    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

    Old error:

     root@gerrit-config-ns4j5:/# /usr/local/lib/zuul/ansible/2.9/bin/ansible-playbook /var/playbooks/setup.yaml
     [WARNING]: No inventory was parsed, only implicit localhost is available
     [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
     
     PLAY [localhost] ********************************************************************************************************************************************************************************************
     
     TASK [Wait for Gerrit to start] *****************************************************************************************************************************************************************************
     ok: [localhost]
     
     TASK [Get Gerrit first login screen] ************************************************************************************************************************************************************************
     ok: [localhost]
     
     TASK [Add admin SSH key to Gerrit] **************************************************************************************************************************************************************************
     fatal: [localhost]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (uri) module: HEADER_Content-Type Supported parameters include: attributes, backup, body, body_format, client_cert, client_key, content, creates, delimiter, dest, directory_mode, follow, follow_redirects, force, force_basic_auth, group, headers, http_agent, method, mode, owner, regexp, remote_src, removes, return_content, selevel, serole, setype, seuser, src, status_code, timeout, unix_socket, unsafe_writes,      url, url_password, url_username, use_proxy, validate_certs"}
     
     PLAY RECAP **************************************************************************************************************************************************************************************************
     localhost                  : ok=2    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

    Next

    • Make sure gerrit is configured.
      • Zuul user created
      • Zuul ssh publick keys posted
      • etc. (check the setup script)
    • Make sure the scheduller connects with gerrit.
      • Gerrit version obtained succesfully.
      • Something else might come
    • Make sure the executor connects to gerrit.
      • Whatever is needed.

    References:

    Edited by Iker Sustatxa
  • Iker Sustatxa added 8 commits

    added 8 commits

    • 1e59fa25 - Create gerrit deployment
    • 7d55ae56 - Add entrypoint configmap
    • e21fa459 - Add comments about gerrit
    • 26544d75 - Add ssh-kys secret generator script
    • b297a35e - etc_zuul.yaml: Fix zuul.conf gerrit connection values
    • 355d513c - zuul-scheduler.yaml: Include Gerrit and Zuul ssh keys
    • 0283e66c - PLAYBOOKS: Change gerrit to gerrit-service and eliminate ssh-keys
    • f7367d04 - Create job to launch gerrit configuration script

    Compare with previous version

  • Iker Sustatxa mentioned in issue #9

    mentioned in issue #9

  • Iker Sustatxa added 1 commit

    added 1 commit

    • 315fab82 - Create job to launch gerrit configuration script

    Compare with previous version

  • closed

Please register or sign in to reply
Loading