Use doris compose to create doris docker compose clusters.
/opt/apache-doris/{fe, be, cloud}
if don't create cloud cluster, the image no need to contains the cloud pkg.
if build doris use sh build.sh --fe --be --cloud, then its output satisfy with all above, then run command in doris root
docker build -f docker/runtime/doris-compose/Dockerfile -t <image> .
will generate a image.
python -m pip install --user -r docker/runtime/doris-compose/requirements.txt
python docker/runtime/doris-compose/doris-compose.py up <cluster-name> <image?>
--add-fe-num <add-fe-num> --add-be-num <add-be-num>
--fe-id <fd-id> --be-id <be-id>
...
[ --cloud ]
if it's a new cluster, must specific the image.
add fe/be nodes with the specific image, or update existing nodes with --fe-id, --be-id
For create a cloud cluster, steps are as below:
The simplest way to create a cloud cluster:
python docker/runtime/doris-compose/doris-compose.py up <cluster-name> <image> --cloud
It will create 1 fdb, 1 meta service server, 1 recycler, 3 fe and 3 be.
python docker/runtime/doris-compose/doris-compose.py down <cluster-name> --fe-id <fe-id> --be-id<be-id> [--clean] [--drop-force]
Down the containers and remove it from the DB.
For BE, if specific drop force, it will send dropp sql to FE, otherwise it will send decommission sql to FE.
If specific --clean, it will delete its data too.
python docker/runtime/doris-compose/doris-compose.py start <cluster-name> --fe-id <multiple fe ids> --be-id <multiple be ids> python docker/runtime/doris-compose/doris-compose.py restart <cluster-name> --fe-id <multiple fe ids> --be-id <multiple be ids>
python docker/runtime/doris-compose/doris-compose.py ls <multiple cluster names>
if specific cluster names, it will list all the cluster's nodes.
Otherwise it will just list summary of each clusters.
There are more options about doris-compose. Just try
python docker/runtime/doris-compose/doris-compose.py <command> -h
python docker/runtime/doris-compose/doris-compose.py config <cluster-name> <doris-root-path> [-q] [--connect-follow-fe]
Generate regression-conf-custom.groovy to connect to the specific docker cluster.
steps:
python doris-compose.py up my-cluster my-image --add-fe-num 2 --add-be-num 4 --cloudpython doris-compose.py config my-cluster <doris-root-path> --connect-follow-febash run-regression-test.sh --run -times 1 -parallel 1 -suiteParallel 1 -d cloud/multi_cluster