/
swarm_start_slave.sh
executable file
·37 lines (34 loc) · 1.18 KB
/
swarm_start_slave.sh
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
#! /bin/bash
docker service create \
--name hbase-slave1 \
--hostname hbase-slave1 \
--network swarm-net \
--replicas 1 \
--detach=true \
--endpoint-mode dnsrr \
--mount type=bind,source=/etc/localtime,target=/etc/localtime,readonly \
--mount type=bind,source=/data/hbase/config,target=/config/hbase \
--mount type=bind,source=/data/hbase/logs/slave1,target=/usr/local/hbase/logs \
newnius/hbase:1.2.6
docker service create \
--name hbase-slave2 \
--hostname hbase-slave2 \
--network swarm-net \
--replicas 1 \
--detach=true \
--endpoint-mode dnsrr \
--mount type=bind,source=/etc/localtime,target=/etc/localtime,readonly \
--mount type=bind,source=/data/hbase/config,target=/config/hbase \
--mount type=bind,source=/data/hbase/logs/slave2,target=/usr/local/hbase/logs \
newnius/hbase:1.2.6
docker service create \
--name hbase-slave3 \
--hostname hbase-slave3 \
--network swarm-net \
--replicas 1 \
--detach=true \
--endpoint-mode dnsrr \
--mount type=bind,source=/etc/localtime,target=/etc/localtime,readonly \
--mount type=bind,source=/data/hbase/config,target=/config/hbase \
--mount type=bind,source=/data/hbase/logs/slave3,target=/usr/local/hbase/logs \
newnius/hbase:1.2.6