This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 85a0700980 HDDS-8669. Update compose README (#4796)
85a0700980 is described below

commit 85a070098034ef1f75a0be0e0e9324ac7d77b283
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Sat Jun 3 07:15:15 2023 +0200

    HDDS-8669. Update compose README (#4796)
---
 hadoop-ozone/dist/src/main/compose/README.md | 54 +++++++++++++++++++++-------
 1 file changed, 42 insertions(+), 12 deletions(-)

diff --git a/hadoop-ozone/dist/src/main/compose/README.md 
b/hadoop-ozone/dist/src/main/compose/README.md
index 8189d2c169..52202280d4 100644
--- a/hadoop-ozone/dist/src/main/compose/README.md
+++ b/hadoop-ozone/dist/src/main/compose/README.md
@@ -14,38 +14,68 @@
 
 # Docker cluster definitions
 
-This directory contains multiple docker cluster definitions to start local 
pseudo cluster with different configuration.
+This directory contains Docker Compose cluster definitions that allow running 
Ozone in a pseudo multi-node environment locally.
 
-It helps to start local (multi-node like) pseudo cluster with docker and 
docker-compose and obviously it's not for production.
+These provide:
 
-You may find more information in the specific subdirectories but in generic 
you can use the following commands:
+ * examples of how to configure various Ozone services in different 
environments (HA/non-HA, secure/unsecure, etc.)
+ * an environment for developers and CI workflows to test Ozone
+ * playground for experiments
+
+Obviously none of these definitions are for production.
+
+## Structure
+
+Clusters are defined in `docker-compose.yaml`, cluster-wide settings are 
externalized in `docker-config` (see 
[envtoconf](https://github.com/flokkr/launcher#envtoconf-simple-configuration-loading)
 for syntax details).
 
 ## Usage
 
-To start a cluster go to a subdirectory and start the cluster:
+Standard `docker-compose` commands can be used to start, stop, or destroy the 
cluster, check logs, or execute commands in the containers.
+
+Most environments allow scaling the number of datanodes.
+
+Key ports (web UI, RPC) are usually published on the docker host.  Datanode 
ports are published on random local ports, since there can be multiple 
instances of the same service.
+
+### Starting the Cluster
 
 ```
 docker-compose up -d
 ```
 
-You can check the logs of all the components with:
+### Checking Service Logs
 
 ```
-docker-compose logs
+docker-compose logs              # all services
+docker-compose logs <service>    # specific service, e.g. `scm`
+docker-compose logs -f <service> # follow logs, as in `tail -f`
 ```
 
-In case of a problem you can destroy the cluster an delete all the local state 
with:
+### Scaling Services
 
 ```
-docker-compose down
+docker-compose up -d --no-restart --scale datanode=5
 ```
 
-(Note: a simple docker-compose stop may not delete all the local data).
+### Executing Commands
 
-You can scale up and down the components:
+```
+docker-compose exec <service> ozone version # one-off command
+docker-compose exec <service> bash          # interactive shell
+```
+
+### Stopping the Cluster
 
 ```
-docker-compose scale datanode=5
+docker-compose stop <service>
+docker-compose start <service> # start specific service (again)
+docker-compose stop            # stop the cluster
+docker-compose down  -v        # stop and destroy
 ```
 
-Usually the key webui ports are published on the docker host.
+## Tests
+
+Most subdirectories contain `test.sh`, some also have other `test-*.sh` 
scripts.  These are run in CI by Github Actions, but can also be run locally 
(requires: bash, docker, docker-compose, jq).
+
+Tests are implemented in `../smoketest/` using Robot Framework.
+
+To add an acceptance test with specific Ozone configuration, create a shell 
script that follows the naming convention `test-*.sh`, and add your custom 
confing in a YAML file.  See `test-legacy-bucket.sh` and `legacy-bucket.yaml` 
in `ozone/` for example.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to