Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docker/datahub-upgrade/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ To run the `datahub-upgrade` container, some environment variables must be provi
where the running DataHub containers reside.

Below details the required configurations. By default, these configs are provided for local docker-compose deployments of
DataHub within `env/docker/system-update.env`. They assume that there is a Docker network called datahub_network
where the DataHub containers can be found. Some lines in that file use `${KEY:-default}` or `${KEY}`, which `docker run --env-file` does not resolve. `datahub-upgrade.sh` fills them in from your shell (an unset or empty key takes the default). The `docker run` examples below drop those lines (`grep -v '${'`), so those keys are not set; to set them, run the script or pass a copy with the values filled in.
DataHub within `env/docker/system-update.env` and the `env/docker/shared/` files loaded before it (`datastore`, `search`, `neo4j`, `indexing`). They assume that there is a Docker network called datahub_network
where the DataHub containers can be found. Some lines in those files use `${KEY:-default}` or `${KEY}`, which `docker run --env-file` does not resolve. `datahub-upgrade.sh` loads the files into a one-service compose project, which resolves them as the stack's compose files do (the shell value; an unset or empty key takes the default). The `docker run` examples below drop those lines (`grep -v '${'`), so those keys are not set; to set them, run the script or pass a copy with the values filled in.

These are also the variables used when the provided `datahub-upgrade.sh` script is executed. To run the upgrade CLI for non-local deployments,
follow these steps:
Expand Down Expand Up @@ -142,7 +142,7 @@ For example, to run the migration named "NoCodeDataMigration", you would do exec
OR, from `docker/datahub-upgrade/` (the path is relative to that folder):

```aidl
docker pull acryldata/datahub-upgrade:quickstart && docker run --env-file <(grep -v '${' ../../env/docker/system-update.env) acryldata/datahub-upgrade:quickstart -u NoCodeDataMigration
docker pull acryldata/datahub-upgrade:quickstart && docker run --env-file <(grep -hv '${' ../../env/docker/shared/{datastore,search,neo4j,indexing}.env ../../env/docker/system-update.env) acryldata/datahub-upgrade:quickstart -u NoCodeDataMigration
```

### Provided Arguments for a Given Upgrade Job
Expand All @@ -160,5 +160,5 @@ To specify these, you can use a combination of `-a` arguments and of the form _a
OR, from `docker/datahub-upgrade/` (the path is relative to that folder):

```aidl
docker pull acryldata/datahub-upgrade:quickstart && docker run --env-file <(grep -v '${' ../../env/docker/system-update.env) acryldata/datahub-upgrade:quickstart -u NoCodeDataMigration -a batchSize=500 -a batchDelayMs=1000
docker pull acryldata/datahub-upgrade:quickstart && docker run --env-file <(grep -hv '${' ../../env/docker/shared/{datastore,search,neo4j,indexing}.env ../../env/docker/system-update.env) acryldata/datahub-upgrade:quickstart -u NoCodeDataMigration -a batchSize=500 -a batchDelayMs=1000
```
8 changes: 7 additions & 1 deletion docker/datahub-upgrade/datahub-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ cd "$DIR" && test -r ../../env/docker/system-update.env && docker pull "${IMAGE}
services:
upgrade:
image: ${IMAGE}
env_file: ../../env/docker/system-update.env
# Same files, in the same order, as the system-update env_file list in docker/profiles/.
env_file:
- ../../env/docker/shared/datastore.env
- ../../env/docker/shared/search.env
- ../../env/docker/shared/neo4j.env
- ../../env/docker/shared/indexing.env
- ../../env/docker/system-update.env
networks: [datahub_network]
networks:
datahub_network:
Expand Down
4 changes: 4 additions & 0 deletions docker/mysql/docker-compose.mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ services:
datahub-gms:
env_file:
- ../../env/common/gms.env
- ../../env/docker/shared/datastore.env
- ../../env/docker/shared/search.env
- ../../env/docker/shared/neo4j.env
- ../../env/docker/shared/indexing.env
- ../../env/docker/gms.env
depends_on:
- mysql
Expand Down
2 changes: 2 additions & 0 deletions docker/profiles/docker-compose.actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ x-datahub-actions-service: &datahub-actions-service
env_file:
- path: ../../env/docker/all.env
required: false
- ../../env/docker/shared/search.env
- ../../env/docker/actions.env
- path: ../../env/docker/${DATAHUB_ENV_MODE:-local}/all.env
required: false
Expand Down Expand Up @@ -60,6 +61,7 @@ x-datahub-actions-quickstart-service: &datahub-actions-quickstart-service
x-env-files-actions-postgres: &env-files-actions-postgres
- path: ../../env/docker/all.env
required: false
- ../../env/docker/shared/search.env
- ../../env/docker/actions.env
- path: ../../env/docker/${DATAHUB_ENV_MODE:-local}/all.env
required: false
Expand Down
Loading
Loading