20 Commits

Author SHA1 Message Date
James E. Blair
53338653fd Update zuul-ci.org certs
We have a single vhost for zuul-ci.org and zuulci.org, so we should
request a cert with all 4 hostnames.

We also have a separate vhost to handle the git.zuul-ci.org redirect;
add a cert request for that so we can manage it with LE.

Change-Id: Ia2ba3d3ad4f5ab0356ede371d94af3c77a89eda1
2020-01-07 14:35:25 -08:00
James E. Blair
bb0a118441 Use include_tasks in handlers
The import_tasks lines no longer work in Ansible 2.8.  The tarballs
and logs lines were missed earlier due to in-flight changes.

Change-Id: I0fb2b6fc2260175790617d8fcddb52bc9a6f9ef5
2020-01-07 13:50:09 -08:00
James E. Blair
6288a3c016 Get letsencrypt certs for zuul-ci.org
Change-Id: Ieb0c6d02c11a660c063536206e3f9210796007b8
2020-01-06 08:56:47 -08:00
Clark Boylan
4ab6673092 Add necessary ansible vars for inap mirror LE
This was missed when adding the new inap mirror host to our inventory
and groups.

Change-Id: I02d7088ce1722f0a55fe6b17192fd462028aae5c
2019-11-26 13:52:51 -08:00
Clark Boylan
f7a305afbf Manage opendev.org with LE on all giteas
This catches up gitea02-07 with 01 managing ssl certs with LE.

Change-Id: I06228edca2204c5c57ebc5cb60b9d1308a393058
2019-11-18 12:47:08 -08:00
Clark Boylan
5392f8a27c Manage opendev.org cert with LE
This is the first step in managing the opendev.org cert with LE. We
modify gitea01.opendev.org only to request the cert so that if this
breaks the other 7 giteas can continue to serve opendev.org. When we are
happy with the results we can merge the followup change to update the
other 7 giteas.

Depends-On: https://review.opendev.org/694182
Change-Id: I9587b8c2896975aa0148cc3d9b37f325a0be8970
2019-11-18 12:07:10 -08:00
Ian Wienand
9c7136448a Add mirror01.mtl01.opendev.org
This server is a replacement for the .openstack.org version, which no
longer exists.

Depends-On: https://review.opendev.org/690767
Change-Id: I0d2eeb609219ad96db39d1d59b99ae376419df0e
2019-10-24 11:00:05 +11:00
James E. Blair
48cafd19f8 Add LE cert for logs.opendev.org to static
This can be used in an apache vhost later, but should be fine to
merge now.

Depends-On: https://review.opendev.org/673902
Change-Id: Ic2cb7585433351ec1bdabd88915fa1ca07da44e7
2019-07-31 13:00:50 -07:00
Clark Boylan
4b4eb02f32 Replace the fn mirror again
Networking got weird on the previous host so we rebuilt this one going
back to networking we expect to work (FIPs and all that). This updates
the inventory so that we configure the host properly.

Change-Id: I0dcdbc9efdd330d66b57da0b01d23dd3d747f79b
2019-07-30 15:15:01 -07:00
Jeremy Stanley
b45c672de5 Replace fortnebula mirror
The fortnebula mirror is being rebuilt while the environment there
is under some refactoring. The old mirror isn't reachable any longer
so removing it from our inventory while adding its replacement
should be safe.

Also update the letsencrypt playbooks for the new name.

Change-Id: I789248e4216f4cf059ccc5b071c2a784f9c629e9
2019-07-29 13:08:58 +00:00
Clark Boylan
211aac5a9b Add apache restart handler for fortnebula LE setup
THis was missed previously but we need it for LE to properly restart
apache when certs update.

