From 91fc581c4cffd5a4faccb53f6914aca9f21fa3dc Mon Sep 17 00:00:00 2001 From: Andrew Prokhorenkov Date: Fri, 21 Jul 2023 13:03:24 -0500 Subject: [PATCH] doc: proper deployment with kube-setup-cohort-middleware scripts --- README.md | 46 +++++++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 6ed52d9..4158896 100644 --- a/README.md +++ b/README.md @@ -143,33 +143,25 @@ curl -d '{"variables":[{"variable_type": "custom_dichotomous", "cohort_ids": [1, # Deployment steps -## Deployment to QA - -- Add config .yaml as a secret: - - If the config secret does not yet exist, create it [with name expected in this deployment .yaml file](https://github.com/uc-cdis/cloud-automation/blob/master/kube/services/cohort-middleware/cohort-middleware-deploy.yaml): - ``` - kubectl create secret generic \ - --from-file=./test.yaml \ - ``` - where `./test.yaml` follows the general structure of `./config/development.yaml`. - - - Check if it worked with: - ``` - kubectl get secrets/ -o yaml - ``` -- PRs to `master` get the docker image built on quay (via github action). See https://quay.io/repository/cdis/cohort-middleware?tab=tags - - The following config file determines which branch or tag is used on QA: https://github.com/uc-cdis/gitops-qa/blob/master/qa-mickey.planx-pla.net/manifest.json -- If testing on QA: - - ssh to QA machine - - run the steps below: - ```bash - echo "====== Pull manifest without going into directory ====== " - git -C ~/cdis-manifest pull - echo "====== Update the manifest configmaps ======" - gen3 kube-setup-secrets - echo "====== Deploy ======" - gen3 roll cohort-middleware - ``` +## Deployment to Gen3 + +For deployment in Gen3 simply use [`kube-setup-cohort-middleware`](https://github.com/uc-cdis/cloud-automation/blob/master/gen3/bin/kube-setup-cohort-middleware.sh) script: + +``` +gen3 kube-setup-cohort-middleware +``` + +The script will use `ohdsi` database credentials and will result in `cohort-middleware-g3auto` Kubernetes secret. + +### Roll cohort-middleware + +To roll cohort-middleware (in case of version update), full `kube-setup-cohort-middleware` is not required: + +``` +gen3 roll cohort-middleware +``` + +This will take care of all the secrets via [`g3auto`](https://github.com/uc-cdis/cloud-automation/blob/master/doc/secrets.md#overview). ## Test the endpoints on QA