-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Devops: Fix the Docker builds (#6445)
In a recent commit, the `aiida-prepare.sh` startup script was updated to switch from the deprecated `verdi quicksetup` to `verdi presto`. This left the builds broken since there were a few bugs in the implementation of `verdi presto`, but also because the behavior of the commands is not identical: * The option `--profile` for `verdi quicksetup` was not correctly renamed to `--profile-name` for `verdi presto`. * The `detect_postgres_config` utility returned the database hostname under the key `database_host` instead of `database_hostname`. * The `detect_rabbitmq_config` utility returned a dictionary whose keys were not prefixed with `broker_` as is expected by the implementation of the `RabbitmqBroker` plugin. * The `detect_rabbitmq_config` utility now checks an environment variable for each connection parameter before resorting to the default. This is necessary to allow the `aiida-core-base` to define the hostname of RabbitMQ which is `messaging` instead of the default `locahost`. The `verdi presto` command intentionally does not expose options to configure RabbitMQ connection parameters. * The `aiida-core-base` case now defines the hostnames of the PSQL and RabbitMQ services through environment variables as they are set to the key in the docker compose file, which are `database` and `messaging`, respectively, instead of `localhost`. * The `_docker_service_wait` fixture now prints the log output captured from `docker compose` if the health check times out or fails. * The healthcheck for the RabbitMQ service is enabled in the docker compose of `aiida-core-base` and the healthchecks for both the PSQL and RabbitMQ services are corrected. These checks are necessary to ensure the `aiida-prepare.sh` is not called before they are up. If called before, `verdi presto` is called before the services are up and the profile creation will fail or will be configured without broker. * The healthchecks for `aiida-core-base` do not work for the case of `aiida-core-with-services` as there the services are part of the main container. Here the `aiida-prepare.sh` is called as soon as the services startup scripts have started, but they don't have a health check. Therefore, a `sleep` is added before `verdi presto` is called. There should be a better solution for this using s6, but this will have to do for the moment.
- Loading branch information
Showing
7 changed files
with
56 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
.docker/aiida-core-with-services/s6-assets/config-quick-setup.yaml
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters