-
-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Labels
change-requestRequest a change on Haiku's infrastructureRequest a change on Haiku's infrastructure
Description
Description
Update HaikuDepot to version 1.0.173
- implement new postgres based data storage system for job data (configured off for now)
- implement new notify / listen system with postgres for future active:active deployment in k8s
- update translators list
- upgrade to debian 12.11 base image
Note that the release contains a database migration.
How has the change been tested
- Dev-tested by the HaikuDepot dev.
- Automated tests run by the Github action: here
Steps to implement the change
Note: Please mark changes from the default steps below in bold
- Verify that the images are available in the package repositories;
- Scale down
haikudepotserverDeployment and start a job to back up the database:$ kubectl scale deploy haikudepotserver --replicas=0 $ kubectl create job --from=cronjob/haikudepotserver-pgbackup haikudepotserver-pgbackup-manual-(VERSION) - Monitor the job to make sure it finishes correctly:
$ kubectl logs -f jobs/haikudepotserver-pgbackup-manual-(VERSION) Backup haikudepotserver... gpg: directory '/root/.gnupg' created gpg: keybox '/root/.gnupg/pubring.kbx' created Added `s3remote` successfully. `/tmp/haikudepotserver_2023-08-06.sql.xz.gpg` -> `s3remote/haiku-backups/pg-haikudepotserver/haikudepotserver_2023-08-06.sql.xz.gpg` Total: 0 B, Transferred: 245.32 MiB, Speed: 86.05 MiB/s Snapshot of haikudepotserver completed successfully! (haiku-backups/pg-haikudepotserver/haikudepotserver_2023-08-06.sql.xz.gpg) - Apply any pre-deployment configuration changes (see section Configuration Changes)
- Update the version in the infrastructure repository in
deployments/haikudepotserver.ymlfor;Deploymentwith namehaikudepotserverDeploymentwith namehaikudepotserver-server-graphics
- Apply the update to the server:
$ kubectl apply -f deployments/haikudepotserver.yml - Apply any post-deployment configuration changes (see section Configuration Changes)
- Post-deployment checks (is the web service responding, can you refresh the data using the HaikuDepot app)
- Commit and push the updated deployment configuration to GitHub.
- Announce the update on the
haiku-sysadminandhaikumailing list.
Configuration Changes
Please list any configuration changes, and note whether they need to be done pre-deploy or post-deploy
None
Rollback Plan
If the update is unsuccessful, the rollback can be executed as follows.
If there has been a (failed) database migration as part of the change, the backup created in step 2 must be restored. If the database has not been affected, then skip to the image rollback steps below.
- Stop all instances of haikudepotserver
$ kubectl scale deploy haikudepotserver --replicas=0 - Prepare the restore job in
deployments/other/restore-pg.ymlby making sure the container args point to the haikudepotserver containerargs: ["restore", "haikudepotserver"] - Restore the database by executing the following commands.
$ kubectl exec -it deployment/postgres -- dropdb -U postgres haikudepotserver $ kubectl exec -it deployment/postgres -- createdb -U postgres -O haikudepotserver haikudepotserver $ kubectl apply -f deployments/other/restore-pg.yml # follow and validate the output of the following command. If the command completes, the restore is done. $ kubectl logs --follow jobs/restore # cleanup $ kubectl delete job/restore $ git checkout deployments/other/restore-pg.yml - Roll back the image with the following commands:
$ git restore deployments/haikudepotserver.yml $ kubectl apply -f deployments/haikudepotserver.yml - Do sense checks in the logs and by some exploratory production testing to validate that the restore has been successful.
Metadata
Metadata
Assignees
Labels
change-requestRequest a change on Haiku's infrastructureRequest a change on Haiku's infrastructure