Ensembl / ensembl-dauphin-style-compiler

"dauphin" style-compiler for genome browser
0 stars 0 forks source link

Deploy GB feature branch in new cluster #106

Closed veidenberg closed 8 months ago

veidenberg commented 8 months ago

Description

Adds review job in GitLab CI/CD pipeline in order to deploy Genome Browser non-default backend (feature branch) to review app namespace in the new dev cluster.

Related JIRA Issue(s)

ENSWBSITES-2460

Review App URL(s)

http://deploy-review-nkhdev.review.ensembl.org http://another-branch.review.ensembl.org

Example(s)

Example tests:

You can test deploying your own GB review deployments by creating a new branch from deploy-review-nkhdev. Before branching GB, do the same for ensembl-client (create a branch from deploy-review-nkhdev) - ensembl-client will setup the review namespace and image pull secrets.

Dependencies

Two other repos have updates that this PR depends on:

Actions:

  1. Approve & merge the MR/PR above.
  2. Revert the branchname in GB review job to k8s123-migration
kamaldodiya commented 8 months ago

Setup is still failing https://gitlab.ebi.ac.uk/ensembl-web/ensembl-dauphin-style-compiler/-/jobs/1606360

veidenberg commented 8 months ago

Setup is still failing https://gitlab.ebi.ac.uk/ensembl-web/ensembl-dauphin-style-compiler/-/jobs/1606360

That is expected and the "did not find namespace" error is there on purpose: you need to create the review namespace with ensembl-client branch before branching any backend (in this case gb). That's because ensembl-client sets up pull-secret (otherwise I would have to do this in every backend pipeline - see my comments above). PR description updated.

kamaldodiya commented 8 months ago
kubectl get ns | grep -q "^${CI_COMMIT_REF_SLUG}" || kubectl create ns ${CI_COMMIT_REF_SLUG} 

This will take care of the namespace creation across the repos so don't need to have depenedency on some other repo to create ns. I think this is much cleaner approach than || true

veidenberg commented 8 months ago
kubectl get ns | grep -q "^${CI_COMMIT_REF_SLUG}" || kubectl create ns ${CI_COMMIT_REF_SLUG} 

This will take care of the namespace creation across the repos so don't need to have depenedency on some other repo to create ns. I think this is much cleaner approach than || true

I'd prefer not to create review ns in backend, because we also need to add image-pull-secrets and the corresponding gitlab variables (see my comment above). And we would need gitlab-client branching anyway for the review app to function.