Install Zuul on jenkins.

Change-Id: I732622576c318d82155cdd15c632a57070c2d850
Add some missing zuul bits.

Change-Id: I736c3eab317bf68bc295ece81e88933f005e26e4
Add missing zuul parameters

Change-Id: I41e8eb35b34a7566e94ece4d144675faf6c93ba3
Set up Zuul init scripts.

Reload Zuul on changes to config files.

Change-Id: I7719a72b8d727490902d1226bfe1637c3f84d6d7
Make zuul restart graceful.

Add /var/lib/zuul so it can save the queue there.

Change-Id: I4ebb18f0502735ad18191a0dc5ddc26f6ef32e05
Fix the zuul reloading on config changes.

Zuul config files were broken out into a new module which introduced
cross module subscription dependencies. To make this work the module
doing the notify/subscribe must include the module the resource that
the subscription/notify is on. To fix this have config files notify
the zuul_reload exec.

Change-Id: I2d9e2236bc378d9dd92f811830dee6540b4cf4e2
Add zuul.conf.

Add a templated zuul.conf with apikey filled in by hiera.
Made an openstack_project::zuul class to encapsulate installation
and config of zuul with our config files.

Change-Id: Idc09819b27672879b74b90bdbf699b07aa416a2a
Reviewed-on: https://review.openstack.org/10460
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
Remove reference to non-existent group.

Change-Id: I2965c548fb51f7235faa02b8808b8b36f31ded7c
Reviewed-on: https://review.openstack.org/10829
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
Replace manual git work with vcsrepo module.

Change-Id: Ia0f3acd50aab07cc83d13cd12c8f7fc67f1c697d
Reviewed-on: https://review.openstack.org/10832
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
Fix jenkins loop and zuul vcsrepo.

Change-Id: I83cf1303bb07e59b0c3305a2540f048638940372
Reviewed-on: https://review.openstack.org/10979
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
Add GitPython to zuul.

Also, set up the git directory.

Change-Id: Ia753c00df0665b3e8dec18083f113a900b168216
Reviewed-on: https://review.openstack.org/11446
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Configure zuul to push refs.

Change-Id: I59456356579d8e83b3f7d552ac795c4de55c0817
Reviewed-on: https://review.openstack.org/11590
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Add url_pattern to zuul.conf.

Change-Id: Ib1d05a42e98613e746cbd7865cd97ce25f6a26c0
Reviewed-on: https://review.openstack.org/11940
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: James E. Blair <corvus@inaugust.com>
zuul can now be installed from a different git repo

$git_source_repo is a new optional parameter to the zuul class, let you
specify from which repository you want to install zuul. The default is
the maintainer version on GitHub.

The reason for this change is that some third party always hosts their
software on their own infrastructure. That is the case of the Wikimedia
Foundation which is reusing this module.

Change-Id: I5ac8852b08d158ff3531f6795855df20a204789e
Reviewed-on: https://review.openstack.org/13576
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
zuul dependencies update

This add some Ubuntu packages as Zuul dependencies, although they are
listed in tools/pip-requires already. New dependencies are:

 - python-lockfile
 - python-paramiko
 - python-yaml

I am not sure how well the Ubuntu versions will work out versus the one
from pip.

Change-Id: Ie56da494db7eb4925834824028ed6471b91be77b
Reviewed-on: https://review.openstack.org/13575
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Be conservative requiring python-yaml.

A lot of modules require python-yaml. Be conservative requiring this
package to avoid conflicts when two or more of these modules end up
being used on the same host.

Change-Id: I35bf4f1070e6f248734c593e9277b737166904c1
Reviewed-on: https://review.openstack.org/13688
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
Add zuul status url to zuul config.

Zuul can now provide links to the status page if a url for that page is
included in the zuul configuration. Add the status_url option to the
zuul config erb and default it to https://$fqdn/zuul/status.

Change-Id: I160a4e1cd71a13981cb171c71a923cc1af753a80
Reviewed-on: https://review.openstack.org/13859
Reviewed-by: James E. Blair <corvus@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Fix Jenkins modules.

Previously you could not use the Jenkins module to go from fresh host to
running jenkins. There were two problems.
1. jenkins::master does not explicitly create a jenkins user which is
required by Zuul. Instead the jenkins deb package creates the users.
Zuul File resources that need the jenkins user should require the
jenkins package.
2. jenkins::master did not install Bazaar but attempted to run a service
that depended on bzr.

Correct these two errors (require jenkins package and remove bzr
service).

Change-Id: Ib2d6f58fbcd456781f10cf2ceefc11503d6f92f2
Reviewed-on: https://review.openstack.org/13926
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
Fix restart logic in zuul init script

Change-Id: I4ddd69916db4d9df036d3d674fb58847981d2758
Reviewed-on: https://review.openstack.org/13810
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Antoine Musso <hashar@free.fr>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
Cleanup zuul manifest init.pp lint errors.

Change-Id: Ic2b8f638d4c328eeb92a86c6ce1b92a55b13d6bb
Reviewed-on: https://review.openstack.org/14981
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins