From bf206f014a3e6335f24c718c520e2bf2a91cb4f4 Mon Sep 17 00:00:00 2001 From: Anu Engineer Date: Fri, 2 Mar 2018 16:30:37 -0800 Subject: [PATCH] HDFS-13196. Ozone: dozone: make example docker-compose files version independent. Contributed by Elek, Marton. --- hadoop-dist/pom.xml | 37 +++++++++++++++++++ .../src/main}/compose/cblock/.env | 2 +- .../src/main}/compose/cblock/README.md | 0 .../main}/compose/cblock/docker-compose.yaml | 10 ++--- .../src/main}/compose/cblock/docker-config | 0 .../src/main}/compose/ozone/.env | 2 +- .../main}/compose/ozone/docker-compose.yaml | 9 ++--- .../src/main}/compose/ozone/docker-config | 0 8 files changed, 48 insertions(+), 12 deletions(-) rename {dev-support => hadoop-dist/src/main}/compose/cblock/.env (96%) rename {dev-support => hadoop-dist/src/main}/compose/cblock/README.md (100%) rename {dev-support => hadoop-dist/src/main}/compose/cblock/docker-compose.yaml (84%) rename {dev-support => hadoop-dist/src/main}/compose/cblock/docker-config (100%) rename {dev-support => hadoop-dist/src/main}/compose/ozone/.env (96%) rename {dev-support => hadoop-dist/src/main}/compose/ozone/docker-compose.yaml (85%) rename {dev-support => hadoop-dist/src/main}/compose/ozone/docker-config (100%) diff --git a/hadoop-dist/pom.xml b/hadoop-dist/pom.xml index 1ccbbce84d..7b885c95be 100644 --- a/hadoop-dist/pom.xml +++ b/hadoop-dist/pom.xml @@ -140,6 +140,43 @@ + + maven-resources-plugin + + + copy-docker-compose + + copy-resources + + prepare-package + + ${project.build.directory}/compose + + + src/main/compose + true + + + + + + copy-dockerfile + + copy-resources + + prepare-package + + ${project.build.directory} + + + src/main/docker + true + + + + + + diff --git a/dev-support/compose/cblock/.env b/hadoop-dist/src/main/compose/cblock/.env similarity index 96% rename from dev-support/compose/cblock/.env rename to hadoop-dist/src/main/compose/cblock/.env index f7ca18b5d8..af20d3e349 100644 --- a/dev-support/compose/cblock/.env +++ b/hadoop-dist/src/main/compose/cblock/.env @@ -14,4 +14,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION=3.1.0-SNAPSHOT +VERSION=${project.version} \ No newline at end of file diff --git a/dev-support/compose/cblock/README.md b/hadoop-dist/src/main/compose/cblock/README.md similarity index 100% rename from dev-support/compose/cblock/README.md rename to hadoop-dist/src/main/compose/cblock/README.md diff --git a/dev-support/compose/cblock/docker-compose.yaml b/hadoop-dist/src/main/compose/cblock/docker-compose.yaml similarity index 84% rename from dev-support/compose/cblock/docker-compose.yaml rename to hadoop-dist/src/main/compose/cblock/docker-compose.yaml index 4931a4bb3e..fefb37fd7d 100644 --- a/dev-support/compose/cblock/docker-compose.yaml +++ b/hadoop-dist/src/main/compose/cblock/docker-compose.yaml @@ -20,7 +20,7 @@ services: image: elek/hadoop-runner:latest hostname: namenode volumes: - - ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop + - ../..//hadoop-${VERSION}:/opt/hadoop ports: - 9870:9870 environment: @@ -31,7 +31,7 @@ services: datanode: image: elek/hadoop-runner:latest volumes: - - ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop + - ../..//hadoop-${VERSION}:/opt/hadoop ports: - 9864 command: ["/opt/hadoop/bin/hdfs","datanode"] @@ -40,21 +40,21 @@ services: ports: - 3260:3260 volumes: - - ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop + - ../..//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 + - ../..//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 + - ../..//hadoop-${VERSION}:/opt/hadoop ports: - 9876:9876 env_file: diff --git a/dev-support/compose/cblock/docker-config b/hadoop-dist/src/main/compose/cblock/docker-config similarity index 100% rename from dev-support/compose/cblock/docker-config rename to hadoop-dist/src/main/compose/cblock/docker-config diff --git a/dev-support/compose/ozone/.env b/hadoop-dist/src/main/compose/ozone/.env similarity index 96% rename from dev-support/compose/ozone/.env rename to hadoop-dist/src/main/compose/ozone/.env index f7ca18b5d8..af20d3e349 100644 --- a/dev-support/compose/ozone/.env +++ b/hadoop-dist/src/main/compose/ozone/.env @@ -14,4 +14,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION=3.1.0-SNAPSHOT +VERSION=${project.version} \ No newline at end of file diff --git a/dev-support/compose/ozone/docker-compose.yaml b/hadoop-dist/src/main/compose/ozone/docker-compose.yaml similarity index 85% rename from dev-support/compose/ozone/docker-compose.yaml rename to hadoop-dist/src/main/compose/ozone/docker-compose.yaml index ee5e0bc042..02713c7568 100644 --- a/dev-support/compose/ozone/docker-compose.yaml +++ b/hadoop-dist/src/main/compose/ozone/docker-compose.yaml @@ -20,9 +20,8 @@ services: image: elek/hadoop-runner:latest hostname: namenode volumes: - - ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop + - ../..//hadoop-${VERSION}:/opt/hadoop ports: - - 50070:50070 - 9870:9870 environment: ENSURE_NAMENODE_DIR: /data/namenode @@ -32,14 +31,14 @@ services: datanode: image: elek/hadoop-runner:latest volumes: - - ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop + - ../..//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 + - ../..//hadoop-${VERSION}:/opt/hadoop ports: - 9874:9874 environment: @@ -50,7 +49,7 @@ services: scm: image: elek/hadoop-runner:latest volumes: - - ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop + - ../..//hadoop-${VERSION}:/opt/hadoop ports: - 9876:9876 env_file: diff --git a/dev-support/compose/ozone/docker-config b/hadoop-dist/src/main/compose/ozone/docker-config similarity index 100% rename from dev-support/compose/ozone/docker-config rename to hadoop-dist/src/main/compose/ozone/docker-config