-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
100 lines (95 loc) · 2.61 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
version: "3"
services:
minio:
container_name: minio
environment:
MINIO_ROOT_USER: miniouser
MINIO_ROOT_PASSWORD: miniopassword
image: minio/minio:latest
ports:
- "9001:9001"
- "9000:9000"
entrypoint: sh
command: '-c ''mkdir -p /minio_data/starrocks && minio server /minio_data --console-address ":9001"'''
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
timeout: 5s
retries: 5
minio_mc:
# This service is short lived, it does this:
# - starts up
# - checks to see if the MinIO service `minio` is ready
# - creates a MinIO Access Key that the StarRocks services will use
# - exits
image: minio/mc:latest
entrypoint:
- sh
- -c
- |
until mc ls minio > /dev/null 2>&1; do
sleep 0.5
done
mc alias set myminio http://minio:9000 miniouser miniopassword
mc admin user svcacct add --access-key AAAAAAAAAAAAAAAAAAAA \
--secret-key BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB \
myminio \
miniouser
depends_on:
- minio
starrocks-fe:
build:
context: .
dockerfile: ./DockerFile_FrontEnd
hostname: starrocks-fe
container_name: starrocks-fe
user: root
environment:
- STARROCKS_DATA=/starrocks_mount/fe1
- HTTP_PORT=8031
- THRIFT_RPC_PORT=9021
- SQL_QUERY_PORT=9031
- EDIT_LOG_PORT=9011
- MINIO_URL=http://minio:9000
- MINIO_BUCKET=starrocks
- MINIO_ACCESS_KEY=AAAAAAAAAAAAAAAAAAAA
- MINIO_SECRET_KEY=BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
- SLEEP_FOR=0.1s
ports:
- 8031:8031
- 9021:9021
- 9031:9031
volumes:
- ./cdr/cdm/starrocks:/starrocks_mount
healthcheck:
test: 'mysql -u root -h starrocks-fe -P 9031 -e "show frontends\G" |grep "Alive: true"'
interval: 10s
timeout: 5s
retries: 3
depends_on:
- minio
# NOTE: To add the CN to the system, you need to manually run
# ALTER SYSTEM ADD COMPUTE NODE "starrocks-cn:9051";
# (or whatever port / host name you choose) on the FE node
starrocks-cn:
build:
context: .
dockerfile: ./DockerFile_ComputeNode
environment:
- STARROCKS_DATA=/starrocks_mount/cn1
- SLEEP_FOR=15s
- THRIFT_RPC_PORT=9061
- HTTP_PORT=8041
- HEARTBEAT_PORT=9051
- BRPC_PORT=8061
- STARLET_PORT=9071
ports:
- 8041:8041
hostname: starrocks-cn
container_name: starrocks-cn
user: root
volumes:
- ./cdr/cdm/starrocks:/starrocks_mount
depends_on:
- starrocks-fe
- minio