Commit Graph

86 Commits

Author SHA1 Message Date
Monty Taylor 589521fd18 Remove run_all.sh and ansible cron job
Remove the script and the cronjob on bridge that runs it.

Change-Id: I45e4d9713f3ba4760ba384d13487c6214d068800
2020-04-08 10:46:55 -05:00
Monty Taylor c8aeaf8fd1 Run remote-puppet-else in zuul
Wow. It's the last one!

Change-Id: Ib064c8412a3df28790b9ef51d88c50d43de1842d
2020-04-08 10:46:52 -05:00
Monty Taylor e7342c7e3e Run AFS in zuul
Change-Id: I5ea46cbf124006e38c045e2f93a19d33a9c3db91
2020-04-08 10:46:32 -05:00
Monty Taylor 4641a79aec Run gitea in zuul
Change-Id: Iaebcc1babcfc46c7765ab64f5e826f9e727a9298
2020-04-08 10:45:31 -05:00
Monty Taylor 6c2c31bcd5 Run review and review-dev in zuul
Change-Id: I6fa322110c729b43e0ca30f9e4fb38048246564c
2020-04-08 10:45:31 -05:00
Monty Taylor ad7b4c149b Run zuul-preview in zuul
Also rename the playbook to service-zuul-preview so that it's not
confusing about what it does.

Change-Id: I7a300ab4078a6473af0339d8cbf4b11e397ed837
2020-04-02 09:43:10 -05:00
Monty Taylor c98efecdea Run registry in zuul
Change-Id: Ic5ececf20babf4ee1c5b77033b42129d51caca38
2020-04-02 09:32:45 -05:00
Monty Taylor c571e0032e Run backup in zuul
Change-Id: Ie6ef39d0141874570c7e623a1ec1141fa3897b22
2020-04-02 09:30:47 -05:00
Monty Taylor e68fa070f4 Run static in zuul
Change-Id: I1aacc9375507ed06a890a68762f12433a9f97221
2020-04-02 09:30:08 -05:00
Monty Taylor 15ec6bada4 Run mirror in zuul
Change-Id: I8088090d9468c24653793a5f4bf64d9369e98033
2020-04-02 09:14:35 -05:00
Monty Taylor 13c9b4136d Run nameserver in zuul
Change-Id: Idfb8a78a901a8fd3e2e05e373470f4d2923566a2
2020-04-02 08:39:14 -05:00
Monty Taylor fdaea3915c Run mirror-update in zuul
Change-Id: I5b1590a310e7a64b3c2f05d121c68f90f2731231
2020-04-02 08:39:14 -05:00
Monty Taylor 660e9d0c41 Run meetpad in zuul
Change-Id: I61df86d8f5898ed8510eee10ed97be23062ebfff
2020-04-02 08:38:19 -05:00
Monty Taylor 952ee05dad Run nodepool in zuul
Change-Id: I41be75839a0b7495b041e381c1a9c677d1749ad8
2020-04-02 08:27:27 -05:00
Monty Taylor 2e4219dad3 Run letsencrypt in zuul
It should run before other services but after base, so run it early
and add it to the dependency list in the infra-prod-service-base job.

Change-Id: I4f65b0ff0fbf3cf1f98060d2b3d3c77eb3c45ec7
2020-04-02 08:27:26 -05:00
Monty Taylor 4602751640 Migrate gitea-lb to zuul
Change-Id: I80e116c56b36579e1c06d2ffe283e5005fa41194
2020-04-02 08:27:21 -05:00
Monty Taylor 851c8c8c13 Run service-bridge in zuul and semaphore everything
Make a base job for the various service playbooks to capture the
fact that we should run these after update-system-config, and if
they run, after both install-ansible and base.

Attach a semphore to the base job, because while many of the
playbooks should be independent, some may not be, and we need to
make sure things don't double-run in periodic and promote.

Transition service-bridge from run_all to zuul, basing it on the
new base job.

While we're in here, reduce manage-projects forks to 10, because
let's face it, that's a more sensible number when there aren't
that many hosts.

Change-Id: I22e9edaea75dcfdab56f667f7c93cdd3ee25406c
2020-04-02 08:25:31 -05:00
Monty Taylor c8af267282 Run manage-projects/base/bridge on system-config changes
We should run manage-projects when the manage-projects code on
system-config changes. To do that, we need to run the system-config
playbook so that the system-config content will be updated.

