26 Commits

Author SHA1 Message Date
Clark Boylan
3135018e6b Run zuul project rename steps on a single scheduler
We were using the zuul-scheduler group but there are two schedulers now
and we don't want the zk backups, secret rename, and secret delete to
run twice on two different schedulers. Address this by fixing the rename
playbook to zuul02.opendev.org.

Change-Id: Ic741e97bd4c930cc27db00c2e037dc724a460ef7
2022-01-24 13:07:14 -08:00
Zuul
300982c6c1 Merge "Accomodate zuul's new key management system" 2021-09-01 15:56:40 +00:00
Clark Boylan
630a4531db Add additional post project rename reindexing
If we update group names we should reindex the groups index and I think
that if we update project ACLs we should reindex the project index. Add
these reindexes to the post rename reindexing list. Both should be cheap
compared to the changes reindex.

Change-Id: I7f855c5ad52c072f77d109ae372d93f3fc49c784
2021-08-11 14:59:25 -07:00
Clark Boylan
e5732b6137 Accomodate zuul's new key management system
Zuul is changing the way its key management system work from implicit
"backups" to explicit exports that can be used for backups. Additionally
to rename projects we will need to update those keys in zk which can be
done with copy and delete commands. We update the rename playbook to use
these.

Depends-On: https://review.opendev.org/c/zuul/zuul/+/803973
Change-Id: I2ba8015392f22ea615bcba7fb0d73a138dc77034
2021-08-09 14:45:49 -07:00
Clark Boylan
0d36fac5fe Use the gitea api in the gitea renaming playbook
Previously we were hacking the gitea web ui to transfer repo ownership
and to rename repos within an org. We believe this was necessary because
there was no REST API ability to do this. Now we have the ability to do
this via the REST API and in addition a new Gitea release will break our
web ui hijacking.

Update the project renaming playbook to use the REST API as it is
simpler to use and should be more reliable over time as it is versioned.

Change-Id: Idd8326a4891df6bdd47422e2a73880aa053380f5
2021-08-03 08:47:16 -07:00
Clark Boylan
d504604b0c Test the rename_repos playbook
It would be useful to test our rename playbook against gitea and gerrit
when we make changes to these related playbooks, roles, and docker
images. To do this we need to converge our test and production setups
for gerrit a bit more. We create an openstack-project-creator account in
the test gerrit to match prod and we have rename_repos.yaml talk to
localhost for gerrit ssh commands.

With that done we can run the rename_repos.yaml playbook from
test-gitea.yaml and test-gerrit.yaml to help ensure the playbook
functions as expected against these services.

Co-Authored-By: Ian Wienand <iwienand@redhat.com>
Change-Id: I49ffaf86828e87705da303f40ad4a86be030c709
2021-07-28 08:33:55 -07:00
Jeremy Stanley
0991ec62be Stop updating Gerrit RDBMS for repo renames
The version of Gerrit we're running no longer keeps account and
project details in an SQL database, so drop the tasks from our
rename playbook related to this.

Change-Id: I4b11b627a1285617496ca7b53f9b7e3f8251630c
2021-06-24 17:01:43 +00:00
Clark Boylan
9011096d49 Stop managing gerrit's local git mirror dir
We stopped serving this content and the next step is to stop managing it
internally. This depends on a change to jeepyb that makes the local git
dir management on the jeepyb side optional. Once that lands we can
update our configs to tell jeepyb to stop managing it.

We also stop doing garbage collection, mounting it into containers that
don't need it, etc.

Depends-On: https://review.opendev.org/758597
Change-Id: I2185e90edfcac71941bc29a4e11b7b2d4c7c2e13
2020-10-16 09:41:07 -07:00
James E. Blair
4a9f1f53b8 Fix rename playbook after zuul user rename
We changed the zuul user on the scheduler, but the rename playbook
was referencing the old name.

Change-Id: Ic6ee9286d3d76c23ddf7c54dd2efd11c6e45b65d
2020-06-12 14:21:33 -07:00
James E. Blair
f60fa8b5d1 Correct vars indentation error in rename playbook
The vars section is too indendented.

The start playbook is not needed.

Change-Id: Idc9b5a0cb203bb67bb3ff524d8da06b4d6ec626f
2020-03-21 11:48:16 -05:00
Monty Taylor
2b69ad45ba Don't run gerrit init on restart
We don't need to do this when we're restarting, only when we're
installing or starting for the first time.

Change-Id: If80daa5366c56e5f966c499afea4dc7b3421e79f
2020-03-20 08:56:26 -05:00
Monty Taylor
3205133c8a Update gerrit rename playbook for docker-compose
Starting and stopping gerrit is now done by our new docker-compose
overlord. Update the rename playbook to use it for stopping at
the beginning, and then use the start tasks of the gerrit role
to start it at the end.

Change-Id: Ibd07f9269771dfa70fbefbba69b905f165e018af
2020-03-20 07:27:59 -05:00
Clark Boylan
3f1d5ccdde More repo rename playbook fixes
These fixes were either missed by the omnibus or introduced by new
changes since the big opendev migration.

