[OpenStack-Infra] zuul for non-openstack project

Antoine Musso hashar at free.fr
Fri Sep 25 13:12:45 UTC 2015


Le 25/09/2015 02:15, Basavaraj Karadakal a écrit :
> Greetings,
> I work for Juniper networks. I work for a project  where we use gerrit
> for code review and are planning to implement CI pipeline.  I came
> across zuul and am impressed by the functionality zuul has for CI .  I
> want to explore using zuul for our CI pipelines. I went through the docs
> on the web to setup CI
> infrastructure http://docs.openstack.org/infra/system-config/running-your-own.html .
> The documents seem to be geared towards establishing a CI infrastructure
> to work for a openstack project (no surprise there ). 
> I see most of the deployment has to be done using puppet and customize
> it to our needs. I am in process of getting compute resources internally
>  to do a test deploy. I am a puppet novice, and might take some time to
> get it all working. The config files themselves are very well documented
> and was thinking I can get a test setup running with out having to
> deploy using puppet.  Is there any information to how to get the setup
> running with out puppet ?  Any help / information is greatly appreciated.

Hello Basavaraj,

I have adopted Zuul for the Wikimedia CI infrastructure.  There are lot
of connections and softwares involved so I would recommend to start with
a very limited scope:

- one Jenkins master and a single permanent slave
- a single Zuul merger process
- pick one Gerrit repo
- one job triggering on patchset creation

The archiecture is roughly:

 Zuul scheduler
   + forks an Embeded Gearman server

 Zuul merger
   Connect to the Gearman server.

 Jenkins with the Gearman Plugin
   Connect to the Gearman server.

The Zuul scheduler listen for Gerrit events using 'stream-event', so you
need a user that has ssh access and appropriate permission. You will
have to manually accept the Gerrit ssh fingerprint.

You probably want to enable a lot of debug log to assist.


If it can help, I wrote a thin python script to query the gearman server
for workers and status of functions:

https://github.com/wikimedia/operations-puppet/blob/production/modules/zuul/files/zuul-gearman.py

Examples:

 zuul-gearman.py --server 127.0.0.1 status
 # List all functions
 zuul-gearman.py --server 127.0.0.1 workers
 # List Jenkins executors registered as Gearman functions and the
 # list of jobs they can run


Zuul has a specific internal job 'noop' that doesnt trigger any merge
nor any job in Gearman.  That might help to tweak the layout file and do
the initial Zuul scheduler setup.

As others pointed out, online doc is at:
  http://docs.openstack.org/infra/zuul/

-- 
Antoine "hashar" Musso



More information about the OpenStack-Infra mailing list