245 Commits

Author SHA1 Message Date
Ian Wienand
efdaa9a12a Add OSU OSL to nodepool configuration
Change-Id: Id97345595a4463617bc1a93675d35e32cfff7d08
2021-04-14 12:34:06 +10:00
Zuul
c2ba9ae565 Merge "Add zuul keystore password" 2021-04-13 17:15:09 +00:00
Ian Wienand
81db207d33 all-clouds: add OSU OSL project_id as well
Otherwise you get

 BadRequest: Expecting to find domain in project - the server could
 not comply with the request since it is either malformed or otherwise
 incorrect. The client is assumed to be in error.

Change-Id: If8869fe888c9f1e9c0a487405574d59dd3001b65
2021-04-13 13:31:49 +10:00
James E. Blair
4505baf9f9 Add zuul keystore password
This matches the proposal in https://review.opendev.org/785972

It's safe to merge now (secret storage on bridge is updated) and get
ahead of the curve.  It's harmless to add unused items.

Change-Id: I942ef5f95f9f1afe39b7d9a044276bfb338d6760
2021-04-12 14:58:07 -07:00
Ian Wienand
28ffbfb12c Add OSUOSL cloud
The Oregon State University Open Source Lab (OSUOSL;
https://osuosl.org/) has kindly donated some ARM64 resources.  Add
initial cloud config.

Change-Id: I43ed7f0cb0b193db52d9908e39c04e351b3887e3
2021-04-12 09:31:51 +10:00
Jeremy Stanley
fd98a1750d Clean up OpenEdge configuration
The OpenEdge cloud has been offline for five months, initially
disabled in I4e46c782a63279d9c18ff4ba2944c15b3027114b, so go ahead
and clean up lingering references. If it is restored later, this can
be reverted fairly easily.

Depends-On: https://review.opendev.org/783989
Depends-On: https://review.opendev.org/783990
Change-Id: I544895003344bc8202363993b52f978e1c07d061
2021-03-31 01:42:36 +00:00
Zuul
3180086559 Merge "Rename refstack group variables" 2021-03-29 21:33:02 +00:00
Ian Wienand
9f11fc5c75 Remove references to review-dev
With our increased ability to test in the gate, there's not much use
for review-dev any more.  Remove references.

Change-Id: I97e9865e0b655cd157acf9ffa7d067b150e6fc72
2021-03-24 11:40:31 +11:00
Ian Wienand
aa94f2d831 Rename refstack group variables
When we cleaned up the puppet in
I6b6dfd0f8ef89a5362f64cfbc8016ba5b1a346b3 we renamed the group
s/refstack-docker/refstack/ but didn't move the variables and some
other references too.

Change-Id: Ib07d1e9ede628c43b4d5d94b64ec35c101e11be8
2021-03-19 16:01:46 +11:00
Ian Wienand
c1aff2ed38 kerberos-kdc: role to manage Kerberos KDC servers
This adds a role and related testing to manage our Kerberos KDC
servers, intended to replace the puppet modules currently performing
this task.

This role automates realm creation, initial setup, key material
distribution and replica host configuration.  None of this is intended
to run on the production servers which are already setup with an
active database, and the role should be effectively idempotent in
production.

Note that this does not yet switch the production servers into the new
groups; this can be done in a separate step under controlled
conditions and with related upgrades of the host OS to Focal.

Change-Id: I60b40897486b29beafc76025790c501b5055313d
2021-03-17 08:30:52 +11:00
Ian Wienand
d33ce951c0 refstack: use CNAME for production server
The production server is trying to send itself to
refstack01.openstack.org, causing cross-site scripting issues.  In
production, use the CNAME, but use the FQDN for testing.

Fix up job file matchers while here.

Change-Id: I18a5067ee25c59c5eaa17b7c2d9bd5a942a9173d
2021-03-12 10:24:06 +11:00
Zuul
4d85fc521a Merge "Use dstat to record performance of system-config-run hosts" 2021-02-23 00:13:59 +00:00
Zuul
1b2435c349 Merge "backups: remove all bup" 2021-02-21 22:41:41 +00:00
Clark Boylan
1560b01f7e Use dstat to record performance of system-config-run hosts
We have seen some poor performance from gitea which may be related to
manage project updates. Start a dstat service which logs to a csv file
on our system-config-run job hosts in order to collect performance info
from our services in pre merge testing. This will include gitea and
should help us evaluate service upgrades and other changes from a
performance perspective before they hit production.

Change-Id: I7bdaab0a0aeb9e1c00fcfcca3d114ae13a76ccc9
2021-02-16 14:31:30 -08:00
Ian Wienand
39ffc685d6 backups: remove all bup
All hosts are now running thier backups via borg to servers in
vexxhost and rax.ord.

For reference, the servers being backed up at this time are:

 borg-ask01
 borg-ethercalc02
 borg-etherpad01
 borg-gitea01
 borg-lists
 borg-review-dev01
 borg-review01
 borg-storyboard01
 borg-translate01
 borg-wiki-update-test
 borg-zuul01

This removes the old bup backup hosts, the no-longer used ansible
roles for the bup backup server and client roles, and any remaining
bup related configuration.

For simplicity, we will remove any remaining bup cron jobs on the
above servers manually after this merges.

Change-Id: I32554ca857a81ae8a250ce082421a7ede460ea3c
2021-02-16 16:00:28 +11:00
Clark Boylan
9b90e192b1 Run gerrit 3.2 and 3.3 functional tests
This change splits our existing system-config-run-review job into two
jobs, one for gerrit 3.2 and another for 3.3. The biggest change is that
we use a var called zuul_test_gerrit_version to select which version we
want and that ends up in the fake group file written out by Zuul for the
nested ansible run. The nested ansible run will then populate the
docker-compose file with the appropriate version for us.

Change-Id: I00b52c0f4aa8df3ecface964007fcf5724887e5e
2021-02-10 15:10:46 -08:00
Zuul
449cabeb46 Merge "refstack: move non-private variables to public" 2021-02-10 00:37:27 +00:00
James E. Blair
e58a18d8a1 Stop running ansible-lint on this repo
It is buggy (throwing exceptions for undefinied variables which are
actualyl defined via set_fact), and we frequently run into problems
using it in this repo.  It was designed to lint roles for Galaxy,
not the way we write ansible.  As of the 5.0.0 release it's
generating >4.5K lines of complaints about files in this repository.

Change-Id: If9d8c19b5e663bdd6b6f35ffed88db3cff3d79f8
2021-02-09 22:08:38 +00:00
Ian Wienand
5a7511f6a6 refstack: move non-private variables to public
These two variables can be deployed via system-config

Change-Id: If696945d7b01ee42eb822d2391405277eb6c23d3
2021-02-10 07:10:39 +11:00
Zuul
f526060e39 Merge "Deploy refstack with ansible docker" 2021-02-09 03:58:22 +00:00
Clark Boylan
a4604ae0b3 Deploy refstack with ansible docker
This adds a dockerfile to build an opendevorg/refstack image as well as
the jobs to build and publish it.

Change-Id: Icade6c713fa9bf6ab508fd4d8d65debada2ddb30
2021-02-05 19:23:34 +00:00
Clark Boylan
469153d820 Use patch instead of sed to update Gerrit's x/ route
We modify the x/ route to ensure we can serve git repos from x/.
Previously we had been using sed which is likely to be much more fragile
than patch. Patch will detect conflicts and other errors which would be
good for us to find out about early.

Change-Id: Ic324c7777e7851a6150e4415338c4628ac710970
2021-01-28 08:51:12 -08:00
Ian Wienand
738b4ba739 gerrit: Install zuul-summary-results plugin
This installs the zuul-summary-results plugin into our gerrit
container.  testinfra is updated to take a screenshot of the plugin in
action.

Change-Id: Ie0a165cc6ffc765c03457691901a1dd41ce99d5a
2021-01-18 07:58:23 -08:00
Ian Wienand
951c2f4cde gerrit: get files from bazel build dir
bazel likes to build everything in ~/.cache and then symlink bazel-*
"convience symlinks" in the workspace/build directory.  This causes a
problem for building docker images where we run in the context of the
build directory; docker will not follow the symlinks out of build
directory.

Currently the bazelisk-build copies parts of the build to the
top-level; this means the bazelisk-build role is gerrit specific,
rather than generic as the name implies.

We modify the gerrit build step to break build output symlink and move
it into the top level of the build tree, which is the context the
docker build runs in later.  Since this is now just a normal
directory, we can copy from it at will there.

This is useful in follow-on builds where we want to start copying more
than just the release.war file from the build tree, e.g. polygerrit
plugin output.

While we're here, remove the javamelody things that were only for 2.X
series gerrit, which we don't build any more.

[1] https://docs.bazel.build/versions/master/output_directories.html

Change-Id: I00abe437925d805bd88824d653eec38fa95e4fcd
2021-01-18 07:58:23 -08:00
Ian Wienand
e80893eb3d bazelisk-build: specify targets as list
Specify bazelisk_targets as a list, and join the targets as
space-separated in the build command.  This is used in the follow-on
Ie0a165cc6ffc765c03457691901a1dd41ce99d5a.

While we are here, remove the build-gerrit.sh script that isn't used
any more, along with the step that installs it.

Also, refactor the tasks to use include_role (this is also used in the
follow on).

Change-Id: I4f3908e75cbbb7673135a2717f9e51f099a4860e
2021-01-18 07:58:23 -08:00
Ian Wienand
1858f15a8a gerrit: move plugins to common code
The "additional_plugins" variable is so different builds gerrit can
specify additional plugins specific to their version to install into
the base image.

Since we've moved to only building 3.2 and master images, a bunch of
plugins that used to be additional (because they weren't 2.XX era) are
now common.  Move them into the common plugin code in the playbook,
and leave the only one different for master, the "checks" plugin, as
separate.

Change-Id: I8966ed7b5436fbe012486dccc1028bc8cb1cf9e4
2021-01-18 07:58:23 -08:00
Ian Wienand
d1694d4c98 gerrit: Initalize in testing
By setting the auth type to DEVELOPMENT_BECOME_ANY_ACCOUNT and passing
--dev to the init process, gerrit will create an initial admin user
for us.  We leverage this user to create a sample project, change,
Zuul user and sample CI result comment.

We also update testinfra to take some screenshots of gerrit and report
them back.

Change-Id: I56cda99790d3c172e10b664e57abeca10efc5566
2021-01-18 07:58:23 -08:00
Ian Wienand
be085e564e run-selenium: run selenium on a node
This runs selenium from a container on a node, and exposes port 4444
so you can issue commands to it.  This is used in the follow-on
I56cda99790d3c172e10b664e57abeca10efc5566 to take some screenshots of
gerrit.

Change-Id: Idcbcd9a8f33bd86b5f3e546dd563792212e0751b
2021-01-18 07:58:23 -08:00
Ian Wienand
595dfd1166 system-config-run-review: remove review-dev server
We don't need to test two servers in this test; remove review-dev.
Consensus seems to be this was for testing plans that have now been
superseded.

Change-Id: Ia4db5e0748e1c82838000c9b655808c3d8b74461
2020-12-15 11:09:17 +11:00
Paladox
d7b726140d Add an OpenDev theme into our Gerrit image
This provides an HTML-only PolyGerrit plugin consistent with our
Gitea theming, generously provided by Paladox (many thanks!).

Since we have to split some roles in the build playbook, also name
the temporary patching role to make the build console a little
easier to read.

Change-Id: I3baf17d04b2dca34fc23dcab91c00544cedf0ca6
2020-12-04 18:01:11 +00:00
Clark Boylan
70ef807b3e Update gerrit docker image to java 11
Gerrit 3.2 supports java 11 now and Gerrit 3.3 will be the last to
support java 8. Lets get ahead of things and switch to java 11.

Change-Id: I1b2f6b1bdadad10917ef5c56ce77f7d7cfc8625d
2020-12-02 18:34:07 +00:00
Zuul
d755c64080 Merge "Remove reviewdb config from Gerrit" 2020-11-22 22:58:04 +00:00
Clark Boylan
1ccf5e68e5 Remove reviewdb config from Gerrit
This should only land once we are on Gerrit 3.x and happy with it. But
at this point the mysql reviewdb will not be used anymore and config for
it can be removed. We keep general mysql things like tools and backups
in place as the accountPatchReviewDb continues to live in MySQL.

This also comments out calls to jeepyb's welcome-message,
update-blueprint and update-bug entrypoints from the patchset-created
event hook, since they rely on database connections for the moment.
Calls to update-bug in change-abandoned and change-merged event
hooks are retained as those code paths don't rely on database
interaction nor attempt to load the removed configuration.

Change-Id: I6e24dbb223fd3f76954db3dd74a03887cf2e2a8b
2020-11-22 17:53:49 +00:00
Clark Boylan
01dab90bc1 Handle x/ prefix projects on gerrit 3.2
Gerrit seems to handle x/ for plugin extensions in polygerrit.
Unfortunately we've got projects called x/* and that breaks cloning of
these projects. Lets just avoid that for nwo until we can do a rename.

Change-Id: Id01739725c22af9d02ac30b1653743b49a35a332
2020-11-21 13:58:34 -08:00
Ian Wienand
368466730c Migrate codesearch site to container
The hound project has undergone a small re-birth and moved to

 https://github.com/hound-search/hound

which has broken our deployment.  We've talked about leaving
codesearch up to gitea, but it's not quite there yet.  There seems to
be no point working on the puppet now.

This builds a container than runs houndd.  It's an opendev specific
container; the config is pulled from project-config directly.

There's some custom scripts that drive things.  Some points for
reviewers:

 - update-hound-config.sh uses "create-hound-config" (which is in
   jeepyb for historical reasons) to generate the config file.  It
   grabs the latest projects.yaml from project-config and exits with a
   return code to indicate if things changed.

 - when the container starts, it runs update-hound-config.sh to
   populate the initial config.  There is a testing environment flag
   and small config so it doesn't have to clone the entire opendev for
   functional testing.

 - it runs under supervisord so we can restart the daemon when
   projects are updated.  Unlike earlier versions that didn't start
   listening till indexing was done, this version now puts up a "Hound
   is not ready yet" message when while it is working; so we can drop
   all the magic we were doing to probe if hound is listening via
   netstat and making Apache redirect to a status page.

 - resync-hound.sh is run from an external cron job daily, and does
   this update and restart check.  Since it only reloads if changes
   are made, this should be relatively rare anyway.

 - There is a PR to monitor the config file
   (https://github.com/hound-search/hound/pull/357) which would mean
   the restart is unnecessary.  This would be good in the near and we
   could remove the cron job.

 - playbooks/roles/codesearch is unexciting and deploys the container,
   certificates and an apache proxy back to localhost:6080 where hound
   is listening.

I've combined removal of the old puppet bits here as the "-codesearch"
namespace was already being used.

Change-Id: I8c773b5ea6b87e8f7dfd8db2556626f7b2500473
2020-11-20 07:41:12 +11:00
Ian Wienand
77eb5dfb66 reprepro: install keytab
In converting this to ansible I forgot to install the reprepro keytab.
The encoded secret has been added for production.

Change-Id: I39d586e375ad96136cc151a7aed6f4cd5365f3c7
2020-10-27 15:14:47 +11:00
Zuul
4ed23af8fe Merge "Build images for gerrit 3.1 and 3.2" 2020-10-07 21:57:43 +00:00
Clark Boylan
1008a1fc90 Build images for gerrit 3.1 and 3.2
This will allow us to test further gerrit upgrades while we sort out how
far into the gerrit releases we will be upgrading to on our next
upgrade.

Change-Id: Ic9d07b76e41ad4262cc0e2e1ff8a5d554f88239e
2020-10-06 15:37:06 -07:00
Zuul
f3bbc8171f Merge "gitea: fix 3081 proxy" 2020-10-06 20:55:00 +00:00
Zuul
083e8b43ea Merge "Add borg-backup roles" 2020-10-01 07:36:47 +00:00
Ian Wienand
b386dbd631 gitea: fix 3081 proxy
The Apache 3081 proxy allows us to do layer 7 filtering on incoming
requests.  However, it was returning 502 errors because it proxies to
https://localhost and the certificate doesn't match (see
SSLProxyCheckPeerName directive).  However, we can't use the full
hostname in the gate because our self-signed certificate doesn't cover
that.

Add a variable and proxy to localhost in the gate, and the full
hostname in production.  This avoids us having to turn off
SSLProxyCheckPeerName.

Change-Id: Ie12178a692f81781b848beb231f9035ececa3fd8
2020-09-25 08:37:17 +10:00
Zuul
c0d75862c4 Merge "Collect tox logs" 2020-09-10 01:18:54 +00:00
Zuul
c4781984c9 Merge "run-base-post: fix ARA artifact link" 2020-09-09 03:09:34 +00:00
Ian Wienand
06c5fc8d4b Collect tox logs
Collect the tox logs from the testinfra run on bridge.openstack.org.
The dependent change helps if we have errors installing things into
tox, and this change lets us see the results.

Depends-On: https://review.opendev.org/747325
Change-Id: Id3c39d4287d7dc9705890c73a230b1935d349b9f
2020-08-25 08:41:49 +10:00
Ian Wienand
6c32bc8bda run-base-post: fix ARA artifact link
Change-Id: Icf05947bbc3268402c2ee0bd62ff30d6cb7757e9
Depends-On: https://review.opendev.org/747100
2020-08-20 14:12:46 +10:00
Clark Boylan
dff18bac1b Convert ssh keys for ruby net-ssh if necessary
In our beaker rspec testing we ssh into localhost pretending it is a
managed VM because that is how all the config management testing tools
want to work... This is has run into problems with new format ssh keys
which zuul provides. If such a key is present we convert it to PEM
othrewise we generate our own.

Also add ensure-virtualenv to the job as we appear to need it to run
these tests properly.

Change-Id: Ibb6080b5a321a6955866ef9b847c4d00da17f427
2020-08-19 16:28:08 -07:00
Clark Boylan
e97d031d68 Couple of gerritbot role cleanups
Change restart mode to always instead of 'no' as testing shows we won't
restart in a loop in CI and we want production to restart automatically.
Also add ssh pubkey contents for completeness and simplicity if we need
to find those in the future.

Change-Id: I81573a1ad1574419194eb3088070dda95fb81fff
2020-08-10 10:42:20 -07:00
Clark Boylan
506a11f9d2 Add ansible role to manage gerritbot
This new ansible role deploys gerritbot with docker-compose on
eavesdrop.openstack.org. This way we can run it where the other bots
live.

Testing is rudimentary for now as we don't really want to connect to a
production gerrit and freenode. We check things the best we can.

We will want to coordinate deployment of this change with disabling the
running service on the gerrit server.

Depends-On: https://review.opendev.org/745240
Change-Id: I008992978791ff0a38f92fb4bc529ff643f01dd6
2020-08-07 13:20:18 -07:00
Clark Boylan
5fa69476c4 Continue to add_host here even though we do it in base-jobs
We need to add host (and possibly the ssh host key so its here too) in
this playbook because the add_host from the base-jobs side is only
applicable to the playbook running in base-jobs. When we start our
playbook here that state is lost. Simple fix, just add_host it again.

Change-Id: Iee60d04f0232500be745a7a8ca0eac4a6202063d
2020-07-24 15:15:52 -07:00
Zuul
3748d6af1c Merge "Use infra-prod-base in infra-prod jobs" 2020-07-24 22:01:56 +00:00