I'm editing this description because I think we should do this in a way that's more akin to what we'll do with prod. So, try it this way:
Doing it the usual way, deploy the staging environment from the master branch of my fork (make sure it's up to date).
Let the full provision run (including the reboots) then login to Jenkins and make sure the first macOS slave is connected. The 2nd one shouldn't exist yet.
Now switch to this new_macos_slave branch.
Provision the macOS slaves by running make provision-from_external-rust_slave-macos-high_sierra-x86_64-staging-aws or make provision-from_internal-rust_slave-macos-high_sierra-x86_64-staging-aws if you're running from the office.
Run make env-jenkins-staging-aws from this branch.
SSH to the Bastion.
Make sure that the safe-build-infrastructure directory on the Bastion is now set to this branch and not master.
Edit ansible/roles/jenkins-master/tasks/main.yml and change the hour of the cron job for backup task.
Provision the environment with make provision-jenkins-staging-aws-reprovision.
Wait for this to complete.
From the Bastion, SSH to the haproxy machine and change to the root user with sudo su -
Run wg-quick down wg0 && wg-quick up wg0 to get WireGuard to pick up the new macOS slave peer.
Run wg show all a few times and wait for it to show all the peers are properly connected with their endpoints discovered.
Log in to Jenkins.
Re-apply CASC by going to Manage Jenkins -> Configuration As Code -> Apply New Configuration.
Setup the SSH service as per the README.
Wait for the cron job to kick off.
Wait for 2 - 5 minutes for the macOS slaves to fully reconnect.
Acceptance Critiera:
The environment should be created with no errors.
The environment should be provisioned with no errors.
Jenkins should show both macOS slaves as connected.
When the backup runs and Jenkins restarts, both macOS slaves should reconnect.
Hi Stephen,
I'm editing this description because I think we should do this in a way that's more akin to what we'll do with prod. So, try it this way:
master
branch of my fork (make sure it's up to date).new_macos_slave
branch.make provision-from_external-rust_slave-macos-high_sierra-x86_64-staging-aws
ormake provision-from_internal-rust_slave-macos-high_sierra-x86_64-staging-aws
if you're running from the office.make env-jenkins-staging-aws
from this branch.make provision-jenkins-staging-aws-reprovision
.sudo su -
wg-quick down wg0 && wg-quick up wg0
to get WireGuard to pick up the new macOS slave peer.wg show all
a few times and wait for it to show all the peers are properly connected with their endpoints discovered.Acceptance Critiera: