一、部署方法
export IP=xx.xx.xxx.xxx
sh deploy_shipyard.sh
vim deploy_shipyard.sh
#1.部署shipyard的数据库rethinkdb镜像
docker run \
-ti \
-d \
--restart=always \
--name shipyard-rethinkdb \
rethinkdb
#2.服务发现
docker run \
-ti \
-d \
-p 4001:4001 \
-p 7001:7001 \
--restart=always \
--name shipyard-discovery \
microbox/etcd -name discovery
#3.代理
docker run \
-ti \
-d \
-p 2375:2375 \
--hostname=$HOSTNAME \
--restart=always \
--name shipyard-proxy \
-v /var/run/docker.sock:/var/run/docker.sock \
-e PORT=2375 \
shipyard/docker-proxy:latest
#4.swarm manager
docker run \
-ti \
-d \
--restart=always \
--name shipyard-swarm-manager \
swarm:latest \
manage --host tcp://0.0.0.0:3375 etcd://$IP:4001
#5.部署swarm客户端镜像
docker run \
-ti \
-d \
--restart=always \
--name shipyard-swarm-agent \
swarm:latest \
join --addr $IP:2375 etcd://$IP:4001
#6.部署shipyard Controller镜像
docker run \
-ti \
-d \
--restart=always \
--name shipyard-controller \
--link shipyard-rethinkdb:rethinkdb \
--link shipyard-swarm-manager:swarm \
-p 8080:8080 \
shipyard/shipyard:latest \
server \
-d tcp://swarm:3375
访问http://IP:8080
用户名:admin
密码:shipyard
二.启动shipyard运维平台
docker start shipyard-rethinkdb shipyard-discovery shipyard-proxy shipyard-swarm-manager shipyard-swarm-agent shipyard-controller
三.停止shipyard运维平台
docker stop shipyard-rethinkdb shipyard-discovery shipyard-proxy shipyard-swarm-manager shipyard-swarm-agent shipyard-controller
参考资料
https://shipyard-project.com/docs/deploy/manual/
http://dockone.io/article/1545