adoroszlai commented on a change in pull request #238: HDDS-2588. Consolidate
compose environments
URL: https://github.com/apache/hadoop-ozone/pull/238#discussion_r353182273
##########
File path: hadoop-ozone/dist/src/main/compose/ozone/docker-compose.yaml
##########
@@ -34,17 +37,19 @@ services:
command: ["ozone","datanode"]
om:
<<: *common-config
+ env_file:
+ - docker-config
+ - om.conf
ports:
- 9874:9874
- environment:
- ENSURE_OM_INITIALIZED: /data/metadata/om/current/VERSION
command: ["ozone","om"]
scm:
<<: *common-config
ports:
- 9876:9876
- environment:
- ENSURE_SCM_INITIALIZED: /data/metadata/scm/current/VERSION
Review comment:
I hated moving it out, but the following considerations together made me do
it:
1. Variable substitution only works in the yaml files, not in configs passed
via `env_file`. So `safemode.min.datanode` and `ozone.replication` need to be
in `environment`.
2. When merging `common-config`, one complete dict overrides the other:
depending on the order either `common-config` or the specific service gets to
define `environment`.
So I moved out these one-liners to avoid duplicating the "two-liners". Plus
it seems unlikely that anyone ever wants to change these infrastructure related
variables.
Now another alternative occurred to me: we might define a separate dict for
the configs to be merged into `environment`. Let me experiment a bit with
this. If it works, we could avoid the separate config files.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]