In order to that properly, we need to run base, which means we
need to run bridge. So we really want to do all three so that we're
doing the correct dependent sequence. Subsequent changes can
then just pick off single service playbooks and make them jobs
that depend on base.

Change-Id: I3560feff4309f6be21b72b30a7a6d61a60829e52
2020-03-31 15:37:17 -05:00
Monty Taylor 5d4c597fa8 Add job to run manage-projects in zuul
Instead of running via cron, we have a self-contained playbook.
Let's run in zuul instead.

Change-Id: I0dd4d3ac050d04a8ce7a39fb2e5599b64417e12e
2020-03-30 15:57:47 -05:00
James E. Blair 8b093dacd5 Add meetpad server
Depends-On: https://review.opendev.org/714189
Change-Id: I5863aaa805a18f9085ee01c3205b0f9ad602922d
2020-03-25 07:44:24 -07:00
Monty Taylor 86542eb9ba Split gitea and gerrit services from manage-projects
There are two different concerns here. One is configuring the gitea
and gerrit services. This is independent from the management of
projects running inside them.

Make a manage-projects playbook which currently runs gitea-git-repos
but will also get a gerrit-git-repos role in a bit. Make a
service-gitea playbook for deploying gitea itself and update
run_all to take all of that into account. This should make our
future world of turning these into zuul jobs easier.

Add several missing files to the files matchers for run-gitea
and run-review.

Also - nothing about this has anything to do with puppet.

Change-Id: I5eaf75129d76138c61013a3a7ed7c381d567bb8b
2020-03-21 11:34:19 -05:00
Ian Wienand 1c1195d0c4 Add service-static.yaml to cron run
I forgot this when adding the server previously, add it to the
periodic cron run too.

Change-Id: I3f0f4e666e5badf91e4a664ced9e891e89b8baa5
2020-01-28 12:46:23 +07:00
Monty Taylor 6f3a2792cc Switch to ansible on review-dev
The review-dev service playbook should do everything now that
the puppet did. Update how we're running things.

Change-Id: I70303c48328ea6713c24bf9c6f63d4808d30b95c
2020-01-14 12:04:15 -06:00
Ian Wienand 376915e17a run_all.sh : add backup playbook
The backup roles have been debugged and are ready to run.

A note is added about having the backup server in a default disabled
state.  This was discussed at an infra meeting where consensus was to
keep it disabled [1].

[1] http://eavesdrop.openstack.org/meetings/infra/2019/infra.2019-06-11-19.01.log.html#l-184

Change-Id: I2a3d2d08a9d1514bf6bdcf15bc5bc95689f3020f
2019-08-09 16:43:55 +10:00
Ian Wienand a595d1d1d0 Add mirror-update to run_all.sh
It looks like I forgot to add this in
I525ac18b55f0e11b0a541b51fa97ee5d6512bf70 so the mirror-update
specific roles aren't running automatically.

Change-Id: Iee60906c367c9dec1143ee5ce2735ed72160e13d
2019-07-16 10:04:15 +10:00
Clark Boylan cd9f3cfdad Apply service-bridge.yaml in run_all.sh
Prior to https://review.opendev.org/#/c/656871/ this code was executed
by run_all.sh in every pass but seems to have been missed as part of
656871's base.yaml split up.

Add service-bridge.yaml to run_all.sh to get these updates applying to
bridge again. In particular things like clouds.yaml updates are missing
otherwise.

Note I've not merged bridge.yaml and service-bridge.yaml as it appears
we want all of the service stuff to happen after base.yaml but
bridge.yaml needs to happen before. I think this is why they were split
in the first place.

Change-Id: I0a7ce1a65cd19459bbaf244b94a23ddde360da1a
2019-07-02 15:04:55 -07:00
James E. Blair a92ac59e15 Fix new mirror system errors
Fix the reported stat name for the mirror playbook.

Run the mirror job in gate.

Set follow=false so that we're telling Ansible to set the perms
on the link rather than the target (which is the default).

Change-Id: Id594cf3f7ab1dacae423cd2b7e158a701d086af6
2019-05-24 09:42:38 -07:00
Clark Boylan 926ba11184 Cleanup bashate errors to make them easier to understand
We ignore E006 which is line lenght longer than 79 characters. We don't
actually care about that. Fix E042 in run_all.sh this represents a
potential real issue in bash as it will hide errors.

This makes the bashate output much cleaner which should make it easier
for people to understand why it fails when it fails in check.

Change-Id: I2249b76e33003b57a1d2ab5fcdb17eda4e5cd7ad
2019-05-23 14:00:37 -07: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
Zuul 2c5847dad9 Merge "Split the base playbook into services" 2019-05-20 10:04:40 +00:00
James E. Blair 8ad300927e Split the base playbook into services
This is a first step toward making smaller playbooks which can be
run by Zuul in CD.

Zuul should be able to handle missing projects now, so remove it
from the puppet_git playbook and into puppet.

Make the base playbook be merely the base roles.

Make service playbooks for each service.

Remove the run-docker job because it's covered by service jobs.

Stop testing that puppet is installed in testinfra. It's accidentally
working due to the selection of non-puppeted hosts only being on
bionic nodes and not installing puppet on bionic. Instead, we can now
rely on actually *running* puppet when it's important, such as in the
eavesdrop job. Also remove the installation of puppet on the nodes in
the base job, since it's only useful to test that a synthetic test
of installing puppet on nodes we don't use works.

Don't run remote_puppet_git on gitea for now - it's too slow. A
followup patch will rework gitea project creation to not take hours.

Change-Id: Ibb78341c2c6be28005cea73542e829d8f7cfab08
2019-05-19 07:31:00 -05:00
Ian Wienand d5b321b074 Handle moved puppet repos
As per [1], it seems puppet has "cleaned up" most of the packages we
are using to install.

Install the puppet-agent packages directly as puppet's archive location
is not a valid repo. With puppet 4 at least these packages should bundle
everything we need including ruby.

[1] https://groups.google.com/forum/#!msg/puppet-users/cCsGWKunBe4/OdG0T7LeDAAJ

Depends-On: https://review.opendev.org/659384
Depends-On: https://review.opendev.org/659395
Change-Id: Ie9e2b79b42f397bddd960ccdc303b536155ce123
2019-05-15 16:03:07 -07:00
Zuul a3dac3913b Merge "Stop running gitea k8s cluster playbooks" 2019-05-08 01:06:50 +00:00
James E. Blair 08c8b2df09 Stop running gitea k8s cluster playbooks
The gitea k8s cluster is not currently in use; don't run playbooks
relating to it.

Change-Id: I87c0dd71b2284ea5e9b580999242e901a8fee235
2019-05-07 16:05:21 -07:00
Ian Wienand 2acfc176b0 Remove graphite.openstack.org
The server has been removed, remove it from inventory.

While we're here, s/graphite.openstack.org/graphite.opendev.org/'
... it's a CNAME redirect but we might as well clean up.

Change-Id: I36c951c85316cd65dde748b1e50ffa2e058c9a88
2019-05-08 05:55:33 +10:00
Clark Boylan c74a4da06e Fix puppet 4 installations
Our old puppet 4 process was to run the install_puppet.sh script to
transition from puppet 3 to puppet 4 but this ran after base.yaml which
enforces a puppet version.

Unfortunately we were enforcing puppet version 3 in the base.yaml
playbook via the puppet-install role which meant base would install
pupept 3 and our upgrade playbook would install puppet 4 in a loop.
Thankfully we run puppet after the upgrade so we were using the puppet
version we wanted.

To fix this needless reinstall loop we do two things. We move the
upgrade playbook before base.yaml so that we upgrade before we enforce a
version. Then we update group vars for the puppet4 group to enforce the
puppet 4 version.

Change-Id: I97ca81ed5331e664f8e2e65b283793f0919f6033
2019-03-08 14:18:28 -08:00
James E. Blair f363ed6dc0 Reduce timeouts in run_all.sh
Most of these playbooks finish much faster than 2 hours.  Set
timeouts which are approximately 3x as long as they are currently
running, rounded to the nearest 10m.

Emit the name of the timer to the log at the end of each run so
that it's more clear which playbook just finished.

Correct the timer name for one of the playbooks.

The k8s cluster deployment playbooks are not yet functional --
run times for those are still unknown.

Change-Id: I43a06baaec908cba7d88c4b0932dcc95f1a9a108
2019-02-13 14:52:59 -08:00
Zuul be5b02d08f Merge "Fix gitea playbooks" 2019-02-12 23:19:27 +00:00
Zuul d3e554e306 Merge "Stop running k8s-on-openstack nested" 2019-02-12 22:22:06 +00:00
James E. Blair 1f1f358c03 Fix gitea playbooks
First, we need an @ before the extra vars files.  Why?  Because
an @ is needed.

