HDFS-13196. Ozone: dozone: make example docker-compose files version 
independent. Contributed by  Elek, Marton.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/966705ad
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/966705ad
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/966705ad

Branch: refs/heads/HDFS-7240
Commit: 966705ad8638c8089ce699af0d5aec640470d4d3
Parents: 215a942
Author: Anu Engineer <aengin...@apache.org>
Authored: Fri Mar 2 16:30:37 2018 -0800
Committer: Anu Engineer <aengin...@apache.org>
Committed: Fri Mar 2 16:30:37 2018 -0800

----------------------------------------------------------------------
 dev-support/compose/cblock/.env                 | 17 ------
 dev-support/compose/cblock/README.md            | 42 -------------
 dev-support/compose/cblock/docker-compose.yaml  | 64 --------------------
 dev-support/compose/cblock/docker-config        | 38 ------------
 dev-support/compose/ozone/.env                  | 17 ------
 dev-support/compose/ozone/docker-compose.yaml   | 60 ------------------
 dev-support/compose/ozone/docker-config         | 33 ----------
 hadoop-dist/pom.xml                             | 37 +++++++++++
 hadoop-dist/src/main/compose/cblock/.env        | 17 ++++++
 hadoop-dist/src/main/compose/cblock/README.md   | 42 +++++++++++++
 .../src/main/compose/cblock/docker-compose.yaml | 64 ++++++++++++++++++++
 .../src/main/compose/cblock/docker-config       | 38 ++++++++++++
 hadoop-dist/src/main/compose/ozone/.env         | 17 ++++++
 .../src/main/compose/ozone/docker-compose.yaml  | 59 ++++++++++++++++++
 .../src/main/compose/ozone/docker-config        | 33 ++++++++++
 15 files changed, 307 insertions(+), 271 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/966705ad/dev-support/compose/cblock/.env
----------------------------------------------------------------------
diff --git a/dev-support/compose/cblock/.env b/dev-support/compose/cblock/.env
deleted file mode 100644
index f7ca18b..0000000
--- a/dev-support/compose/cblock/.env
+++ /dev/null
@@ -1,17 +0,0 @@
-# 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.
-
-VERSION=3.1.0-SNAPSHOT

http://git-wip-us.apache.org/repos/asf/hadoop/blob/966705ad/dev-support/compose/cblock/README.md
----------------------------------------------------------------------
diff --git a/dev-support/compose/cblock/README.md 
b/dev-support/compose/cblock/README.md
deleted file mode 100644
index f951c87..0000000
--- a/dev-support/compose/cblock/README.md
+++ /dev/null
@@ -1,42 +0,0 @@
-<!--
-  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.
--->
-
-
-# CBlock dozone configuration
-
-This directory contains example cluster definition for CBlock/jscsi servers.
-
-## How to use
-
-1. First of all Start the servers with `docker-compose up -d`
-
-2. Wait until the servers are up and running (check http://localhost:9876 and 
wait until you have a healthy node)
-
-3. Create a volume: `docker-compose exec cblock hdfs cblock -c bilbo volume2 
1GB 4`
-
-4. Mount the iscsi volume (from host machine):
-
-```
-sudo iscsiadm -m node -o new -T bilbo:volume2 -p 127.0.0.1
-sudo iscsiadm -m node -T bilbo:volume2 --login
-```
-
-5. Check the device name from `dmesg` or `lsblk` (eg /dev/sdd). Errors in 
dmesg could be ignored: jscsi doesn't implement all the jscsi commands.
-
-6. Format the device (`mkfs.ext4 /dev/sdd`). (Yes, format the while device, 
not just a partition).
-
-7. Mount it (`mount /dev/sdd /mnt/target`).

http://git-wip-us.apache.org/repos/asf/hadoop/blob/966705ad/dev-support/compose/cblock/docker-compose.yaml
----------------------------------------------------------------------
diff --git a/dev-support/compose/cblock/docker-compose.yaml 
b/dev-support/compose/cblock/docker-compose.yaml
deleted file mode 100644
index 4931a4b..0000000
--- a/dev-support/compose/cblock/docker-compose.yaml
+++ /dev/null
@@ -1,64 +0,0 @@
-# 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.
-
-version: "3"
-services:
-   namenode:
-      image: elek/hadoop-runner:latest
-      hostname: namenode
-      volumes:
-         - ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop
-      ports:
-         - 9870:9870
-      environment:
-          ENSURE_NAMENODE_DIR: /data/namenode
-      env_file:
-         - ./docker-config
-      command: ["/opt/hadoop/bin/hdfs","namenode"]
-   datanode:
-      image: elek/hadoop-runner:latest
-      volumes:
-        - ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop
-      ports:
-        - 9864
-      command: ["/opt/hadoop/bin/hdfs","datanode"]
-   jscsi:
-      image: elek/hadoop-runner:latest
-      ports:
-        - 3260:3260
-      volumes:
-         - ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop
-      env_file:
-          - ./docker-config
-      command: ["/opt/hadoop/bin/hdfs","jscsi"]
-   cblock:
-      image: elek/hadoop-runner:latest
-      volumes:
-         - ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop
-      env_file:
-          - ./docker-config
-      command: ["/opt/hadoop/bin/hdfs","cblockserver"]
-   scm:
-      image: elek/hadoop-runner:latest
-      volumes:
-         - ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop
-      ports:
-         - 9876:9876
-      env_file:
-          - ./docker-config
-      command: ["/opt/hadoop/bin/hdfs","scm"]
-      environment:
-          ENSURE_SCM_INITIALIZED: /data/metadata/scm/current/VERSION

http://git-wip-us.apache.org/repos/asf/hadoop/blob/966705ad/dev-support/compose/cblock/docker-config
----------------------------------------------------------------------
diff --git a/dev-support/compose/cblock/docker-config 
b/dev-support/compose/cblock/docker-config
deleted file mode 100644
index 6851bc6..0000000
--- a/dev-support/compose/cblock/docker-config
+++ /dev/null
@@ -1,38 +0,0 @@
-# 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.
-
-CORE-SITE.XML_fs.defaultFS=hdfs://namenode:9000
-OZONE-SITE.XML_ozone.ksm.address=ksm
-OZONE-SITE.XML_ozone.scm.names=scm
-OZONE-SITE.XML_ozone.enabled=True
-OZONE-SITE.XML_ozone.scm.datanode.id=/data/datanode.id
-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.scm.client.address=scm
-
-OZONE-SITE.XML_dfs.cblock.jscsi.cblock.server.address=cblock
-OZONE-SITE.XML_dfs.cblock.scm.ipaddress=scm
-OZONE-SITE.XML_dfs.cblock.service.leveldb.path=/tmp
-
-HDFS-SITE.XML_dfs.namenode.rpc-address=namenode:9000
-HDFS-SITE.XML_dfs.namenode.name.dir=/data/namenode
-HDFS-SITE.XML_rpc.metrics.quantile.enable=true
-HDFS-SITE.XML_rpc.metrics.percentiles.intervals=60,300
-LOG4J.PROPERTIES_log4j.rootLogger=info,stdout
-LOG4J.PROPERTIES_log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-LOG4J.PROPERTIES_log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-LOG4J.PROPERTIES_log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd 
HH:mm:ss} %-5p %c{1}:%L - %m%n

http://git-wip-us.apache.org/repos/asf/hadoop/blob/966705ad/dev-support/compose/ozone/.env
----------------------------------------------------------------------
diff --git a/dev-support/compose/ozone/.env b/dev-support/compose/ozone/.env
deleted file mode 100644
index f7ca18b..0000000
--- a/dev-support/compose/ozone/.env
+++ /dev/null
@@ -1,17 +0,0 @@
-# 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.
-
-VERSION=3.1.0-SNAPSHOT

http://git-wip-us.apache.org/repos/asf/hadoop/blob/966705ad/dev-support/compose/ozone/docker-compose.yaml
----------------------------------------------------------------------
diff --git a/dev-support/compose/ozone/docker-compose.yaml 
b/dev-support/compose/ozone/docker-compose.yaml
deleted file mode 100644
index ee5e0bc..0000000
--- a/dev-support/compose/ozone/docker-compose.yaml
+++ /dev/null
@@ -1,60 +0,0 @@
-# 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.
-
-version: "3"
-services:
-   namenode:
-      image: elek/hadoop-runner:latest
-      hostname: namenode
-      volumes:
-         - ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop
-      ports:
-         - 50070:50070
-         - 9870:9870
-      environment:
-          ENSURE_NAMENODE_DIR: /data/namenode
-      env_file:
-         - ./docker-config
-      command: ["/opt/hadoop/bin/hdfs","namenode"]
-   datanode:
-      image: elek/hadoop-runner:latest
-      volumes:
-        - ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop
-      ports:
-        - 9864
-      command: ["/opt/hadoop/bin/hdfs","datanode"]
-   ksm:
-      image: elek/hadoop-runner:latest
-      volumes:
-         - ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop
-      ports:
-         - 9874:9874
-      environment:
-         ENSURE_KSM_INITIALIZED: /data/metadata/ksm/current/VERSION
-      env_file:
-          - ./docker-config
-      command: ["/opt/hadoop/bin/hdfs","ksm"]
-   scm:
-      image: elek/hadoop-runner:latest
-      volumes:
-         - ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop
-      ports:
-         - 9876:9876
-      env_file:
-          - ./docker-config
-      environment:
-          ENSURE_SCM_INITIALIZED: /data/metadata/scm/current/VERSION
-      command: ["/opt/hadoop/bin/hdfs","scm"]

