11 Commits

Author SHA1 Message Date
Clark Boylan
8eb981b47f Install docker-compose from pypi
We want to use stop_grace_period to manage gerrit service stops. This
feature was added in docker-compose 1.10 but the distro provides 1.5.
Work around this by installing docker-compose from pypi.

This seems like a useful feature and we want to manage docker-compose
the same way globally so move docker-compose installation into the
install-docker role.

New docker-compose has slightly different output that we must check for
in the gitea start/stop machinery. We also need to check for different
container name formatting in our test cases. We should pause here and
consider if this has any upgrade implications for our existing services.

Change-Id: Ia8249a2b84a2ef167ee4ffd66d7a7e7cff8e21fb
2020-04-16 12:08:00 -07:00
Clark Boylan
3deef00ba9 Manage insecure-ci-registry cert with LE
This adds a new handler to restart the zuul registry to pick up the new
cert. We may want to consider updating zuul registry to accept a reload
of ssl config without restarting the service.

Depends-On: https://review.opendev.org/702050
Change-Id: I23f6bea68285bc7cb0d12224235eaa16f0d07986
2020-01-13 15:20:20 -08:00
James E. Blair
95f0c32a61 Temporarily disable intermediate registry prune
Just to eliminate the possibility that a bug in this may be causing
us to erroneously delete blobs.

Change-Id: I048d9ae5ba92984c90f84f231b412050a52fcea6
2019-10-09 14:10:56 -07:00
James E. Blair
8223eadf01 Switch the insecure-ci-registry to zuul-registry
This uses the new zuul-registry container image to run the
intermediate registry.  The same authentication data and certs
are used.  The new registry also writes to the same swift container,
but uses different pseudo-directories so it won't clash with the
current registry.  If there are problems, we can switch back easily.
After successful use of the new registry, we can delete the old data.

Change-Id: Ib855fb99c991411293a617b9b238d79a6bfae328
2019-10-02 14:11:33 -07:00
Clark Boylan
f4bf952f34 Prune docker images after docker-compose up
This ensures that we cleanup images that are superceded and no longer
necessary. We do this to avoid filling the disk with docker images.

Note that we use the -f flag to avoid being prompted by docker image
prune for confirmation.

Change-Id: I8eb5bb97d8c66755e695498707220c9e6e7b2de0
2019-05-02 15:09:37 -07:00
James E. Blair
f357e5cdab Use swift to back intermediate docker registry
Note, this does not have complete tests yet (we will need to update
the job to start a swift for that).

Change-Id: I2ee7a9e4fb503a3431366c16c380cf09327f6050
2019-04-18 08:14:37 -07:00
Clark Boylan
671250095d Install a docker registry GC cron
This installs a daily cron job for garbage collecting the docker
registry. Note that we need to orphan blobs by deleting their tags for
this to result in any cleaned up blobs. This will be done in a separate
change.

Change-Id: I85c87ee3b3a375e0141ef9b15a0b9e56c0938bd8
2019-04-15 12:08:17 -07:00
James E. Blair
4d91f29b39 Run docker-compose pull before docker-compose up
This will make sure that the latest relevant images are in the
local image storage, and therefore, will cause docker-compose up
to recreate containers when the images are updated.

Change-Id: Ic6f0bc8c8aea5b5c16501f4ab5d3095fb70c0ff7
2019-03-04 14:40:35 -08:00
James E. Blair
eeb69e7ba2 Fix htpasswd creation for registry
We were using the wrong filename and encryption type.

Change-Id: I48d2a7288e5cd52e57f5632fee17f677429a1a9c
2019-02-16 11:59:56 -08:00
James E. Blair
175a337e01 Handle registry role running under py3
Also, correct the host_vars filename.  Again.
Also, make sure we run the test on changes to the host_vars filename.

Change-Id: I95fb61531bae677f5c68f4e56ed718da6c507eb9
2019-02-08 09:13:06 -08:00
James E. Blair
12709a1c8b Run a docker registry for CI
Change-Id: If9669bb3286e25bb16ab09373e823b914b645f26
2019-02-01 10:12:51 -08:00