Change-Id: I6cf498ce1ec8cf5b936d2fedbbfe3c9666483e07
2019-07-03 16:04:58 -07:00
Ian Wienand
7810230408 Add OVH GRA1 mirror
This mirror will be manually configured with kafs (see
https://review.opendev.org/623974).  This should be a nice distant
geographic counterpoint to the IAD RAX server.

This will need to be manually configured with a custom kernel for now,
but fixes are making their way upstream and this host will be
converted when available.

Depends-On: https://review.opendev.org/667529
Change-Id: I6a22933029c096c781c93c33e6edf03bf59223c9
2019-06-27 10:07:44 +10:00
Ian Wienand
d33105535a Separate openafs CI mirror
This is an intermediate step to having both kafs and openafs testing
in the gate; this just makes it clear which host is which.

Change-Id: I8cd006227ed47ad5f2c5eec664083477dd7ba397
2019-06-17 15:56:09 +10:00
Ian Wienand
0041f4f673 Add certificates for IAD/ORD opendev.org mirrors
Change-Id: I509517c7601989cff18e29277f3391a813d5ba99
2019-06-12 11:25:50 +10:00
Zuul
88909d0a20 Merge "bridge.opendev.org: use Ansible 2.8.0 stable" 2019-06-11 01:48:16 +00:00
Ian Wienand
8a06d48c84 bridge.opendev.org: use Ansible 2.8.0 stable
Testinfra works with Ansible 2.8.0 now, so we can update
bridge.opendev.org to the latest version.  This also needs an ARA
update; bring it to the latest 0.16.4 release.

Update test-requirements so that tox/ansible-lint use Ansible 2.8.0
too.  See note inline about dependencies.

Note we replace import_tasks with include_tasks in handlers to address
this porting issue:
https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.8.html#imports-as-handlers

Change-Id: I7ed75d253857f86b68f67023af6897af4e1b4f50
2019-06-06 11:25:06 -07:00
James E. Blair
2e5291f377 Get an LE cert for tarballs.opendev.org
Depends-On: https://review.opendev.org/663424
Change-Id: I4faa12b5d241144463ccf7ec59ef2d0b11479c35
2019-06-05 13:56:34 -07:00
Ian Wienand
73bbc6787f Bringup mirror01.dfw.rax.opendev.org
This is an initial host for testing opendev.org mirrors

Change-Id: I26b9ed1e21e2111f48bc7ecc384880c274eed213
Depends-On: https://review.opendev.org/660235
2019-05-21 11:08:30 +10:00
Ian Wienand
670107045a Create opendev mirrors
This impelements mirrors to live in the opendev.org namespace.  The
implementation is Ansible native for deployment on a Bionic node.

The hostname prefix remains the same (mirrorXX.region.provider.) but
the groups.yaml splits the opendev.org mirrors into a separate group.
The matches in the puppet group are also updated so to not run puppet
on the hosts.

The kerberos and openafs client parts do not need any updating and
works on the Bionic host.

The hosts are setup to provision certificates for themselves from
letsencrypt.  Note we've added a new handler for mirror nodes to use
that restarts apache on certificate issue/renewal.

The new "mirror" role is a port of the existing puppet mirror.pp.  It
installs apache, sets up some modules, makes some symlinks, sets up a
cleanup cron job and installs the apache vhost configuration.

The vhost configuration is also ported from the extant puppet.  It is
simplified somewhat; but the biggest change is that we have extracted
the main port 80 configuration into a macro which is applied to both
port 80 and 443; i.e. the host will have SSL support.  The other ports
are left alone for now, but can be updated in due course.

Thus we should be able to CNAME the existing mirrors to new nodes, and
any existing http access can continue.  We can update our mirror setup
scripts to point to https resources as appropriate.

Change-Id: Iec576d631dd5b02f6b9fb445ee600be060f9cf1e
2019-05-21 11:08:25 +10:00
Ian Wienand
733122f0df Use handlers for letsencrypt cert updates
This change proposes calling a handler each time a certificate is
created/updated.  The handler name is based on the name of the
certificate given in the letsencrypt_certs variable, as described in
the role documentation.

Because Ansible considers calling a handler with no listeners an error
this means each letsencrypt user will need to provide a handler.

One simple option illustrated here is just to produce a stamp file.
This can facilitate cross-playbook and even cross-orchestration-tool
communication.  For example, puppet or other ansible playbooks can
detect this stamp file and schedule their reloads, etc. then remove
the stamp file.  It is conceivable more complex listeners could be
setup via other roles, etc. should the need arise.

A test is added to make sure the stamp file is created for the
letsencrypt test hosts, which are always generating a new certificate
in the gate test.

Change-Id: I4e0609c4751643d6e0c8d9eaa38f184e0ce5452e
2019-05-14 08:14:51 +10:00