HDDS-218. add existing docker-compose files to the ozone release artifact. Contributed by Elek Marton.

This commit is contained in:
Xiaoyu Yao 2018-08-17 07:58:24 -07:00
parent fa121eb66b
commit 9dd5d5ba71
6 changed files with 60 additions and 24 deletions

View File

@ -151,6 +151,8 @@ cp "${ROOT}/hadoop-ozone/ozonefs/target/hadoop-ozone-filesystem-${HDDS_VERSION}.
cp -r "${ROOT}/hadoop-ozone/docs/target/classes/webapps/docs" ./share/hadoop/ozone/webapps/ozoneManager/ cp -r "${ROOT}/hadoop-ozone/docs/target/classes/webapps/docs" ./share/hadoop/ozone/webapps/ozoneManager/
cp -r "${ROOT}/hadoop-ozone/docs/target/classes/webapps/docs" ./share/hadoop/hdds/webapps/scm/ cp -r "${ROOT}/hadoop-ozone/docs/target/classes/webapps/docs" ./share/hadoop/hdds/webapps/scm/
#Copy docker compose files
run cp -p -r "${ROOT}/hadoop-dist/src/main/compose" .
mkdir -p ./share/hadoop/mapreduce mkdir -p ./share/hadoop/mapreduce
mkdir -p ./share/hadoop/yarn mkdir -p ./share/hadoop/yarn

View File

@ -276,23 +276,6 @@
<plugin> <plugin>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<executions> <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> <execution>
<id>copy-dockerfile</id> <id>copy-dockerfile</id>
<goals> <goals>

View File

@ -0,0 +1,51 @@
<!---
Licensed 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. See accompanying LICENSE file.
-->
# Docker cluster definitions
This directory contains multiple docker cluster definitions to start local pseudo cluster with different configuration.
It helps to start local (multi-node like) pseudo cluster with docker and docker-compose and obviously it's not for production.
You may find more information in the specific subdirectories but in generic you can use the following commands:
## Usage
To start a cluster go to a subdirectory and start the cluster:
```
docker-compose up -d
```
You can check the logs of all the components with:
```
docker-compose logs
```
In case of a problem you can destroy the cluster an delete all the local state with:
```
docker-compose down
```
(Note: a simple docker-compose stop may not delete all the local data).
You can scale up and down the components:
```
docker-compose scale datanode=5
```
Usually the key webui ports are published on the docker host.

View File

@ -19,7 +19,7 @@ services:
datanode: datanode:
image: apache/hadoop-runner image: apache/hadoop-runner
volumes: volumes:
- ../../ozone:/opt/hadoop - ../..:/opt/hadoop
ports: ports:
- 9864 - 9864
command: ["/opt/hadoop/bin/ozone","datanode"] command: ["/opt/hadoop/bin/ozone","datanode"]
@ -28,7 +28,7 @@ services:
ozoneManager: ozoneManager:
image: apache/hadoop-runner image: apache/hadoop-runner
volumes: volumes:
- ../../ozone:/opt/hadoop - ../..:/opt/hadoop
ports: ports:
- 9874:9874 - 9874:9874
environment: environment:
@ -39,7 +39,7 @@ services:
scm: scm:
image: apache/hadoop-runner image: apache/hadoop-runner
volumes: volumes:
- ../../ozone:/opt/hadoop - ../..:/opt/hadoop
ports: ports:
- 9876:9876 - 9876:9876
env_file: env_file:

View File

@ -19,7 +19,7 @@ services:
datanode: datanode:
image: apache/hadoop-runner image: apache/hadoop-runner
volumes: volumes:
- ../../ozone:/opt/hadoop - ../..:/opt/hadoop
- ./jmxpromo.jar:/opt/jmxpromo.jar - ./jmxpromo.jar:/opt/jmxpromo.jar
ports: ports:
- 9864 - 9864
@ -29,7 +29,7 @@ services:
ozoneManager: ozoneManager:
image: apache/hadoop-runner image: apache/hadoop-runner
volumes: volumes:
- ../../ozone:/opt/hadoop - ../..:/opt/hadoop
- ./jmxpromo.jar:/opt/jmxpromo.jar - ./jmxpromo.jar:/opt/jmxpromo.jar
ports: ports:
- 9874:9874 - 9874:9874
@ -41,7 +41,7 @@ services:
scm: scm:
image: apache/hadoop-runner image: apache/hadoop-runner
volumes: volumes:
- ../../ozone:/opt/hadoop - ../..:/opt/hadoop
- ./jmxpromo.jar:/opt/jmxpromo.jar - ./jmxpromo.jar:/opt/jmxpromo.jar
ports: ports:
- 9876:9876 - 9876:9876

View File

@ -81,7 +81,7 @@ Go to the directory where the docker compose files exist and tell
`docker-compose` to start Ozone. This will start SCM, OM and a single datanode `docker-compose` to start Ozone. This will start SCM, OM and a single datanode
in the background. in the background.
``` ```
cd hadoop-dist/target/compose/ozone cd hadoop-dist/target/ozone/compose/ozone
docker-compose up -d docker-compose up -d
``` ```