http://git-wip-us.apache.org/repos/asf/hadoop/blob/966705ad/dev-support/compose/ozone/docker-config
----------------------------------------------------------------------
diff --git a/dev-support/compose/ozone/docker-config 
b/dev-support/compose/ozone/docker-config
deleted file mode 100644
index c3f3663..0000000
--- a/dev-support/compose/ozone/docker-config
+++ /dev/null
@@ -1,33 +0,0 @@
-# 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.
-
-CORE-SITE.XML_fs.defaultFS=hdfs://namenode:9000
-OZONE-SITE.XML_ozone.ksm.address=ksm
-OZONE-SITE.XML_ozone.scm.names=scm
-OZONE-SITE.XML_ozone.enabled=True
-OZONE-SITE.XML_ozone.scm.datanode.id=/data/datanode.id
-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.scm.client.address=scm
-HDFS-SITE.XML_dfs.namenode.rpc-address=namenode:9000
-HDFS-SITE.XML_dfs.namenode.name.dir=/data/namenode
-HDFS-SITE.XML_rpc.metrics.quantile.enable=true
-HDFS-SITE.XML_rpc.metrics.percentiles.intervals=60,300
-LOG4J.PROPERTIES_log4j.rootLogger=INFO, stdout
-LOG4J.PROPERTIES_log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-LOG4J.PROPERTIES_log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-LOG4J.PROPERTIES_log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd 
HH:mm:ss} %-5p %c{1}:%L - %m%n

http://git-wip-us.apache.org/repos/asf/hadoop/blob/966705ad/hadoop-dist/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-dist/pom.xml b/hadoop-dist/pom.xml
index 1ccbbce..7b885c9 100644
--- a/hadoop-dist/pom.xml
+++ b/hadoop-dist/pom.xml
@@ -140,6 +140,43 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <artifactId>maven-resources-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>copy-docker-compose</id>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <phase>prepare-package</phase>
+            <configuration>
+              
<outputDirectory>${project.build.directory}/compose</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>src/main/compose</directory>
+                  <filtering>true</filtering>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+          <execution>
+            <id>copy-dockerfile</id>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <phase>prepare-package</phase>
+            <configuration>
+              <outputDirectory>${project.build.directory}</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>src/main/docker</directory>
+                  <filtering>true</filtering>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/966705ad/hadoop-dist/src/main/compose/cblock/.env
----------------------------------------------------------------------
diff --git a/hadoop-dist/src/main/compose/cblock/.env 
b/hadoop-dist/src/main/compose/cblock/.env
new file mode 100644
index 0000000..af20d3e
--- /dev/null
+++ b/hadoop-dist/src/main/compose/cblock/.env
@@ -0,0 +1,17 @@
+# 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.
+
+VERSION=${project.version}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/966705ad/hadoop-dist/src/main/compose/cblock/README.md
----------------------------------------------------------------------
diff --git a/hadoop-dist/src/main/compose/cblock/README.md 
b/hadoop-dist/src/main/compose/cblock/README.md
new file mode 100644
index 0000000..f951c87
--- /dev/null
+++ b/hadoop-dist/src/main/compose/cblock/README.md
@@ -0,0 +1,42 @@
+<!--
+  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.
+-->
+
+
+# CBlock dozone configuration
+
+This directory contains example cluster definition for CBlock/jscsi servers.
+
+## How to use
+
+1. First of all Start the servers with `docker-compose up -d`
+
+2. Wait until the servers are up and running (check http://localhost:9876 and 
wait until you have a healthy node)
+
+3. Create a volume: `docker-compose exec cblock hdfs cblock -c bilbo volume2 
1GB 4`
+
+4. Mount the iscsi volume (from host machine):
+
+```
+sudo iscsiadm -m node -o new -T bilbo:volume2 -p 127.0.0.1
+sudo iscsiadm -m node -T bilbo:volume2 --login
+```
+
+5. Check the device name from `dmesg` or `lsblk` (eg /dev/sdd). Errors in 
dmesg could be ignored: jscsi doesn't implement all the jscsi commands.
+
+6. Format the device (`mkfs.ext4 /dev/sdd`). (Yes, format the while device, 
not just a partition).
+
+7. Mount it (`mount /dev/sdd /mnt/target`).

http://git-wip-us.apache.org/repos/asf/hadoop/blob/966705ad/hadoop-dist/src/main/compose/cblock/docker-compose.yaml
----------------------------------------------------------------------
diff --git a/hadoop-dist/src/main/compose/cblock/docker-compose.yaml 
b/hadoop-dist/src/main/compose/cblock/docker-compose.yaml
new file mode 100644
index 0000000..fefb37f
--- /dev/null
+++ b/hadoop-dist/src/main/compose/cblock/docker-compose.yaml
@@ -0,0 +1,64 @@
+# 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.
+
+version: "3"
+services:
+   namenode:
+      image: elek/hadoop-runner:latest
+      hostname: namenode
+      volumes:
+         - ../..//hadoop-${VERSION}:/opt/hadoop
+      ports:
+         - 9870:9870
+      environment:
+          ENSURE_NAMENODE_DIR: /data/namenode
+      env_file:
+         - ./docker-config
+      command: ["/opt/hadoop/bin/hdfs","namenode"]
+   datanode:
+      image: elek/hadoop-runner:latest
+      volumes:
+        - ../..//hadoop-${VERSION}:/opt/hadoop
+      ports:
+        - 9864
+      command: ["/opt/hadoop/bin/hdfs","datanode"]
+   jscsi:
+      image: elek/hadoop-runner:latest
+      ports:
+        - 3260:3260
+      volumes:
+         - ../..//hadoop-${VERSION}:/opt/hadoop
+      env_file:
+          - ./docker-config
+      command: ["/opt/hadoop/bin/hdfs","jscsi"]
+   cblock:
+      image: elek/hadoop-runner:latest
+      volumes:
+         - ../..//hadoop-${VERSION}:/opt/hadoop
+      env_file:
+          - ./docker-config
+      command: ["/opt/hadoop/bin/hdfs","cblockserver"]
+   scm:
+      image: elek/hadoop-runner:latest
+      volumes:
+         - ../..//hadoop-${VERSION}:/opt/hadoop
+      ports:
+         - 9876:9876
+      env_file:
+          - ./docker-config
+      command: ["/opt/hadoop/bin/hdfs","scm"]
+      environment:
+          ENSURE_SCM_INITIALIZED: /data/metadata/scm/current/VERSION

http://git-wip-us.apache.org/repos/asf/hadoop/blob/966705ad/hadoop-dist/src/main/compose/cblock/docker-config
----------------------------------------------------------------------
diff --git a/hadoop-dist/src/main/compose/cblock/docker-config 
b/hadoop-dist/src/main/compose/cblock/docker-config
new file mode 100644
index 0000000..6851bc6
--- /dev/null
+++ b/hadoop-dist/src/main/compose/cblock/docker-config
@@ -0,0 +1,38 @@
+# 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.
+
+CORE-SITE.XML_fs.defaultFS=hdfs://namenode:9000
+OZONE-SITE.XML_ozone.ksm.address=ksm
+OZONE-SITE.XML_ozone.scm.names=scm
+OZONE-SITE.XML_ozone.enabled=True
+OZONE-SITE.XML_ozone.scm.datanode.id=/data/datanode.id
+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.scm.client.address=scm
+
+OZONE-SITE.XML_dfs.cblock.jscsi.cblock.server.address=cblock
+OZONE-SITE.XML_dfs.cblock.scm.ipaddress=scm
+OZONE-SITE.XML_dfs.cblock.service.leveldb.path=/tmp
+
+HDFS-SITE.XML_dfs.namenode.rpc-address=namenode:9000
+HDFS-SITE.XML_dfs.namenode.name.dir=/data/namenode
+HDFS-SITE.XML_rpc.metrics.quantile.enable=true
+HDFS-SITE.XML_rpc.metrics.percentiles.intervals=60,300
+LOG4J.PROPERTIES_log4j.rootLogger=info,stdout
+LOG4J.PROPERTIES_log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+LOG4J.PROPERTIES_log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+LOG4J.PROPERTIES_log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd 
HH:mm:ss} %-5p %c{1}:%L - %m%n