Second, the rook playbook was stringing all 4 commands on to one
exec call which was working poorly.  Instead, make 4 tasks so that
it's slightly better represented in ansible output, each of which
has a (presumably) valid command.

Change-Id: I30efe84d2041237a00da0c0aac02afa92d29c0fb
2019-02-12 14:20:02 -08:00
Monty Taylor 0c4a981f73 Stop running k8s-on-openstack nested
The current code runs k8s-on-openstack's ansible in an ansible
task. This makes debugging failures especially difficult.

Instead, move the prep task to update-system-config, which will
ensure the repo is cloned, and move the post task to its own
playbook. The cinder storage class k8s action can be removed from
this completely as it's handled in the rook playbook.

Then just run the k8s-on-openstack playbook as usual, but without
the cd first so that our normal ansible.cfg works.

Change-Id: I6015e58daa940914d46602a2cb64ecac5d59fa2e
2019-02-12 18:17:46 +00:00
James E. Blair ff4532789c Add gitea-cluster extra vars
Since the gitea cluster doesn't appear in any ansible inventory,
we need to create a dedicated file to hold the extra variables.

Change-Id: Ib2365c9204bff549fdc0116243376d6e895f2296
2019-02-11 11:11:46 -08:00
James E. Blair 0e7d6a507c Run the gitea k8s playbooks
We have playbooks to manage the resources in the gitea k8s, run them
from run_all.sh.

Change-Id: If4c8e6d87995d466505e7b78c7d8eb04d17318de
2019-02-06 09:29:39 -08:00
Monty Taylor 9cac3c6b63 Run k8s-on-openstack to manage k8s control plane
The k8s-on-openstack project produces an opinionated kubernetes
that is correctly set up to be integrated with OpenStack. All of the
patches we've submitted to update it for our environment have been
landed upstream, so just consume it directly.

It's possible we might want to take a more hands-on forky approach in
the future, but for now it seems fairly stable.

Change-Id: I4ff605b6a947ab9b9f3d0a73852dde74c705979f
2019-02-05 18:50:31 +00:00
Ian Wienand 97a3ab9bf3 Add statsd metrics for ansible runs
Add some coarse-grained statsd tracking for the global ansible runs.
Adds a timer for each step, along with an overall timer.

This adds a single argument so that we only try to run stats when
running from the cron job (so if we're debugging by hand or something,
this doesn't trigger).  Graphite also needs to accept stats from
bridge.o.o.  The plan is to present this via a simple grafana
dashboard.

Change-Id: I299c0ab5dc3dea4841e560d8fb95b8f3e7df89f2
2018-09-10 14:49:45 +10:00
James E. Blair 008d0044e8 Increase forks to 50
In run_all.sh, increase the number of ansible forks to 50 for most
playbooks in an attempt to speed up the process.

Change-Id: I487605fd3b2d20d7b1f19c40d22018deeae9c112
2018-09-07 10:53:20 -07:00
James E. Blair 89252d9285 Revert "Fix ansible forks env variable"
And revert "Set Ansible forks to 50"

This doesn't seem to have helped, and may have made the run longer.
I suspect a problem with the env var, but let's revert back to the
old value and mechanism (cli flag) to re-establish a baseline,
then we'll change the value of the cli flag.

This reverts commit 8419909571.
This reverts commit 97d8f9d0bf.

Change-Id: I825b2b3db26ce6dd7d70fcc8b33e70b511eb52db
2018-09-06 09:07:36 -07:00
James E. Blair 97d8f9d0bf Fix ansible forks env variable
This is how bash works.

Change-Id: I362ea15e44f8086464fb3aa42c41a51d222391c4
2018-09-05 14:17:17 -07:00
James E. Blair 8419909571 Set Ansible forks to 50
20 is working fine with plenty of ram/cpu to spare, increase to 50
to attempt to speed up the runtime.

The environment variable should be used by default, but the "-f"
option will override that, in the one case where we need it.

Change-Id: Ie6a1d991a346702ec58cd716b0b94af5c93554ac
2018-09-04 14:15:48 -07:00
Monty Taylor 4f9ab4eeb2 Increase the run_all forks count to 20
In testing this on bridge, 20 forks did not appreciably increase the
load average.

Change-Id: Ib571dec0f07e031273dc76a9f364478183b8f578
2018-08-22 01:42:43 +00:00