ubuntu-docker-etcd-swarm-shipyard-portainer

--- env ---

root@node1:~# cat /etc/issue
Ubuntu 12.04.4 LTS \n \l

root@node1:~# docker -v
Docker version 1.12.3, build 6b644ec

 

 

node1, etcd, shipyard, portainer = 172.18.0.78

node2 = 172.18.0.86

node3 = 172.18.0.4

 

--- etcd ---

[node1]

HOSTIP=172.18.0.78

docker run -d -v /etc/ssl/certs:/etc/ssl/certs -p 4001:4001 -p 2380:2380 -p 2379:2379  --name etcd quay.io/coreos/etcd:v2.2.0  -name etcd0  -advertise-client-urls http://${HOSTIP}:2379,http://${HOSTIP}:4001  -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001  -initial-advertise-peer-urls http://${HOSTIP}:2380  -listen-peer-urls http://0.0.0.0:2380  -initial-cluster-token etcd-cluster-1  -initial-cluster etcd0=http://${HOSTIP}:2380  -initial-cluster-state new

 

--- master ---

[node1]

docker run -d -p 3375:3375 --name shipyard-swarm-manager swarm:latest manage --host tcp://0.0.0.0:3375 etcd://172.18.0.78:2379/swarm 

 

--- agent ---

[node1]

docker run -d --name shipyard-swarm-agent swarm:latest join --addr 172.18.0.78:2375 etcd://172.18.0.78:2379/swarm

 

[node2]

docker run -d --name shipyard-swarm-agent swarm:latest join --addr 172.18.0.86:2375 etcd://172.18.0.78:2379/swarm

 

[node3]

docker run -d --name shipyard-swarm-agent swarm:latest join --addr 172.18.0.4:2375 etcd://172.18.0.78:2379/swarm

 

 

--- shipyard ---

[node1]

docker run -d --name shipyard-rethinkdb rethinkdb

(docker run -d --name shipyard-rethinkdb -v /rethinkdb/data:/data rethinkdb)

docker run -d --name shipyard-controller --link shipyard-rethinkdb:rethinkdb -P shipyard/shipyard:latest server -d tcp://172.18.0.78:3375

 

--- portainer ---

[node1]

docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer

 

posted @ 2017-01-04 17:40  y.z.y  阅读(257)  评论(0编辑  收藏  举报