[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #238: HDDS-2588. Consolidate compose environments

2019-12-06 Thread GitBox
adoroszlai commented on a change in pull request #238: HDDS-2588. Consolidate 
compose environments
URL: https://github.com/apache/hadoop-ozone/pull/238#discussion_r354788952
 
 

 ##
 File path: hadoop-ozone/dist/src/main/compose/ozone/run.sh
 ##
 @@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+declare -ix OZONE_REPLICATION_FACTOR
+: ${OZONE_REPLICATION_FACTOR:=1}
+docker-compose up --scale datanode=${OZONE_REPLICATION_FACTOR} --no-recreate 
"$@"
 
 Review comment:
   > if nothing has been changed and the docker-compose file set was the same.
   
   But the readme says freon compose file should be added only when datanodes 
are up, so the set is not the same.
   
   
https://github.com/apache/hadoop-ozone/blob/76ad638b47232761a1732281188162e5c31308d8/hadoop-ozone/dist/src/main/compose/ozoneperf/README.md#L47-L51


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:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org



[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #238: HDDS-2588. Consolidate compose environments

2019-12-06 Thread GitBox
adoroszlai commented on a change in pull request #238: HDDS-2588. Consolidate 
compose environments
URL: https://github.com/apache/hadoop-ozone/pull/238#discussion_r354786194
 
 

 ##
 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:
   ae2bc55261fff4950ac6cb82f7dfab1cd8e47034 moves these one-liners back to 
`docker-compose.yaml` and the separate files are no longer needed.


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:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org



[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #238: HDDS-2588. Consolidate compose environments

2019-12-06 Thread GitBox
adoroszlai commented on a change in pull request #238: HDDS-2588. Consolidate 
compose environments
URL: https://github.com/apache/hadoop-ozone/pull/238#discussion_r354786194
 
 

 ##
 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:
   ae2bc55261fff4950ac6cb82f7dfab1cd8e47034 moves these one-liners back.


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:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org



[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #238: HDDS-2588. Consolidate compose environments

2019-12-03 Thread GitBox
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:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org



[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #238: HDDS-2588. Consolidate compose environments

2019-11-20 Thread GitBox
adoroszlai commented on a change in pull request #238: HDDS-2588. Consolidate 
compose environments
URL: https://github.com/apache/hadoop-ozone/pull/238#discussion_r348926276
 
 

 ##
 File path: hadoop-ozone/dist/src/main/compose/ozone/docker-config
 ##
 @@ -20,14 +20,22 @@ OZONE-SITE.XML_ozone.scm.names=scm
 OZONE-SITE.XML_ozone.scm.datanode.id.dir=/data
 OZONE-SITE.XML_ozone.scm.block.client.address=scm
 OZONE-SITE.XML_ozone.metadata.dirs=/data/metadata
-OZONE-SITE.XML_ozone.handler.type=distributed
+OZONE-SITE.XML_ozone.recon.db.dir=/data/metadata/recon
+OZONE-SITE.XML_ozone.recon.om.db.dir=/data/metadata/recon
 
 Review comment:
   Thanks @avijayanhwx.  Then I think we can keep it as is.


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:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org



[GitHub] [hadoop-ozone] adoroszlai commented on a change in pull request #238: HDDS-2588. Consolidate compose environments

2019-11-20 Thread GitBox
adoroszlai commented on a change in pull request #238: HDDS-2588. Consolidate 
compose environments
URL: https://github.com/apache/hadoop-ozone/pull/238#discussion_r348924764
 
 

 ##
 File path: hadoop-ozone/dist/src/main/compose/ozone/docker-config
 ##
 @@ -20,14 +20,22 @@ OZONE-SITE.XML_ozone.scm.names=scm
 OZONE-SITE.XML_ozone.scm.datanode.id.dir=/data
 OZONE-SITE.XML_ozone.scm.block.client.address=scm
 OZONE-SITE.XML_ozone.metadata.dirs=/data/metadata
-OZONE-SITE.XML_ozone.handler.type=distributed
+OZONE-SITE.XML_ozone.recon.db.dir=/data/metadata/recon
+OZONE-SITE.XML_ozone.recon.om.db.dir=/data/metadata/recon
 
 Review comment:
   Thanks @bharatviswa504 for spotting this.  These config values from 
`ozone-recon` env as they were.
   
   @avijayanhwx @swagle can Recon use the same directory for both 
`ozone.recon.db.dir` and `ozone.recon.om.db.dir`?


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:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org