http://git-wip-us.apache.org/repos/asf/hadoop/blob/966705ad/hadoop-dist/src/main/compose/ozone/.env
----------------------------------------------------------------------
diff --git a/hadoop-dist/src/main/compose/ozone/.env 
b/hadoop-dist/src/main/compose/ozone/.env
new file mode 100644
index 0000000..af20d3e
--- /dev/null
+++ b/hadoop-dist/src/main/compose/ozone/.env
@@ -0,0 +1,17 @@
+# 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.
+
+VERSION=${project.version}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/966705ad/hadoop-dist/src/main/compose/ozone/docker-compose.yaml
----------------------------------------------------------------------
diff --git a/hadoop-dist/src/main/compose/ozone/docker-compose.yaml 
b/hadoop-dist/src/main/compose/ozone/docker-compose.yaml
new file mode 100644
index 0000000..02713c7
--- /dev/null
+++ b/hadoop-dist/src/main/compose/ozone/docker-compose.yaml
@@ -0,0 +1,59 @@
+# 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.
+
+version: "3"
+services:
+   namenode:
+      image: elek/hadoop-runner:latest
+      hostname: namenode
+      volumes:
+         - ../..//hadoop-${VERSION}:/opt/hadoop
+      ports:
+         - 9870:9870
+      environment:
+          ENSURE_NAMENODE_DIR: /data/namenode
+      env_file:
+         - ./docker-config
+      command: ["/opt/hadoop/bin/hdfs","namenode"]
+   datanode:
+      image: elek/hadoop-runner:latest
+      volumes:
+        - ../..//hadoop-${VERSION}:/opt/hadoop
+      ports:
+        - 9864
+      command: ["/opt/hadoop/bin/hdfs","datanode"]
+   ksm:
+      image: elek/hadoop-runner:latest
+      volumes:
+         - ../..//hadoop-${VERSION}:/opt/hadoop
+      ports:
+         - 9874:9874
+      environment:
+         ENSURE_KSM_INITIALIZED: /data/metadata/ksm/current/VERSION
+      env_file:
+          - ./docker-config
+      command: ["/opt/hadoop/bin/hdfs","ksm"]
+   scm:
+      image: elek/hadoop-runner:latest
+      volumes:
+         - ../..//hadoop-${VERSION}:/opt/hadoop
+      ports:
+         - 9876:9876
+      env_file:
+          - ./docker-config
+      environment:
+          ENSURE_SCM_INITIALIZED: /data/metadata/scm/current/VERSION
+      command: ["/opt/hadoop/bin/hdfs","scm"]

http://git-wip-us.apache.org/repos/asf/hadoop/blob/966705ad/hadoop-dist/src/main/compose/ozone/docker-config
----------------------------------------------------------------------
diff --git a/hadoop-dist/src/main/compose/ozone/docker-config 
b/hadoop-dist/src/main/compose/ozone/docker-config
new file mode 100644
index 0000000..c3f3663
--- /dev/null
+++ b/hadoop-dist/src/main/compose/ozone/docker-config
@@ -0,0 +1,33 @@
+# 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.
+
+CORE-SITE.XML_fs.defaultFS=hdfs://namenode:9000
+OZONE-SITE.XML_ozone.ksm.address=ksm
+OZONE-SITE.XML_ozone.scm.names=scm
+OZONE-SITE.XML_ozone.enabled=True
+OZONE-SITE.XML_ozone.scm.datanode.id=/data/datanode.id
+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.scm.client.address=scm
+HDFS-SITE.XML_dfs.namenode.rpc-address=namenode:9000
+HDFS-SITE.XML_dfs.namenode.name.dir=/data/namenode
+HDFS-SITE.XML_rpc.metrics.quantile.enable=true
+HDFS-SITE.XML_rpc.metrics.percentiles.intervals=60,300
+LOG4J.PROPERTIES_log4j.rootLogger=INFO, stdout
+LOG4J.PROPERTIES_log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+LOG4J.PROPERTIES_log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+LOG4J.PROPERTIES_log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd 
HH:mm:ss} %-5p %c{1}:%L - %m%n


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

Reply via email to