Skip to content

For Developers: Kubernetes

anaelizabethenriquez edited this page Oct 13, 2023 · 1 revision

Infrastructure

Rails Application

The rails application is deployed as a Deployment in kubernetes (https://github.com/psu-libraries/researcher-metadata-config/blob/main/charts/researcher-metadata/templates/deployment.yaml)

Delayed Job

Delayed Job is a kubernetes Deployment ( https://github.com/psu-libraries/researcher-metadata-config/blob/main/charts/researcher-metadata/templates/delayed_job.yaml)

Rake Tasks

Rake tasks are configured in helm in the cronWorkflows property, and driven by Argo Workflows

Postgres

Postgres is hosted on VMs (postgres1qa, postgres1prod). Databases and roles are created via helm/crossplane (https://github.com/psu-libraries/researcher-metadata-config/tree/main/charts/researcher-metadata/templates/externalPostgres)

Helm

Kubernetes manifests are generated via helm. The helm chart is stored in the researcher-metadata-config repo (https://github.com/psu-libraries/researcher-metadata-config/tree/main/charts/researcher-metadata)

Cron Jobs

Cronjob docs will go here

Deployments

ArgoCD/Rancher docs will go here

Restore Production Database

We use Argo Workflows to Restore a production database into a preview, or QA environment.

The Restore workflow will grab a list of database backups from s3, scale down the rmd deployment, restore the file into postgres, and then scale back up the deployment.

  • https://argo.dev.k8s.libraries.psu.edu/workflow-templates
  • fill in your namespace (e.g researcher-metadata-qa for qa)
  • Choose the restore-database task
  • Click "Submit"
  • On the pop up dialog, choose "Submit"
  • Once the "Choose File" task shows up, click on it and choose "Resume"
  • Select your file from the Dropdown and click "OK"
simplescreenrecorder-2023-08-17_13.57.49.mp4