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

This commit is contained in:
Anu Engineer 2018-03-02 16:30:37 -08:00 committed by Owen O'Malley
parent f4466402ae
commit bf206f014a
8 changed files with 48 additions and 12 deletions

View File

@ -140,6 +140,43 @@
</execution> </execution>
</executions> </executions>
</plugin> </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> </plugins>
</build> </build>

View File

@ -14,4 +14,4 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
VERSION=3.1.0-SNAPSHOT VERSION=${project.version}

View File

@ -20,7 +20,7 @@ services:
image: elek/hadoop-runner:latest image: elek/hadoop-runner:latest
hostname: namenode hostname: namenode
volumes: volumes:
- ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop - ../..//hadoop-${VERSION}:/opt/hadoop
ports: ports:
- 9870:9870 - 9870:9870
environment: environment:
@ -31,7 +31,7 @@ services:
datanode: datanode:
image: elek/hadoop-runner:latest image: elek/hadoop-runner:latest
volumes: volumes:
- ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop - ../..//hadoop-${VERSION}:/opt/hadoop
ports: ports:
- 9864 - 9864
command: ["/opt/hadoop/bin/hdfs","datanode"] command: ["/opt/hadoop/bin/hdfs","datanode"]
@ -40,21 +40,21 @@ services:
ports: ports:
- 3260:3260 - 3260:3260
volumes: volumes:
- ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop - ../..//hadoop-${VERSION}:/opt/hadoop
env_file: env_file:
- ./docker-config - ./docker-config
command: ["/opt/hadoop/bin/hdfs","jscsi"] command: ["/opt/hadoop/bin/hdfs","jscsi"]
cblock: cblock:
image: elek/hadoop-runner:latest image: elek/hadoop-runner:latest
volumes: volumes:
- ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop - ../..//hadoop-${VERSION}:/opt/hadoop
env_file: env_file:
- ./docker-config - ./docker-config
command: ["/opt/hadoop/bin/hdfs","cblockserver"] command: ["/opt/hadoop/bin/hdfs","cblockserver"]
scm: scm:
image: elek/hadoop-runner:latest image: elek/hadoop-runner:latest
volumes: volumes:
- ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop - ../..//hadoop-${VERSION}:/opt/hadoop
ports: ports:
- 9876:9876 - 9876:9876
env_file: env_file:

View File

@ -14,4 +14,4 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
VERSION=3.1.0-SNAPSHOT VERSION=${project.version}

View File

@ -20,9 +20,8 @@ services:
image: elek/hadoop-runner:latest image: elek/hadoop-runner:latest
hostname: namenode hostname: namenode
volumes: volumes:
- ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop - ../..//hadoop-${VERSION}:/opt/hadoop
ports: ports:
- 50070:50070
- 9870:9870 - 9870:9870
environment: environment:
ENSURE_NAMENODE_DIR: /data/namenode ENSURE_NAMENODE_DIR: /data/namenode
@ -32,14 +31,14 @@ services:
datanode: datanode:
image: elek/hadoop-runner:latest image: elek/hadoop-runner:latest
volumes: volumes:
- ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop - ../..//hadoop-${VERSION}:/opt/hadoop
ports: ports:
- 9864 - 9864
command: ["/opt/hadoop/bin/hdfs","datanode"] command: ["/opt/hadoop/bin/hdfs","datanode"]
ksm: ksm:
image: elek/hadoop-runner:latest image: elek/hadoop-runner:latest
volumes: volumes:
- ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop - ../..//hadoop-${VERSION}:/opt/hadoop
ports: ports:
- 9874:9874 - 9874:9874
environment: environment:
@ -50,7 +49,7 @@ services:
scm: scm:
image: elek/hadoop-runner:latest image: elek/hadoop-runner:latest
volumes: volumes:
- ../../../hadoop-dist/target/hadoop-${VERSION}:/opt/hadoop - ../..//hadoop-${VERSION}:/opt/hadoop
ports: ports:
- 9876:9876 - 9876:9876
env_file: env_file: