-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathsetup.sh
executable file
·62 lines (45 loc) · 1.49 KB
/
setup.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
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
#!/usr/bin/env bash
docker-machine create -d virtualbox proxy
export CONSUL_IP=$(docker-machine ip proxy)
export HOST_IP=$(docker-machine ip proxy)
eval "$(docker-machine env proxy)"
docker-compose \
-p setup \
-f docker-compose-setup.yml \
up -d consul-server
docker-machine create -d virtualbox \
--swarm --swarm-master \
--swarm-discovery="consul://$CONSUL_IP:8500" \
--engine-opt="cluster-store=consul://$CONSUL_IP:8500" \
--engine-opt="cluster-advertise=eth1:2376" \
swarm-master
docker-machine create -d virtualbox \
--swarm \
--swarm-discovery="consul://$CONSUL_IP:8500" \
--engine-opt="cluster-store=consul://$CONSUL_IP:8500" \
--engine-opt="cluster-advertise=eth1:2376" \
swarm-node-1
docker-machine create -d virtualbox \
--swarm \
--swarm-discovery="consul://$CONSUL_IP:8500" \
--engine-opt="cluster-store=consul://$CONSUL_IP:8500" \
--engine-opt="cluster-advertise=eth1:2376" \
swarm-node-2
eval "$(docker-machine env swarm-master)"
export HOST_IP=$(docker-machine ip swarm-master)
docker-compose \
-p setup \
-f docker-compose-setup.yml \
up -d registrator
eval "$(docker-machine env swarm-node-1)"
export HOST_IP=$(docker-machine ip swarm-node-1)
docker-compose \
-p setup \
-f docker-compose-setup.yml \
up -d registrator
eval "$(docker-machine env swarm-node-2)"
export HOST_IP=$(docker-machine ip swarm-node-2)
docker-compose \
-p setup \
-f docker-compose-setup.yml \
up -d registrator