Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Instructions On Deploying in PaaS

Gabriel Moreira edited this page Jun 21, 2024 · 1 revision

Overview

We are going to deploy on CERN's Paas that is a propriatry RedHat solution (Openshift) on top of K8S.

Requirements

  • Access to Paas
  • Be part of the cms-dqm-hardcore egroup
  • Have a working install of the oc cli tool (available on PaaS' Command Line Tools view)

New deployment

Using the prod stage as an example:

  1. Build the docker images locally and push to Harbor (you'll need to login into the Harbor WebUI to authenticate) with bash push_containers.sh prod
  2. Create a new OC project in the PaaS' WebUI
  3. Apply the secrets config file (oc apply -f oc/prod/secrets.yaml), got to the web ui and fill the secrets (alternatively you can fill the secrets as base64 encoded strings direcrtly on the template before applying)
  4. Create an eos PVC named eos-storage following the section Create and Mount an EOS Persistent Volume Claim here
  5. Apply the configmaps (oc apply -f oc/prod/configmaps)
  6. Apply the deployments (oc apply -f oc/prod/deployments)
  7. Apply the services (oc apply -f oc/prod/services.yaml)
  8. Apply the routes (oc apply -f oc/prod/routes.yaml)
  9. Create the oauth2-proxy helm chart trough PaaS' WebUI (Upstream service name: nginx, Upstream port: 8081, Routing public application hostname: cms-hdqm.web.cern.ch, Disable "Create a route")

Updating a deployment

If you need to update the current resources, don't forget to re-apply with oc apply -f ....

If you modify only the source code, just rebuild and push the Docker image to Harbor and rollout restart the updated image using oc rollout restart .... Example:

bash push_containers.sh prod
oc rollout restart deployment/backend-api

Clone this wiki locally