You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
174 lines
4.3 KiB
174 lines
4.3 KiB
version: '2.1'
|
|
|
|
services:
|
|
pd0:
|
|
image: pingcap/pd:latest
|
|
ports:
|
|
- "2379"
|
|
volumes:
|
|
- ./config/pd.toml:/pd.toml:ro
|
|
- ./data:/data
|
|
- ./logs:/logs
|
|
command:
|
|
- --name=pd0
|
|
- --client-urls=http://0.0.0.0:2379
|
|
- --peer-urls=http://0.0.0.0:2380
|
|
- --advertise-client-urls=http://pd0:2379
|
|
- --advertise-peer-urls=http://pd0:2380
|
|
- --initial-cluster=pd0=http://pd0:2380,pd1=http://pd1:2380,pd2=http://pd2:2380
|
|
- --data-dir=/data/pd0
|
|
- --config=/pd.toml
|
|
- --log-file=/logs/pd0.log
|
|
restart: on-failure
|
|
pd1:
|
|
image: pingcap/pd:latest
|
|
ports:
|
|
- "2379"
|
|
volumes:
|
|
- ./config/pd.toml:/pd.toml:ro
|
|
- ./data:/data
|
|
- ./logs:/logs
|
|
command:
|
|
- --name=pd1
|
|
- --client-urls=http://0.0.0.0:2379
|
|
- --peer-urls=http://0.0.0.0:2380
|
|
- --advertise-client-urls=http://pd1:2379
|
|
- --advertise-peer-urls=http://pd1:2380
|
|
- --initial-cluster=pd0=http://pd0:2380,pd1=http://pd1:2380,pd2=http://pd2:2380
|
|
- --data-dir=/data/pd1
|
|
- --config=/pd.toml
|
|
- --log-file=/logs/pd1.log
|
|
restart: on-failure
|
|
pd2:
|
|
image: pingcap/pd:latest
|
|
ports:
|
|
- "2379"
|
|
volumes:
|
|
- ./config/pd.toml:/pd.toml:ro
|
|
- ./data:/data
|
|
- ./logs:/logs
|
|
command:
|
|
- --name=pd2
|
|
- --client-urls=http://0.0.0.0:2379
|
|
- --peer-urls=http://0.0.0.0:2380
|
|
- --advertise-client-urls=http://pd2:2379
|
|
- --advertise-peer-urls=http://pd2:2380
|
|
- --initial-cluster=pd0=http://pd0:2380,pd1=http://pd1:2380,pd2=http://pd2:2380
|
|
- --data-dir=/data/pd2
|
|
- --config=/pd.toml
|
|
- --log-file=/logs/pd2.log
|
|
restart: on-failure
|
|
tikv0:
|
|
image: pingcap/tikv:latest
|
|
volumes:
|
|
- ./config/tikv.toml:/tikv.toml:ro
|
|
- ./data:/data
|
|
- ./logs:/logs
|
|
command:
|
|
- --addr=0.0.0.0:20160
|
|
- --advertise-addr=tikv0:20160
|
|
- --data-dir=/data/tikv0
|
|
- --pd=pd0:2379,pd1:2379,pd2:2379
|
|
- --config=/tikv.toml
|
|
- --log-file=/logs/tikv0.log
|
|
depends_on:
|
|
- "pd0"
|
|
- "pd1"
|
|
- "pd2"
|
|
restart: on-failure
|
|
tikv1:
|
|
image: pingcap/tikv:latest
|
|
volumes:
|
|
- ./config/tikv.toml:/tikv.toml:ro
|
|
- ./data:/data
|
|
- ./logs:/logs
|
|
command:
|
|
- --addr=0.0.0.0:20160
|
|
- --advertise-addr=tikv1:20160
|
|
- --data-dir=/data/tikv1
|
|
- --pd=pd0:2379,pd1:2379,pd2:2379
|
|
- --config=/tikv.toml
|
|
- --log-file=/logs/tikv1.log
|
|
depends_on:
|
|
- "pd0"
|
|
- "pd1"
|
|
- "pd2"
|
|
restart: on-failure
|
|
tikv2:
|
|
image: pingcap/tikv:latest
|
|
volumes:
|
|
- ./config/tikv.toml:/tikv.toml:ro
|
|
- ./data:/data
|
|
- ./logs:/logs
|
|
command:
|
|
- --addr=0.0.0.0:20160
|
|
- --advertise-addr=tikv2:20160
|
|
- --data-dir=/data/tikv2
|
|
- --pd=pd0:2379,pd1:2379,pd2:2379
|
|
- --config=/tikv.toml
|
|
- --log-file=/logs/tikv2.log
|
|
depends_on:
|
|
- "pd0"
|
|
- "pd1"
|
|
- "pd2"
|
|
restart: on-failure
|
|
|
|
tidb:
|
|
image: pingcap/tidb:latest
|
|
ports:
|
|
- "4000:4000"
|
|
- "10080:10080"
|
|
volumes:
|
|
- ./config/tidb.toml:/tidb.toml:ro
|
|
- ./logs:/logs
|
|
command:
|
|
- --store=tikv
|
|
- --path=pd0:2379,pd1:2379,pd2:2379
|
|
- --config=/tidb.toml
|
|
- --log-file=/logs/tidb.log
|
|
- --advertise-address=tidb
|
|
depends_on:
|
|
- "tikv0"
|
|
- "tikv1"
|
|
- "tikv2"
|
|
restart: on-failure
|
|
tispark-master:
|
|
image: pingcap/tispark:latest
|
|
command:
|
|
- /opt/spark/sbin/start-master.sh
|
|
volumes:
|
|
- ./config/spark-defaults.conf:/opt/spark/conf/spark-defaults.conf:ro
|
|
environment:
|
|
SPARK_MASTER_PORT: 7077
|
|
SPARK_MASTER_WEBUI_PORT: 8080
|
|
ports:
|
|
- "7077:7077"
|
|
- "8080:8080"
|
|
depends_on:
|
|
- "tikv0"
|
|
- "tikv1"
|
|
- "tikv2"
|
|
restart: on-failure
|
|
tispark-slave0:
|
|
image: pingcap/tispark:latest
|
|
command:
|
|
- /opt/spark/sbin/start-slave.sh
|
|
- spark://tispark-master:7077
|
|
volumes:
|
|
- ./config/spark-defaults.conf:/opt/spark/conf/spark-defaults.conf:ro
|
|
environment:
|
|
SPARK_WORKER_WEBUI_PORT: 38081
|
|
ports:
|
|
- "38081:38081"
|
|
depends_on:
|
|
- tispark-master
|
|
restart: on-failure
|
|
|
|
tidb-vision:
|
|
image: pingcap/tidb-vision:latest
|
|
environment:
|
|
PD_ENDPOINT: pd0:2379
|
|
ports:
|
|
- "8010:8010"
|
|
restart: on-failure
|