Commit Graph

38 Commits

Author SHA1 Message Date
David Shrewsbury e6d8b210cc Documentation reorg
Reorganizing docs as recommended in:

https://www.divio.com/blog/documentation/

This is simply a reorganization of the existing documents and changes
no content EXCEPT to correct the location of sphinx doc references.
Expect followup changes to change document names (to reflect the new
structure) and to move content from existing guides (e.g., to move the
pipeline/project/job structure definitions out of the "Project Configuration"
reference guide into their own reference documents for easier locatability).

All documents are now located in either the "overview", "tutorials",
"discussions", or "references" subdirectories to reflect the new structure
presented to the user. Code examples and images are moved to "examples" and
"images" root-level directories.

Developer specific documents are located in the "references/developer"
directory.

Change-Id: I538ffd7409941c53bf42fe64b7acbc146023c1e3
2020-01-14 12:47:23 -05:00
Paul Belanger db0fd4e57d Switch ansible_default to 2.8
As this is the lastest stable version of ansible.

Change-Id: I02a0e9703a61b3976cec559a1069b51616c3d447
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-12-10 11:28:34 -05:00
Clark Boylan 30418a8f98 Disable Mariadb TZINFO table generation
We have noticed that some quickstart jobs fail due to timeouts waiting
to connect to mariadb. On further investigation I've found that this
slowness is related to bootstrapping of TZINFO tables on initial startup
[0][1].

The workaround for this problem that I've chosen is to disable this
TZINFO generation on startup. Other options include using mariadb 10.4.7
(10.4.8 introduced the issue upstream), switching to mysql or percona,
or increasing out timeout to cover the longer startup time (probably
want to set the timeout around 5 minutes).

[0] https://github.com/docker-library/mariadb/issues/261
[1] https://github.com/docker-library/mariadb/issues/262

Change-Id: Ib27681c1e5ac25a0a5f75a6b1bfb24029d0be3c8
2019-11-22 12:29:56 -08:00
Monty Taylor 8014a8286c Revert "Revert "Add the process environment to zuul.conf parser""
Updates the environment variable processing to only affect variables
prefixed with ZUUL_.

Adds a test showing the os.environ with % in it.

This reverts commit b3929b5633.

Change-Id: Ic6c3dd0327ef70dc1375486827e4503a4cea9bfc
2019-11-02 09:10:18 +09:00
Monty Taylor 1986d263c8 Revert "Add the process environment to zuul.conf parser"
In prod for OpenDev we're seeing things like this:

http://paste.openstack.org/show/785704/

which lead us to believe this is somehow connected.

This reverts commit f2229705f3.

Change-Id: I0b73b71f72483e6c6e511411c3c59729761cec9b
2019-11-01 09:41:12 +09:00
Zuul 060a2b36a4 Merge "Update install for buster" 2019-10-23 21:57:02 +00:00
James E. Blair b2e5500cc2 Update install for buster
Add the correct libre2 package name for Debian buster, and also
update the quickstart playbook and documentation to deal with
the change in default rsa key encoding format from newer
versions of ssh-keygen.

Change-Id: I6ada88cd896d844c1171f7bcaf4691dea023d51f
2019-10-23 14:01:42 -07:00
Clint Byrum f2229705f3
Add the process environment to zuul.conf parser
This will allow users to set environment variables with sensitive
strings like passwords, but keep a single config file. This comes
in handy when using Kubernetes in particular, as it wants to
handle sensitive data and templated config files in a very different
manner.

Change-Id: I38f6c4da82e1647ad197908f19ea6df23e04fc32
2019-10-15 15:34:39 +02:00
Fabien Boucher 4fb8f83945 Pagure - handles pull-request.closed event
This event can be used to implement a promote pipeline.

Change-Id: Id39f6e43f66d2aed8c625c0749a57107fd11eb4d
2019-09-18 11:51:31 +02:00
Fabien Boucher 2f546dcc8e Pagure - reference pipelines add open: True requirement
Without this requirement it was possible to run jobs via
a recheck on closed pull requests. Recommended pipelines
should not allow that.

Change-Id: I9693d9ab906024137d48b4d473d1292a383d9e65
2019-09-18 11:51:00 +02:00
Fabien Boucher ae42bbe735 Pagure - handle Pull Request tags (labels) metadata
This change implements event handling for pull-request.tags.added.
Tags can be used as trigger event filter or required metadata.

