JobTech infrastructure
How to deploy the JobTech Taxonomy API in the various deployment environments. To be eligible for deployment to production a version needs to first have been deployed to testing.
Environments
The taxonomy is deployed to five different environments. Testing and production for both read and write environments, and an onprem (internal to AF) environment.
jobtech-taxonomy-api-testing-read
jobtech-taxonomy-api-testing-write
jobtech-taxonomy-api-prod-read
jobtech-taxonomy-api-prod-write
onprem
The GitLab CI pipeline automatically deploys jobtech-taxonomy-api-testing-read
.
Testing
- https://openshift-gitops-server-openshift-gitops.apps.testing.services.jtech.se
- https://console-openshift-console.apps.testing.services.jtech.se
Production
- https://openshift-gitops-server-openshift-gitops.prod.services.jtech.se
- https://console-openshift-console.prod.services.jtech.se/dashboards
Traffic Timing
Prefer deploying to production early in the week, after 10:00 but before lunch if possible. Tuesday at 10:00 is probably the best time. This period is both less traffic intensive with respect to internal AF traffic and it gives a better chance of rolling back problematic deploys.
Deployment merge requests
When deploying it is good practice to create an MR against the infra repository and have it approved. But there are cases where it is ok to commit directly against the main branch. For example if multiple persons are working together on a deployment, if one is alone and the deploy is an important bugfix or security fix or if one really wants to.
Deployment to prod-read
- Select the latest commit SHA from https://gitlab.com/arbetsformedlingen/taxonomy-dev/backend/jobtech-taxonomy-api.
- Verify that it is the same SHA as the one that can be found under
newTag
in https://gitlab.com/arbetsformedlingen/taxonomy-dev/backend/jobtech-taxonomy-api-infra/-/blob/main/kustomize/overlays/jobtech-taxonomy-api-testing-read/kustomization.yaml?ref_type=heads. - Verify that the testing read environment has updated and is functioning correctly.
- Verify that the configuration for the taxonomy API is the same in ´testing-read´ and ´prod-read´.
- Edit
newTag
in https://gitlab.com/arbetsformedlingen/taxonomy-dev/backend/jobtech-taxonomy-api-infra/-/blob/main/kustomize/overlays/jobtech-taxonomy-api-prod-read/kustomization.yaml?ref_type=heads to match the testing-read version. - Await approval if necessary.
- Verify that the deployment went well in https://openshift-gitops-server-openshift-gitops.prod.services.jtech.se and https://console-openshift-console.prod.services.jtech.se/dashboards.
- Perform a staggered restart of the varnish cache system. Currently it will not do this automatically, so some changes will not be available to the users until the cache is restarted.
- Verify that the https://taxonomy.api.jobtechdev.se/v1/taxonomy/status/build call has the correct commit SHA.
Deployment to prod-write
- MAKE SURE THAT REDAKTIONEN KNOWS THIS IS HAPPENING!
- Select the latest commit SHA from https://gitlab.com/arbetsformedlingen/taxonomy-dev/backend/jobtech-taxonomy-api.
- Verify that it is the same SHA as the one that can be found under
newTag
in https://gitlab.com/arbetsformedlingen/taxonomy-dev/backend/jobtech-taxonomy-api-infra/-/blob/main/kustomize/overlays/jobtech-taxonomy-api-testing-write/kustomization.yaml?ref_type=heads. - Verify that the testing read environment has updated and is functioning correctly.
- Verify that the configuration for the taxonomy API is the same in ´testing-write´ and ´prod-write´.
- Edit
newTag
in https://gitlab.com/arbetsformedlingen/taxonomy-dev/backend/jobtech-taxonomy-api-infra/-/blob/main/kustomize/overlays/jobtech-taxonomy-api-prod-write/kustomization.yaml?ref_type=heads to match the testing-read version. - Await approval if necessary.
- Verify that the deployment went well in https://openshift-gitops-server-openshift-gitops.prod.services.jtech.se and https://console-openshift-console.prod.services.jtech.se/dashboards.
- Perform a staggered restart of the varnish cache system. Currently it will not do this automatically, so some changes will not be available to the users until the cache is restarted.
- Verify that the https://api-jobtech-taxonomy-api-prod-write.prod.services.jtech.se/v1/taxonomy/status/build call has the correct commit SHA.