-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-2588. Consolidate compose environments #238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
800cda2
HDDS-2588. Consolidate compose environments
adoroszlai b4b5866
HDDS-2588. Rename ozoneperf compose env to ozone
adoroszlai 1677175
HDDS-2588. Extract monitoring and profiling into composable parts
adoroszlai 2fe6bb8
Merge remote-tracking branch 'origin/master' into HDDS-2588
adoroszlai 246e35b
HDDS-2588. Update README, fix Freon
adoroszlai 382e2a5
HDDS-2588. Add run.sh for convenience; control replication factor via…
adoroszlai ae2bc55
HDDS-2588. No need for one-liner config files
adoroszlai 537da78
Merge remote-tracking branch 'origin/master' into HDDS-2588
adoroszlai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
66 changes: 0 additions & 66 deletions
66
hadoop-ozone/dist/src/main/compose/ozone-recon/docker-compose.yaml
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
hadoop-ozone/dist/src/main/compose/ozone-recon/docker-config
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| <!--- | ||
| 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. | ||
| --> | ||
|
|
||
| # Compose file with optional monitoring and profiling configs | ||
|
|
||
| This directory contains a docker-compose definition for an Ozone cluster with all components (including S3 Gateway and Recon). | ||
|
|
||
| There are two optional add-ons: | ||
|
|
||
| * monitoring: adds Grafana, Jaeger and Prometheus sercvies, and configures Ozone to work with them | ||
| * profiling: allows sampling Ozone CPU/memory using [async-profiler](https://github.com/jvm-profiling-tools/async-profiler) | ||
|
|
||
| ## How to start | ||
|
|
||
| TL;DR: | ||
|
|
||
| 1. single datanode: | ||
| ``` | ||
| ./run.sh -d | ||
| ``` | ||
| 2. three datanodes for replication: | ||
| ``` | ||
| export OZONE_REPLICATION_FACTOR=3 | ||
| ./run.sh -d | ||
| ``` | ||
|
|
||
| ### Basics | ||
|
|
||
| The cluster can be started with regular `docker-compose up` command. Use `-d` to start the cluster in the background. | ||
|
|
||
| You can change the number of datanodes to start using the `--scale` option. Eg. to start 3 datanodes: `docker-compose up -d --scale datanode=3`. | ||
|
|
||
| The cluster's replication factor (1 or 3) can be controlled by setting the `OZONE_REPLICATION_FACTOR` environment variable. It defaults to 1 to match the number of datanodes started by default, without the `--scale` option. | ||
|
|
||
| For convenience the `run.sh` script can be used to make sure the replication factor and the number of datanodes match. It also passes any additional arguments provided on the command-line (eg. `-d`) to `docker-compose`. | ||
|
|
||
| ### Add-ons | ||
|
|
||
| Monitoring and/or performance add-ons can be enabled via docker-compose's ability to use multiple compose files (by using the [`-f` option repeatedly](https://docs.docker.com/compose/reference/overview/#specifying-multiple-compose-files), or more easily by defining the [`COMPOSE_FILE` environment variable](https://docs.docker.com/compose/reference/envvars/#compose_file)): | ||
|
|
||
| ``` | ||
| # no COMPOSE_FILE var # => only Ozone | ||
| export COMPOSE_FILE=docker-compose.yaml:monitoring.yaml # => add monitoring | ||
| export COMPOSE_FILE=docker-compose.yaml:profiling.yaml # => add profiling | ||
| export COMPOSE_FILE=docker-compose.yaml:monitoring.yaml:profiling.yaml # => add both | ||
| ``` | ||
|
|
||
| Once the variable is defined, Ozone cluster with add-ons can be started/scaled/stopped etc. using the same `docker-compose` commands as for the base cluster. | ||
|
|
||
| ### Load generator | ||
|
|
||
| Ozone comes with a load generator called Freon. | ||
|
|
||
| You can enter one of the containers (eg. SCM) and start a Freon test: | ||
|
|
||
| ``` | ||
| docker-compose exec scm bash | ||
| ozone freon ockg -n1000 | ||
| ``` | ||
|
|
||
| You can also start two flavors of Freon as separate services, which allows scaling them up. Once all the datanodes are started, start Freon by adding its definition to `COMPOSE_FILE` and re-running the `docker-compose up` or `run.sh` command: | ||
|
|
||
| ``` | ||
| export COMPOSE_FILE="${COMPOSE_FILE}:freon-ockg.yaml" | ||
|
|
||
| docker-compose up -d --no-recreate --scale datanode=3 | ||
| # OR | ||
| ./run.sh -d | ||
| ``` | ||
|
|
||
| ## How to use | ||
|
|
||
| You can check the ozone web ui: | ||
|
|
||
| OzoneManager: http://localhost:9874 | ||
| SCM: http://localhost:9876 | ||
|
|
||
| ### Monitoring | ||
|
|
||
| * Prometheus: follows a pull based approach where metrics are published on an HTTP endpoint. Metrics can be checked on [Prometheus' web UI](http://localhost:9090/) | ||
| * Grafana: comes with two [dashboards](http://localhost:3000) for Ozone | ||
| * Ozone - Object Metrics | ||
| * Ozone - RPC Metrics | ||
| * Jaeger: collects distributed tracing information from Ozone, can be queried on the [Jaeger web UI](http://localhost:16686) | ||
|
|
||
| ### Profiling | ||
|
|
||
| Start by hitting the `/prof` endpoint on the service to be profiled, eg. http://localhost:9876/prof for SCM. [Detailed instructions](https://cwiki.apache.org/confluence/display/HADOOP/Java+Profiling+of+Ozone) can be found in the Hadoop wiki. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/data/metadata/reon -> /data/metadata/om
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bharatviswa504 for spotting this. These config values from
ozone-reconenv as they were.@avijayanhwx @swagle can Recon use the same directory for both
ozone.recon.db.dirandozone.recon.om.db.dir?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adoroszlai Yes the same directory can be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @avijayanhwx. Then I think we can keep it as is.