HDDS-218. add existing docker-compose files to the ozone release artifact. Contributed by Elek Marton.
This commit is contained in:
parent
fa121eb66b
commit
9dd5d5ba71
@ -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/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/yarn
|
||||
|
@ -276,23 +276,6 @@
|
||||
<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>
|
||||
|
51
hadoop-dist/src/main/compose/README.md
Normal file
51
hadoop-dist/src/main/compose/README.md
Normal 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.
|
@ -19,7 +19,7 @@ services:
|
||||
datanode:
|
||||
image: apache/hadoop-runner
|
||||
volumes:
|
||||
- ../../ozone:/opt/hadoop
|
||||
- ../..:/opt/hadoop
|
||||
ports:
|
||||
- 9864
|
||||
command: ["/opt/hadoop/bin/ozone","datanode"]
|
||||
@ -28,7 +28,7 @@ services:
|
||||
ozoneManager:
|
||||
image: apache/hadoop-runner
|
||||
volumes:
|
||||
- ../../ozone:/opt/hadoop
|
||||
- ../..:/opt/hadoop
|
||||
ports:
|
||||
- 9874:9874
|
||||
environment:
|
||||
@ -39,7 +39,7 @@ services:
|
||||
scm:
|
||||
image: apache/hadoop-runner
|
||||
volumes:
|
||||
- ../../ozone:/opt/hadoop
|
||||
- ../..:/opt/hadoop
|
||||
ports:
|
||||
- 9876:9876
|
||||
env_file:
|
||||
|
@ -19,7 +19,7 @@ services:
|
||||
datanode:
|
||||
image: apache/hadoop-runner
|
||||
volumes:
|
||||
- ../../ozone:/opt/hadoop
|
||||
- ../..:/opt/hadoop
|
||||
- ./jmxpromo.jar:/opt/jmxpromo.jar
|
||||
ports:
|
||||
- 9864
|
||||
@ -29,7 +29,7 @@ services:
|
||||
ozoneManager:
|
||||
image: apache/hadoop-runner
|
||||
volumes:
|
||||
- ../../ozone:/opt/hadoop
|
||||
- ../..:/opt/hadoop
|
||||
- ./jmxpromo.jar:/opt/jmxpromo.jar
|
||||
ports:
|
||||
- 9874:9874
|
||||
@ -41,7 +41,7 @@ services:
|
||||
scm:
|
||||
image: apache/hadoop-runner
|
||||
volumes:
|
||||
- ../../ozone:/opt/hadoop
|
||||
- ../..:/opt/hadoop
|
||||
- ./jmxpromo.jar:/opt/jmxpromo.jar
|
||||
ports:
|
||||
- 9876:9876
|
||||
|
@ -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
|
||||
in the background.
|
||||
```
|
||||
cd hadoop-dist/target/compose/ozone
|
||||
cd hadoop-dist/target/ozone/compose/ozone
|
||||
|
||||
docker-compose up -d
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user