Skip to content

Production Deployment

Adam Wead edited this page Nov 4, 2020 · 15 revisions

Pre-Flight Check

You will be deploying the latest code in the main branch to production. Make sure you've done any additional testing that's required outside of the usual automated tests in CirclCI. Verify that there are no running CI builds and the most current build on the main branch is green.

Tag

From your local terminal:

git pull origin main

Create a tag for the release. Tags should follow the regex /v\d+/\d+\d+*/

git tag -a vX.Y.Z -m "Tagging X.Y.Z release"
git push --tags

Check the CI build page and verify a release-image job is running. Once that's done, check the scholarpshere-config page for a PR https://github.com/psu-stewardship/scholarsphere-config/pulls

When you're ready to perform the deploy, proceed to merging the PR.

Manual PR

If for some reason the CI build fails to submit the PR, we can do it manually

git clone [email protected]:psu-stewardship/scholarsphere-config.git 
cd scholarsphere-config 
git checkout -b vX.Y.Z

Edit argocd-prod/prod.yaml change spec.source.helm.values.image.tag to the tag you created in the previous step.

git add argocd-prod/prod.yaml
git commit -m 'release vX.Y.Z'
git push -u origin vX.Y.Z

Submit a PR to the scholarsphere-config repo.

Deploy

When you're ready to do the actual deployment, simply merge the PR!

https://github.com/psu-stewardship/scholarsphere-config/pulls

Validate

ArgoCD

Visit the project page

Check the application's details

Under App Details you should see Images. ScholarSphere should be running the new tag. You can filter to show only pods, and all pods should be green.

kubectl

Make sure you're using the prod context for kubectl (https://sites.psu.edu/dltdocs/?p=4954)

Change to the scholarsphere namespace and get a listing of pods:

kubens scholarsphere
kubectl get pods -l app.kubernetes.io/name=scholarsphere -o custom columns=NAME:.metadata.name,STATUS:.status.phase,IMAGE:'.spec.containers[0].image'

curl

The old-fashioned way:

curl --silent https://scholarsphere.k8s.libraries.psu.edu/health/all.json | jq

Clone this wiki locally