Skip to content

Commit

Permalink
Merge pull request #75 from uc-cdis/doc/deployment
Browse files Browse the repository at this point in the history
doc: proper deployment with kube-setup-cohort-middleware scripts
  • Loading branch information
m0nhawk authored Mar 11, 2024
2 parents 5a20d45 + 92e41f8 commit be83552
Showing 1 changed file with 19 additions and 27 deletions.
46 changes: 19 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <secret_name_here> \
--from-file=./test.yaml \
```
where `./test.yaml` follows the general structure of `./config/development.yaml`.

- Check if it worked with:
```
kubectl get secrets/<secret_name_here> -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

Expand Down

0 comments on commit be83552

Please sign in to comment.