首页 > 代码库 > ubuntu-docker-consul-swarm-shipyard-portainer

ubuntu-docker-consul-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, consul, shipyard, portainer = 172.18.0.78

node2 = 172.18.0.86

node3 = 172.18.0.4

 

--- consul ---

[node1]

docker run -d -p 8500:8500 --name=consul progrium/consul -server -bootstrap -advertise=172.18.0.78

 

--- master ---

[node1]

docker run -d -p 4000:4000 swarm manage -H :4000 --replication --advertise 172.18.0.78:4000 consul://172.18.0.78:8500

 

--- agent ---

[node1]

docker run -d swarm join --advertise=172.18.0.78:2375 consul://172.18.0.78:8500

 

 

[node2]

docker run -d swarm join --advertise=172.18.0.86:2375 consul://172.18.0.78:8500 

 

[node3]

docker run -d swarm join --advertise=172.18.0.4:2375 consul://172.18.0.78:8500

 

--- 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:4000

 

--- portainer ---

[node1]

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

 

ubuntu-docker-consul-swarm-shipyard-portainer