[Doc] move docker compose related documents to StarRocks/demo (#34883)
Signed-off-by: yandongxiao <dxyan06@gmail.com>
This commit is contained in:
parent
f13f0e80a8
commit
ab2b465bfc
|
|
@ -1,53 +1 @@
|
|||
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=c615c99c-0f73-4a8b-af76-1e7ab83b90b5" />
|
||||
|
||||
# Docker Compose for StarRocks
|
||||
|
||||
This directory contains the Docker Compose YAML files for the StarRocks deployment.
|
||||
|
||||
You can deploy a StarRocks cluster with one BE node using [**docker-compose.yml**](./docker-compose.yml), or simulate a distributed StarRocks cluster with multiple BEs on a single instance using [docker-compose-3BE.yml](./docker-compose-3BE.yml).
|
||||
|
||||
Note that deploying with docker compose is only recommended in a testing environment, as high availability cannot be guaranteed with a single instance deployment.
|
||||
## Deploy StarRocks using Docker Compose
|
||||
|
||||
Run the following command to deploy StarRocks using Docker Compose:
|
||||
|
||||
```shell
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
The commented-out sections in the above example YAML file define the mount paths and volumes that FE and BE use to persist data.
|
||||
Note that root privilege is required to deploy StarRocks with Docker with persistent volume.
|
||||
|
||||
## Check cluster status
|
||||
|
||||
After StarRocks is deployed, check the cluster status:
|
||||
|
||||
1. Connect to the cluster with the IP address of the FE instance. You can get the IP address of an instance using `docker inspect`.
|
||||
|
||||
```shell
|
||||
mysql -h <fe_ip> -P9030 -uroot
|
||||
```
|
||||
|
||||
2. Check the status of the BE node.
|
||||
|
||||
```shell
|
||||
show backends;
|
||||
```
|
||||
|
||||
If the field Alive is true, this BE node is properly started and added to the cluster.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
When you connect to the cluster, StarRocks may return the following error:
|
||||
|
||||
```shell
|
||||
ERROR 2003 (HY000): Can't connect to MySQL server on 'starrocks-fe:9030' (111)
|
||||
```
|
||||
|
||||
The reason may be that the BE node was started before the FE node is ready. To solve this problem, re-run the docker compose up command, or manually add the BE node to the cluster using the following command:
|
||||
|
||||
```sql
|
||||
ADD BACKEND "<be_ip>:9050";
|
||||
```
|
||||
|
||||
Replace `<be_ip>` with the actual IP address of the BE node.
|
||||
Please see https://github.com/StarRocks/demo/tree/master/deploy/docker-compose for more information
|
||||
|
|
|
|||
|
|
@ -1,67 +0,0 @@
|
|||
version: "3.9"
|
||||
services:
|
||||
starrocks-fe:
|
||||
image: starrocks/fe-ubuntu:latest
|
||||
hostname: starrocks-fe
|
||||
container_name: starrocks-fe
|
||||
#user: root
|
||||
command: /opt/starrocks/fe/bin/start_fe.sh
|
||||
ports:
|
||||
- 1030:8030
|
||||
- 2020:9020
|
||||
- 3030:9030
|
||||
# volumes:
|
||||
# - path/of/host/fe.conf:/opt/starrocks/fe/conf/fe.conf
|
||||
# - path/of/host/fe/meta:/opt/starrocks/fe/meta
|
||||
|
||||
starrocks-be1:
|
||||
image: starrocks/be-ubuntu:latest
|
||||
#user: root
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- |
|
||||
sleep 15s; mysql --connect-timeout 2 -h starrocks-fe -P9030 -uroot -e "alter system add backend \"starrocks-be1:9050\";"
|
||||
/opt/starrocks/be/bin/start_be.sh
|
||||
|
||||
hostname: starrocks-be1
|
||||
container_name: starrocks-be1
|
||||
depends_on:
|
||||
- "starrocks-fe"
|
||||
# volumes:
|
||||
# - path/of/host/be.conf:/opt/starrocks/be/conf/be.conf
|
||||
# - path/of/host/starrocks-be1/storage:/opt/starrocks/be/storage
|
||||
starrocks-be2:
|
||||
image: starrocks/be-ubuntu:latest
|
||||
#user: root
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- |
|
||||
sleep 15s; mysql --connect-timeout 2 -h starrocks-fe -P9030 -uroot -e "alter system add backend \"starrocks-be2:9050\";"
|
||||
/opt/starrocks/be/bin/start_be.sh
|
||||
|
||||
hostname: starrocks-be2
|
||||
container_name: starrocks-be2
|
||||
depends_on:
|
||||
- "starrocks-fe"
|
||||
# volumes:
|
||||
# - path/of/host/be.conf:/opt/starrocks/be/conf/be.conf
|
||||
# - path/of/host/starrocks-be2/storage:/opt/starrocks/be/storage
|
||||
starrocks-be3:
|
||||
image: starrocks/be-ubuntu:latest
|
||||
#user: root
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- |
|
||||
sleep 15s; mysql --connect-timeout 2 -h starrocks-fe -P9030 -uroot -e "alter system add backend \"starrocks-be3:9050\";"
|
||||
/opt/starrocks/be/bin/start_be.sh
|
||||
|
||||
hostname: starrocks-be3
|
||||
container_name: starrocks-be3
|
||||
depends_on:
|
||||
- "starrocks-fe"
|
||||
# volumes:
|
||||
# - path/of/host/be.conf:/opt/starrocks/be/conf/be.conf
|
||||
# - path/of/host/starrocks-be3/storage:/opt/starrocks/be/storage
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
version: "3.9"
|
||||
services:
|
||||
starrocks-fe:
|
||||
image: starrocks/fe-ubuntu:latest
|
||||
hostname: starrocks-fe
|
||||
container_name: starrocks-fe
|
||||
command:
|
||||
/opt/starrocks/fe/bin/start_fe.sh
|
||||
ports:
|
||||
- 8030:8030
|
||||
- 9020:9020
|
||||
- 9030:9030
|
||||
# volumes:
|
||||
# - ../../conf/fe.conf:/opt/starrocks/fe/conf/fe.conf
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9030"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
|
||||
starrocks-be:
|
||||
image: starrocks/be-ubuntu:latest
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- |
|
||||
sleep 15s; mysql --connect-timeout 2 -h starrocks-fe -P9030 -uroot -e "alter system add backend \"starrocks-be:9050\";"
|
||||
/opt/starrocks/be/bin/start_be.sh
|
||||
ports:
|
||||
- 8040:8040
|
||||
hostname: starrocks-be
|
||||
container_name: starrocks-be
|
||||
depends_on:
|
||||
- starrocks-fe
|
||||
# volumes:
|
||||
# - ../../conf/be.conf:/opt/starrocks/be/conf/be.conf
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=e31c2705-953e-4541-9cec-69e76515bd37" />
|
||||
|
||||
# StarRocks Stacks Docker Compose
|
||||
|
||||
Docker Compose for StarRocks AllIn1 container and a few other peripheral applications for StarRocks development and test on local laptop
|
||||
|
||||
## This compose file composes the following services:
|
||||
- starrocks allin1 local cluster service.
|
||||
- minio local service (emulation for S3, used by testing broker load).
|
||||
- azurite service (emulation for Azure blob storage, used by testing broker load).
|
||||
- zeppelin local service with: (used as sql notebook and data visualization)
|
||||
- mysql jdbc interpreter pre-configured and connected to starrocks allin1 service.
|
||||
- sample starrocks notebook.
|
||||
|
||||

|
||||
|
||||
**Note**: Please refer to [docker-compose.yml](docker-compose.yml) to customize the container port mapping, volume mount, or other docker configs.
|
||||
|
||||
## Start the StarRocks stack compose environment
|
||||
|
||||
### Start all services in the compose file
|
||||
```shell
|
||||
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose up -d
|
||||
```
|
||||
|
||||
### Start a specific service(s) in the compose file
|
||||
|
||||
```shell
|
||||
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker compose up -d starrocks minio
|
||||
```
|
||||
|
||||
### Stop the Celostar compose environment
|
||||
```shell
|
||||
docker compose down
|
||||
```
|
||||
## Minio Local Service
|
||||
MinIO Object Storage Server Running locally.
|
||||
This service can be accessed from:
|
||||
- **local laptop**
|
||||
- Storage API: http://127.0.0.1:9000
|
||||
- Console: http://127.0.0.1:9001
|
||||
- **docker network**
|
||||
- Storage API: http://minio.local.com:9000
|
||||
- Console: http://minio.local.com:9001
|
||||
|
||||
|
||||
Documentation: https://min.io/docs/minio/linux/index.html
|
||||
|
||||

|
||||
|
||||
|
||||
## Azurite Service
|
||||
Azure blob store emulator service running locally.
|
||||
This service can be accessed from:
|
||||
- **local laptop**
|
||||
- Azurite Blob service: http://127.0.0.1:10000
|
||||
- Azurite Queue service: http://127.0.0.1:10001
|
||||
- Azurite Table service: http://127.0.0.1:10002
|
||||
- **docker network**
|
||||
- Azurite Blob service: http://azurite.local.com:10000
|
||||
- Azurite Queue service: http://azurite.local.com:10001
|
||||
- Azurite Table service: http://azurite.local.com:10002
|
||||
|
||||
### Use Intellij Bigdata Tool plugin to access azurite
|
||||
The Bigdata Tool supports drags and drops files betwen Azure blob store and local file system or other Blob Store such as S3, Minio.
|
||||

|
||||

|
||||
|
||||
### [Azurite Command Line Tool ](https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&bc=%2Fazure%2Fstorage%2Fblobs%2Fbreadcrumb%2Ftoc.json&tabs=visual-studio#command-line-options)
|
||||
Documentation: [Use the Azurite emulator for local Azure Storage development](https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json&bc=%2Fazure%2Fstorage%2Fblobs%2Fbreadcrumb%2Ftoc.json&tabs=visual-studio )
|
||||
|
||||
|
||||
|
||||
## Zeppelin Local Service
|
||||
Zeppelin Notebook Service running locally.
|
||||
This service can be accessed from:
|
||||
- **local laptop**: http://127.0.0.1:8089
|
||||
- **docker network**: http://zeppelin.local.com:8089
|
||||
|
||||
The Zeppelin Notebook can also be accessed via Big Data Tools Intellij plugin
|
||||
|
||||

|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 90 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 100 KiB |
|
|
@ -1,95 +0,0 @@
|
|||
# This docker compose file builds a StarRocks local development and test environment.
|
||||
|
||||
version: "3.9"
|
||||
|
||||
networks:
|
||||
starrocks-stack-network:
|
||||
driver: bridge
|
||||
|
||||
services:
|
||||
starrocks:
|
||||
container_name: starrocks
|
||||
hostname: starrocks.local.com
|
||||
platform: "linux/amd64"
|
||||
# TODO: Replace image with any image your want to test
|
||||
image: starrocks/allin1-ubuntu:3.0.0-rc01
|
||||
restart: unless-stopped
|
||||
ports: # port mapping format "[host port]:[container port]", can be configured to your preferred port
|
||||
- "8030:8030"
|
||||
- "8040:8040"
|
||||
- "9030:9030"
|
||||
healthcheck:
|
||||
test: 'mysql -uroot -h127.0.0.1 -P 9030 -e "show backends\G" |grep "Alive: true"'
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
networks: # network config, can be configured to your preferred port and ip address, if not specified, it will use default network and assign a dynamic ip
|
||||
starrocks-stack-network:
|
||||
# Configure persistent volume to keep the StarRocks database state across container recreation.
|
||||
# This way, even you have to recreate the container, e.g. updating the image from one version to another, the
|
||||
# StarRocks database will be preserved.
|
||||
volumes: # volume mapping format "[host volume directory]:[container volume directory]", can be configured to your preferred mount point
|
||||
- ${HOME}/dv/starrocks/be/storage:/data/deploy/starrocks/be/storage
|
||||
- ${HOME}/dv/starrocks/be/log:/data/deploy/starrocks/be/log
|
||||
- ${HOME}/dv/starrocks/fe/meta:/data/deploy/starrocks/fe/meta
|
||||
- ${HOME}/dv/starrocks/fe/log:/data/deploy/starrocks/fe/log
|
||||
|
||||
minio:
|
||||
container_name: minio
|
||||
platform: "linux/amd64"
|
||||
hostname: minio.local.com
|
||||
image: quay.io/minio/minio
|
||||
restart: unless-stopped
|
||||
ports: # port mapping format "[host port]:[container port]", can be configured to your preferred port
|
||||
- "9000:9000"
|
||||
- "9001:9001"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://minio.local.com:9000/minio/health/live"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
volumes:
|
||||
- ${HOME}/dv/minio/data:/data
|
||||
networks: # network config, can be configured to your preferred port and ip address, if not specified, it will use default network and assign a dynamic ip
|
||||
starrocks-stack-network:
|
||||
environment:
|
||||
MINIO_ROOT_USER: root
|
||||
MINIO_ROOT_PASSWORD: rootroot
|
||||
command: server /data --console-address ":9001"
|
||||
|
||||
|
||||
# Azure emulator service: https://github.com/Azure/Azurite
|
||||
azurite:
|
||||
container_name: azurite
|
||||
platform: "linux/amd64"
|
||||
hostname: azurite.local.com
|
||||
image: mcr.microsoft.com/azure-storage/azurite
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
AZURITE_ACCOUNTS: "root:rootroot" # TODO: customize your own account credential
|
||||
ports:
|
||||
- "10000:10000" # blob service
|
||||
- "10001:10001" # queue service
|
||||
- "10002:10002" # table service
|
||||
volumes: # volume mapping format "[host volume directory]:[container volume directory]", can be configured to your preferred mount point
|
||||
- ${HOME}/dv/azurite/data:/data
|
||||
networks: # network config, can be configured to your preferred port and ip address, if not specified, it will use default network and assign a dynamic ip
|
||||
starrocks-stack-network:
|
||||
|
||||
zeppelin:
|
||||
container_name: zeppelin
|
||||
platform: "linux/amd64"
|
||||
hostname: zeppelin.local.com
|
||||
build:
|
||||
context: zeppelin4starrocks
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
ports: # port mapping format "[host port]:[container port]", can be configured to your preferred port
|
||||
- "8089:8080"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://zeppelin.local.com:8080"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
networks: # network config, can be configured to your preferred port and ip address, if not specified, it will use default network and assign a dynamic ip
|
||||
starrocks-stack-network:
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 167 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 44 KiB |
|
|
@ -1,6 +0,0 @@
|
|||
FROM apache/zeppelin:0.10.1
|
||||
|
||||
# update interpreter config(default to jdbc:mysql) before starting the service
|
||||
ADD interpreter.json /opt/zeppelin/conf/
|
||||
|
||||
CMD ["bin/zeppelin.sh"]
|
||||
|
|
@ -1 +0,0 @@
|
|||
A Docker file that customize the zeppelin docker with pre-configured mysql-connector-java:5.1.38 and default interpreter to JDBC.
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue