Page MenuHomePhabricator

Re-create GitLab test instance
Closed, ResolvedPublic

Description

I accidentally deleted the GitLab test instance at https://gitlab.devtools.wmcloud.org when fighting with horizon.

We should recreate a new instance at some point to be able to test scripts, changes and upgrades independent from the production infrastructure.

There is a gitlab-prod-backup volume in WMCS which should contain some backups.

We should use the opportunity to at least clean up the WMCS setup a bit, currently its quite messy.

Useful links:
https://wikitech.wikimedia.org/wiki/GitLab/Test_Instance#Setup_new_test_instances
https://phabricator.wikimedia.org/T302976

Event Timeline

Jelto triaged this task as Medium priority.
Jelto moved this task from Incoming to Work in Progress on the collaboration-services board.

I created a new instance gitlab-1001 in devtools. But I can not attache the volume with the backups because this volume is still stuck to the old instance. I opened T396739: Volume is stuck to deleted instance in devtools project to unblock this.

Jelto changed the task status from Stalled to Open.Jun 24 2025, 6:59 AM

The volume is available again and attached to the new test instance, I'll proceed setting up the test instance.

Change #1163774 had a related patch set uploaded (by Jelto; author: Jelto):

[operations/puppet@production] gitlab: disable second sshd on test instance

https://gerrit.wikimedia.org/r/1163774

Change #1163774 merged by Jelto:

[operations/puppet@production] gitlab: disable second sshd on test instance

https://gerrit.wikimedia.org/r/1163774

I was able to re-create the test instance at https://gitlab.devtools.wmcloud.org/ using the backup which was stored on the backup volume. I had to downgrade the GitLab package to match the version of the backup.

https://gitlab.devtools.wmcloud.org/explore shows at least some repositories, puppet is happy and the network/VIP setup is much easier by dropping the second sshd (see change above).

Login/OIDC seems broken, runners have to be registered again (T397641), some tokens have to be updated and I have to update the docs.

Login/OIDC seems broken

The test instance used the gitlab_replica_oidc identifier instead of the proper gitlab_oidc identifier because test instance thought it was a replica. I've set profile::gitlab::active_host: gitlab-1001.devtools.eqiad1.wikimedia.cloud properly. I'll add that to the docs. Login works now!

Change #1164222 had a related patch set uploaded (by Jelto; author: Jelto):

[operations/puppet@production] devtools: update hiera config for new bookworm hosts

https://gerrit.wikimedia.org/r/1164222

Change #1164222 merged by Jelto:

[operations/puppet@production] devtools: update hiera config for new bookworm hosts

https://gerrit.wikimedia.org/r/1164222

Change #1164389 had a related patch set uploaded (by Jelto; author: Jelto):

[operations/puppet@production] gitlab: disable nftables prometheus exporter script in wmcs

https://gerrit.wikimedia.org/r/1164389

Change #1164389 merged by Jelto:

[operations/puppet@production] gitlab: disable nftables prometheus exporter script in wmcs

https://gerrit.wikimedia.org/r/1164389

Change #1164944 had a related patch set uploaded (by Jelto; author: Jelto):

[operations/puppet@production] gitlab: fix typo in hiera config

https://gerrit.wikimedia.org/r/1164944

Change #1164944 merged by Jelto:

[operations/puppet@production] gitlab: fix typo in hiera config

https://gerrit.wikimedia.org/r/1164944

Change #1164965 had a related patch set uploaded (by Jelto; author: Jelto):

[operations/puppet@production] gitlab: pass ensure flag to auto_restarts::service

https://gerrit.wikimedia.org/r/1164965

Change #1164965 merged by Jelto:

[operations/puppet@production] gitlab: pass ensure flag to auto_restarts::service

https://gerrit.wikimedia.org/r/1164965

I'll resolve this task, the test instance is up and running again and I simplified the setup a bit and fixed some bugs in puppet (see changes above).