Skip to content

Commit

Permalink
Merge pull request #1319 from hallieswan/AG-1518
Browse files Browse the repository at this point in the history
AG-1518: rename data release image to distinguish from sage-monorepo image
  • Loading branch information
hallieswan authored Jun 27, 2024
2 parents e882d81 + 24cc20d commit fab3e08
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ DB_USER="root"
DB_PASS="${DB_PASS}"
DB_PORT="27015"
DB_NAME="agora"
DATA_IMAGE_PATH="ghcr.io/sage-bionetworks/agora-data:${DATA_IMAGE_TAG}"
DATA_IMAGE_PATH="ghcr.io/sage-bionetworks/agora-data-nonmonorepo:${DATA_IMAGE_TAG}"
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
env:
ORG_NAME: 'Sage-Bionetworks'
NAMESPACE: ${{ github.repository_owner }}
DATA_IMAGE_NAME: '${{ vars.DB_NAME }}-data'
DATA_IMAGE_NAME: '${{ vars.DB_NAME }}-data-nonmonorepo'
outputs:
DATA_MANIFEST_ID: ${{ steps.get-ids-from-package-json.outputs.DATA_MANIFEST_ID }}
DATA_VERSION: ${{ steps.get-ids-from-package-json.outputs.DATA_VERSION }}
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ Go to [http://localhost:8080](http://localhost:8080)

#### Creating an image for a new data release

A "data release" is defined in the `package.json` by the `data-file` and `data-version` values. Images pre-loaded with data from the data release are created when the `e2e.yml` GitHub Action workflow runs and are pushed to the GitHub Container Registry (GHCR) package for that namespace -- the `sage-bionetworks` organization namespace when the workflow runs in the base repo or in the user's namespace (e.g. `hallieswan`) when running in a forked repo.
A "data release" is defined in the `package.json` by the `data-file` and `data-version` values. Images pre-loaded with data from the data release are created when the `ci.yml` GitHub Action workflow runs and are pushed to the GitHub Container Registry (GHCR) package for that namespace -- the `sage-bionetworks` organization namespace when the workflow runs in the base repo or in the user's namespace (e.g. `hallieswan`) when running in a forked repo.

The `sage-bionetworks` package will contain images for data releases that have been specified in `package.json` on `develop` or `main`. The user's package will contain images for data releases that have been specified in `package.json` in branches pushed to their fork.

Expand All @@ -189,9 +189,9 @@ If a dev needs to create an image for a data release that does not yet exist in
2. Update the `package.json` to reflect the appropriate `data-file` and `data-version` files.
3. If necessary, update `./scripts/collections.csv` to specify new collections and `./scripts/mongo-create-Indexes.js` to specify new indexes.
4. Commit the changes.
5. Push the changes to your remote fork to trigger a run of the `e2e.yml` workflow.
6. The new image will be available in your user namespaced GHCR package, e.g. `https://github.com/hallieswan/Agora/pkgs/container/agora-data`.
7. Update your local `.env` file so `DATA_IMAGE_PATH` points to the newly created image, e.g. `ghcr.io/hallieswan/agora-data:syn13363290.68`.
5. Push the changes to your remote fork to trigger a run of the `ci.yml` workflow.
6. The new image will be available in your user namespaced GHCR package, e.g. `https://github.com/hallieswan/Agora/pkgs/container/agora-data-nonmonorepo`.
7. Update your local `.env` file so `DATA_IMAGE_PATH` points to the newly created image, e.g. `ghcr.io/hallieswan/agora-data-nonmonorepo:syn13363290.68`.
8. Start the containerized database: `npm run docker:db:start`.

# Development
Expand Down
6 changes: 3 additions & 3 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

Files in this directory:

- `Dockerfile`: creates the `agora-data` docker image, which contains data for a particular Agora data release (manifest synId + version) and team images and will seed a mongodb at start up using `import-data.sh`
- `docker-compose.yml`: spins up `mongo` and `agora-data` docker containers
- `Dockerfile`: creates the `agora-data-nonmonorepo` docker image, which contains data for a particular Agora data release (manifest synId + version) and team images and will seed a mongodb at start up using `import-data.sh`
- `docker-compose.yml`: spins up `mongo` and `agora-data-nonmonorepo` docker containers

## Workflow Setup

The following secrets and variables need to be set up in GitHub for the `e2e.yml` workflow to create the `agora/data` Docker image:
The following secrets and variables need to be set up in GitHub for the `ci.yml` workflow to create the `agora-data-nonmonorepo` Docker image:

e2e Environment secrets:

Expand Down

0 comments on commit fab3e08

Please sign in to comment.