Change-Id: I58e2b2c93567b47b161fdbbf143ff58738a577b8
2019-05-31 09:07:26 -07:00
Jeremy Stanley
4f117bcecc Project renames include keys on zuul scheduler
Add tasks to the rename_repos utility playbook for moving the
per-project secrets and ssh keys on the zuul scheduler's filesystem,
creating new namespace parent directories if they don't already
exist.

Change-Id: Iccce53953d5829bd4eb5fe4c33c9d2f195ae825c
2019-05-30 16:17:28 +00:00
Zuul
509ec18dc9 Merge "Omnibus rename repo playbook fixes" 2019-05-23 18:17:00 +00:00
Monty Taylor
e69c7b7fb9 Rename review.openstack.org to review.opendev.org
There are many references to review.openstack.org, and while the
redirect should work, we can also go ahead and fix them.

Change-Id: I28f398796a6392a3dffea1d25cfe2ae3a36a3589
2019-05-09 14:38:51 +00:00
Clark Boylan
8ef8d900e2 Omnibus rename repo playbook fixes
During the great opendev git migration we ran into a number of issues
with out existing renaming playbook. This attempts to capture the lot of
them and includes:

  - Fixing mysql configuration file paths
  - Set mysql defaults file arg before database name
  - Use storyboard group instead of hostname
  - Run storyboard db update against storyboard-dev too
  - Create the new org dirs on review.opendev.org before moving repos
  - Create new orgs in gitea before moving repos
  - Use https when talking to gitea instead of http (to avoid problems
    with redirects)

Details at our etherpad here:
  https://etherpad.openstack.org/p/the-great-opendev-git-migration

Change-Id: I5f8ed779b3f1186c2ec540730f6b4f5f51a5016c
2019-04-24 08:56:16 -07:00
James E. Blair
7da7002dc1 Add gitea to project rename playbook
Change-Id: Idca623ff59f3318c762ffd5c65e3c739fac819af
Story: 2004627
Task: 29706
2019-03-01 09:30:46 -08:00
Monty Taylor
ab32644b57
Add .gerrit_db.cfg to project rename playbook
We need to tell mysql where the file with the credentials is.

Change-Id: I185fd83f187c94074a163565f2328e754b785b50
2018-08-03 11:44:06 -05:00
Paul Belanger
ce15361a28
Switch to hostgroup review for puppet_run_all playbooks
Because we changed out the hostname of review.o.o for review01.o.o our
current playbooks will be broken. To fix this moving forward, we can
just switch to the group 'review' which includes the review01.o.o
host.

Change-Id: I149eacbc759f95087f2b0a0e44fcf0b49cae7ad6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-05-02 17:30:51 -04:00
Monty Taylor
3cfeaadbd8
Add online reindex tasks to project rename playbook
At the end, we have online reindex tasks we need to perform. Add them to
the playbook.

Change-Id: I4564facd617975b9bcb9df3a22eb2da8c77847c5
2018-03-23 12:05:53 -05:00
Monty Taylor
11d70a1398
Add names to rename playbook tasks
When running the playbook, it's not immediately clear which task is
running without names. Add names. Also, update the whitespace to be more
in-line with how we write playbooks for zuul.

Change-Id: Ia189b8da6ded882aeb1fcff4932a1f9586027f80
2018-03-23 12:05:37 -05:00
Monty Taylor
fc4511d881
Remove additional dead jenkins related code
We don't need a clean workspaces playbook, nor do we need to do anything
with that during renames. We don't need to reference machines that don't
exist in ansible groups. The launcher ssh config is not used by
anything.

Change-Id: Id3e9cddb06b6e47b6f07d9a39086f3b054b46bde
2017-12-19 15:07:06 -06:00
Paul Belanger
a08424387e Run ansible-lint on playbooks
This fixes the issues we have with our rename_repos.yaml file. We are
also skipping additional failures for now, which will be cleaned up in
a follow up patch.

Change-Id: I726535e195a292e3f2d457f0ed039d01bb96c66b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-01-12 15:32:46 -05:00
Jeremy Stanley
65ed837e31 Update project rename instructions
When I919ba42b0d22126719daa7ad308f75ce021720b7 merged, it introduced
a few regressions into our process:

  * Github renaming/transferring was dropped

  * Switched to a very slow (for our environment) Zuul stopping
    method

  * it advocated for composing a rename parameters file very late
    in the process

This change fixes the above issues. It also updates the
documentation to note that Puppet should be stopped well in advance
of the maintenance window, and updates the playbook to no longer run
an offline Gerrit reindex (since online reindexing is now
supported).

Change-Id: Ie249214c0d1b1df6c66d4910002e35d8c17c3b69
2016-11-22 13:41:56 -08:00
Monty Taylor
2b4ece5fb7 Add an ansible playbook for project renames
There are still a few manual tasks, but this takes care of the vast
majority of them.

Change-Id: I919ba42b0d22126719daa7ad308f75ce021720b7
2015-11-01 01:33:33 +00:00