-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathswarm-creation
More file actions
executable file
·46 lines (38 loc) · 1004 Bytes
/
Copy pathswarm-creation
File metadata and controls
executable file
·46 lines (38 loc) · 1004 Bytes
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
#!bin/bash
docker-machine create -d virtualbox local
eval $(docker-machine env local)
docker run swarm create > token.txt
export TOKEN="`cat token.txt`"
docker-machine create \
-d virtualbox \
--swarm \
--swarm-master \
--swarm-discovery token://$TOKEN \
swarm-master
docker-machine create \
-d virtualbox \
--swarm \
--swarm-discovery token://$TOKEN \
--engine-label role=haproxy \
swarm-haproxy-node
docker-machine create \
-d virtualbox \
--swarm \
--swarm-discovery token://$TOKEN \
--engine-label role=worker \
swarm-worker-node-00
docker-machine create \
-d virtualbox \
--swarm \
--swarm-discovery token://$TOKEN \
--engine-label role=worker \
swarm-worker-node-01
docker-machine create \
-d virtualbox \
--swarm \
--swarm-discovery token://$TOKEN \
--engine-label role=worker \
swarm-worker-node-02
sleep 20
eval $(docker-machine env --swarm swarm-master)
docker info