medic / cht-release-testing

Used to track release testing on medic projects
2 stars 0 forks source link

Check upgrade services #199

Open ngaruko opened 1 year ago

ngaruko commented 1 year ago

User: Admin Site: local/docker Platform: Chrome Test Steps: Steps for test

Before starting - ensure no other containers are running: `docker kill $(docker ps -q)` 1. Follow [upgrade service documentation](https://github.com/medic/cht-upgrade-service/) 2. Review the documentation > what can be done ? 3.x to 4.x? 4.x to 4.x? 4.x to 3.x? - **NB** - only 4.x to 4.x +1 is support as of 7 Nov 2022 1. Download the 3 compose files from `master`, core, couch and upgrade: ``` mkdir 199-check-upgrade-service&&cd 199-check-upgrade-service wget https://staging.dev.medicmobile.org/_couch/builds_4/medic:medic:master/docker-compose/cht-couchdb.yml wget https://staging.dev.medicmobile.org/_couch/builds_4/medic:medic:master/docker-compose/cht-core.yml wget https://raw.githubusercontent.com/medic/cht-upgrade-service/main/docker-compose.yml ``` 4. Start CHT with upgrade service in a dedicated termninal: ``` CHT_COMPOSE_PROJECT_NAME=199-upgr-check COUCHDB_SECRET=foo DOCKER_CONFIG_PATH=./ COUCHDB_DATA=./couchd CHT_COMPOSE_PATH=./ COUCHDB_USER=medic COUCHDB_PASSWORD=password docker-compose up ``` 6. Try the following scenarios and make sure that: 1. the upgrade service starts and upgrades containers with default project name and default network 1. the upgrade service starts and upgrades containers with custom project name and custom network 1. users can start multiple CHT instances on the same machine 1. users can start multiple CHT + upgrade service on the same machine (once Update docker-compose environment variables and README [cht-upgrade-service#18](https://github.com/medic/cht-upgrade-service/pull/18) lands) 1. taking down upgrade service doesn't take down CHT Expected Result: User should see `upgrade` on the admin portal and be able to upgrade to another 4.x version.
lorerod commented 1 year ago

Hi @dianabarsan @mrjones-plip I'm testing the cht-upgrade-service with the main branch. Following the README I try to start the service only with the required variables. Using the following command:

CHT_COMPOSE_PATH=/Users/marialorenarodriguezviruel/medic-workspace/docker-files/#20/cht-core COUCHDB_USER=admin COUCHDB_PASSWORD=password COUCHDB_SECRET=secret COUCHDB_DATA=/Users/marialorenarodriguezviruel/medic-workspace/docker-files/#20/cht-core/srv docker-compose -f docker-compose.yml up -d

I'm getting the following error:

WARNING: The DOCKER_CONFIG_PATH variable is not set. Defaulting to a blank string.
Creating network "cht-net" with the default driver
Pulling cht-upgrade-service (public.ecr.aws/s5s3h4s7/cht-upgrade-service:latest)...
latest: Pulling from s5s3h4s7/cht-upgrade-service
9621f1afde84: Pull complete
3f832bbddb19: Pull complete
6f3a0d01a94f: Pull complete
ac6273903b7f: Pull complete
85f37bae29c8: Pull complete
ccbb509e0cb5: Pull complete
1009b407461e: Pull complete
Digest: sha256:c3e466b8f38e038bff3195a3ef453e639f1eb95310349575b8b085d60fc34f94
Status: Downloaded newer image for public.ecr.aws/s5s3h4s7/cht-upgrade-service:latest
Creating cht-upgrade_cht-upgrade-service_1 ... error

ERROR: for cht-upgrade_cht-upgrade-service_1  Cannot create container for service cht-upgrade-service: create .: volume name is too short, names should be at least two alphanumeric characters

ERROR: for cht-upgrade-service  Cannot create container for service cht-upgrade-service: create .: volume name is too short, names should be at least two alphanumeric characters
ERROR: Encountered errors while bringing up the project.

When I try to start the service defining DOCKER_CONFIG_PATH, the service starts without error:

DOCKER_CONFIG_PATH=/Users/marialorenarodriguezviruel/medic-workspace/docker-files/#20/cht-core/aws_conf CHT_COMPOSE_PATH=/Users/marialorenarodriguezviruel/medic-workspace/docker-files/#20/cht-core COUCHDB_USER=admin COUCHDB_PASSWORD=password COUCHDB_SECRET=secret COUCHDB_DATA=/Users/marialorenarodriguezviruel/medic-workspace/docker-files/#20/cht-core/srv docker-compose -f docker-compose.yml up -d

Is DOCKER_CONFIG_PATH variable optional? Or I'm missing something?

mrjones-plip commented 1 year ago

Thanks for reaching out @lorerod! I actually ran into this exact same problem when testing a very related PR. tl;dr - it is currently required, but the docs say it isn't required. I've updated the test steps to be more explicit so we're all testing the same thing.

lorerod commented 1 year ago

Left a comment on PR about script not getting the env variables values for user and password.