Skip to content

Commit

Permalink
Export Reads deployment (#1613)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjahl authored Sep 20, 2024
1 parent 5f82af5 commit 451a3b6
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 337 deletions.
40 changes: 40 additions & 0 deletions .cloudbuild/reads.cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Submitting a cloud build using this config from your local machine can be done as:
# gcloud builds submit --config .cloudbuild/reads.cloudbuild.yaml \
# --substitutions=_BRANCH_FOR_IMAGE_NAME="my-branch-name",SHORT_SHA="6f3f419" .

steps:
- name: 'gcr.io/cloud-builders/docker'
args:
[
'build',
'-t',
'us-docker.pkg.dev/${PROJECT_ID}/gnomad/gnomad-reads-server:$SHORT_SHA',
'-t',
'us-docker.pkg.dev/${PROJECT_ID}/gnomad/gnomad-reads-server:${_BUILD_TAG}',
'-f',
'deploy/dockerfiles/reads/reads-server.dockerfile',
'.',
]
- name: 'gcr.io/cloud-builders/docker'
args:
[
'build',
'-t',
'us-docker.pkg.dev/${PROJECT_ID}/gnomad/gnomad-reads-api:$SHORT_SHA',
'-t',
'us-docker.pkg.dev/${PROJECT_ID}/gnomad/gnomad-reads-api:${_BUILD_TAG}',
'-f',
'deploy/dockerfiles/reads/reads-api.dockerfile',
'.',
]
options:
dynamicSubstitutions: true
substitutions:
_BUILD_TAG: '${_BRANCH_FOR_IMAGE_NAME}-${BUILD_ID}'

# push tag with the short sha, and also a branch-based UUID
images:
- 'us-docker.pkg.dev/${PROJECT_ID}/gnomad/gnomad-reads-server:$SHORT_SHA'
- 'us-docker.pkg.dev/${PROJECT_ID}/gnomad/gnomad-reads-server:${_BUILD_TAG}'
- 'us-docker.pkg.dev/${PROJECT_ID}/gnomad/gnomad-reads-api:$SHORT_SHA'
- 'us-docker.pkg.dev/${PROJECT_ID}/gnomad/gnomad-reads-api:${_BUILD_TAG}'
4 changes: 0 additions & 4 deletions deploy/deployctl/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
from deployctl.subcommands import elasticsearch
from deployctl.subcommands import ingress_demo
from deployctl.subcommands import ingress_production
from deployctl.subcommands import reads_deployments
from deployctl.subcommands import reads_images


def main():
Expand All @@ -22,8 +20,6 @@ def main():
"config": config,
"deployments": browser_deployments,
"images": browser_images,
"reads-deployments": reads_deployments,
"reads-images": reads_images,
"production": ingress_production,
"demo": ingress_demo,
"data-pipeline": data_pipeline,
Expand Down
164 changes: 0 additions & 164 deletions deploy/deployctl/subcommands/reads_deployments.py

This file was deleted.

71 changes: 0 additions & 71 deletions deploy/deployctl/subcommands/reads_images.py

This file was deleted.

18 changes: 7 additions & 11 deletions deploy/docs/Deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,25 +335,21 @@ The production gnomad browser uses a [blue/green deployment](https://martinfowle

## Create and Update Reads Deployment

Create Reads Deployment
### Production

- Build Docker images and push to GCR.
Docker images are built after merging to main. Once the build succeeds, and you have a new tag, update the reads deployment in [gnomad-deployments/reads](https://github.com/broadinstitute/gnomad-deployments/tree/main/reads). See the instructions in the deployment repo to create a new blue/green version, and deploy it to the cluster.

```
./deployctl reads-images build --push
```
### Development / Demo

- Create deployment manifests.
- Build Docker images and push to GCR.

```
./deployctl reads-deployments create
./reads/docker-build.sh
```

- Apply deployment.
- Create deployment manifests.

```
./deployctl reads-deployments apply <deployment-name>
```
Follow the instructions in the [gnomad-deployments/reads](https://github.com/broadinstitute/gnomad-deployments/tree/main/reads) repo to create and apply a new demo deployment.

Update Reads Deployment

Expand Down
4 changes: 0 additions & 4 deletions deploy/manifests/reads/base/kustomization.yaml

This file was deleted.

Loading

0 comments on commit 451a3b6

Please sign in to comment.