Change-Id: I128bbef34245932e3bbee1f848ad1c484d3ccae3
2019-09-18 11:50:26 +02:00
James E. Blair d574702f24 Move reference pipelines out of the quickstart
The current location of the reference pipelines is within the
quick-start repo, which causes all sorts of configuration errors
to be logged (but since Zuul is so tolerant of them, the job
doesn't actually fail).

Move them outside of one of the demo project directories into their
own.

Change-Id: I9cb1ddd803d938fc154a32308cae99dbab9392e2
2019-09-17 15:35:18 -07:00
Zuul 02c89390d2 Merge "Add reference pipelines file for Gerrit driver" 2019-08-29 19:34:38 +00:00
Fabien Boucher 60ece31607 Add reference pipelines file for Gerrit driver
As it has been done for the Pagure driver, include
a reference pipelines section in the Gerrit driver
documentation. It helps the reader to better
understand the big picture of the Gerrit's pipelines
configuration but also provide an almost ready to use
pipelines definition file.

Change-Id: I5234476f7393ba938e8365b8c908a2ff6f9e8c76
2019-08-27 14:47:07 +02:00
James E. Blair 4a719d0fe4 Collect more information from quickstart failures
When the quickstart job fails, make sure that we get stderr from
the docker logs.  Also, add timestamps to the waiting to start
script so that we can compare when it gave up to when systems
came online.

Change-Id: I632c794de7fb792fbe7d0b8e095701a5d7fd1af7
2019-08-16 08:48:11 -07:00
Fabien Boucher 3f98bb56be Fix reference pipelines syntax coloration for Pagure driver
Also move the reference pipelines in a separate yaml file that
can be simply reused.

Change-Id: If315b4cb1426a0379d31190f878ad163f7cfeeb1
2019-07-25 11:53:19 +02:00
James E. Blair e5008494ec Change default job_dir location
To increase the chances that job_dir and git_dir are on the
same filesystem in the default configuration, set the default
job_dir to /var/lib/zuul/builds.

Also, all zuul container images specify a volume at /var/lib/zuul,
therefore the docker-compose file does not need to specify the
same for the scheduler container.

Due to this, we were inadvertently running the executor with the
git_dir and job_dir on different filesystems in the quick-start.
That should no longer be the case.

Change-Id: I2fe5eea588006da7181c3ea8ad2637598764e8f1
2019-06-13 13:43:16 -07:00
Zuul 7e45f84f05 Merge "Update quickstart nodepool node to python3" 2019-06-13 02:52:29 +00:00
Jeremy Stanley 5bf838db68 Install latest git-review from PyPI in quickstart
With the removal[*] of refs/publish in Gerrit 3.0.0, git-review
1.27.1 or later is needed to avoid attempting a push there and
ultimately failing. The git-review package in Ubuntu 18.04 LTS is
too old (1.26.0), so use latest from PyPI instead.

Adjust the quick-start document to install git-review with pip, and
on Debian/Ubuntu suggest including the python3-pip distro package
since it's split out separate from the interpreter packages.

[*] https://gerrit-review.googlesource.com/c/gerrit/+/192494

Change-Id: I247fb761667a99cf9f25478b49c5a1fe5d11a6cf
2019-05-20 17:46:33 +00:00
Paul Belanger eb42b92212 Update quickstart nodepool node to python3
This is to get some test coverage using python3.

Change-Id: Ia25b95a38ed59a2dc8a9c8d7ff4d1b30db137d8e
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2019-05-16 21:24:52 -04:00
Tristan Cacqueray 6fd6b6b57d bubblewrap: bind mount /etc/subuid
This file may be required by recent containers tool when doing unshare
actions.

Also make the image build jobs non-voting temporarily since they are
broken by the issue this change fixes.

Also, pin docker image to 2.16.8 for quick-start (squashed in here
to be able to merge again):

The new version 3.0.0 needs some configuration adjustment, git-review is
failing with:
  remote: error: branch refs/publish/master:
  remote: You need 'Create' rights to create new references.
  remote: User: user
  remote: Contact an administrator to fix the permissions

Change-Id: Iab45bf2322edf8a10d2d41a1fc9a098e17a39ea7
2019-05-16 09:33:16 +02:00
Zuul 4a0261c9a8 Merge "Add some packages for basic python jobs" 2019-05-13 16:06:26 +00:00
Zuul e980595d9f Merge "Improve proxy settings support for compose env" 2019-05-13 15:55:45 +00:00
Monty Taylor b0252eef9d Update references for opendev
Change-Id: I3c1ac5478efed4dee1d525deb036d457287fa136
2019-04-24 12:59:17 +00:00
Darragh Bailey ed15ba13f9 Add some packages for basic python jobs
Add some of the basic packages that someone trying the compose
environment would need to test some python jobs.

Change-Id: I788a24ff70f77288abaf94d4ef7b900c66e20bff
2019-04-23 14:19:59 +01:00
Darragh Bailey c970e052de Improve proxy settings support for compose env
Ensure that any container making use of no_proxy has the full list of
services it needs to talk to listed, and also allow for pass-through of
http and https proxy settings.

There is no need to use `*_proxy=...` unless modifying the value as
docker-compose will simply ignore unset environment variables.

Ensure the node built to run jobs is injecting any proxy env variables
added at build time in a manner that can be transparently picked up by
ansible jobs.

Change-Id: Ibc91cb40f92c2e7708640819e4ed36c70445d859
2019-04-23 14:19:58 +01:00
Tobias Henkel cd9827e664
Manage ansible installations within zuul
As a first step towards supporting multiple ansible versions we need
tooling to manage ansible installations. This moves the installation
of ansible from the requirements.txt into zuul. This is called as a
setup hook to install the ansible versions into
<prefix>/lib/zuul/ansible. Further this tooling abstracts knowledge
that the executor must know in order to actually run the correct
version of ansible.

The actual usage of multiple ansible versions will be done in
follow-ups.

For better maintainability the ansible plugins live in
zuul/ansible/base where plugins can be kept in different versions if
necessary. For each supported ansible version there is a specific
folder that symlinks the according plugins.

Change-Id: I5ce1385245c76818777aa34230786a9dbaf723e5
Depends-On: https://review.openstack.org/623927
2019-03-15 09:09:16 +01:00
Josef Wells f72682f477 quickstart: web and others wait on mysql to start
Change-Id: Ibc004adc67add0c14a98d9de5c508f5aa131224c
2019-03-01 16:21:52 -06:00
James E. Blair e41e83a5ef Quick-start: set content-type header on ssh key upload
Gerrit 2.16 was released and is more strict about the content-type
header on ssh key uploads.  Specify it is text/plain (which is what
the documentation indicates it should be).

Change-Id: Ic1b60737df5aeea5b1b44ea3dea63e7020366f95
2018-11-19 07:14:08 -08:00
James E. Blair 56ec35538a Merger: automatically add new hosts to the known_hosts file
To improve the experience for new users, have the mergers automatically
add new ssh hosts to their known hosts files.  They will still validate
existing entries, so a paranoid sysadmin can still pre-populate the file
to avoid trojan attacks on the initial connection.  New users in the
typical case of a secure internal network will not need to manually add
host keys to start Zuul.

This matches the behavior of the scheduler with its stream-events
connection to Gerrit.

Change-Id: Ib416bbb2ffcfedd5d114709af3931e154a1a92ac
2018-11-05 13:03:18 -08:00
Zuul 8b1fcb8f11 Merge "Add mysql to quick-start" 2018-10-18 05:10:01 +00:00
Paul Belanger e5665f7c00 Use zuul/nodepool-launcher container for docker-compose
We actually have a specific container for nodepool-launcher, lets use
that over the base nodepool container. We do this incase in the future
pbrx add new things for the nodepool-launcher entry point.

Change-Id: I636c1d9129765287d3a22b9edcf39f3645e44b77
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-10-17 17:07:54 -04:00
Paul Belanger 245250d1cb Fedora docker-compose fixes for selinux
By default fedora has SELinux enabled by default, as such we need to
pass special flags to our volumes. More infomration can be found at:

  http://www.projectatomic.io/blog/2015/06/using-volumes-with-docker-can-cause-problems-with-selinux/

Change-Id: Ic1d4dbc6102287952bbd9397b56be560deed23b0
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-10-17 17:02:49 -04:00
James E. Blair 8bca70aadc Add mysql to quick-start
This allows us to show build history in the web ui.

Also add a local test playbook for the quickstart which basically
does what the zuul-quick-start job does, but expects to run locally
on a workstation (ie, does not install the docker registry and
docker).

Change-Id: Id62dcf69f48399dab3d1259679bf2fc2ce50460e
2018-10-16 11:13:41 -07:00
James E. Blair 675cd8b922 Quick-start: switch to polygerrit
This will be the default in future versions of Gerrit, and it's
easier on the eyes.

Change-Id: I69a5fe62ed7521ee2851414be3473e28ed7960ff
2018-10-11 15:45:15 -07:00
James E. Blair c445de655a Quick-start: remove ansible Dockerfile
It takes a long time to install ansible, but we have it installed
already in the zuul image (for the executor).  Just use that instead.

Change-Id: I2dc2d6f5e5e83bb0654c45b27b8d37dc161f7841
2018-10-11 12:53:24 -07:00
James E. Blair 1bd3fe9075 Fixes for quick-start playbooks
* Tell folks to run 'sudo docker-compose up' in case their user
  is not in the docker group.

* Turn off fact gathering in playbooks because we've seen some
  leakage of device information from the host into the container
  which causes ansible to query device info that doesn't exist.
  We don't use facts anyway so this is faster too.

* Use register instead of rescue to figure out if users/projects
  need to be created.  It makes the ansible output tidier since
  there won't be any (expected) failure tasks.

* Use the alpine image instead of centos for the gerritconfig
  container.  We're more likely to be able to re-use this layer
  between this and the Zuul images than we would with centos
  (because the gerrit container over-specifies the centos version).

* Capitalize the task names in playbooks.  It looks better.

Change-Id: I428a2aea4e7544e04771d89e8d5627431cfaf1de
2018-10-11 12:53:21 -07:00
James E. Blair 8571b52ba8 Add docker-compose quickstart example
Use docker-compose to get a zuul+nodepool+gerrit up and configured
so that we can write walkthrough documentation which starts with
a running system.

Change-Id: I5819aee1fb9c3af72eb31818da476df074424225
Co-Authored-By: Tobias Henkel <tobias.henkel@bmw.de>
2018-10-09 14:36:06 -07:00