shipyard的安装与一般维护

杀马特。学长 韩版系。学妹 提交于 2019-12-28 01:15:14

#一、安装前的准备:

docker pull alpine

docker pull library/rethinkdb

docker pull microbox/etcd

docker pull shipyard/docker-proxy

docker pull swarm

docker pull shipyard/shipyard

#二、安装脚本:

curl -s https://shipyard-project.com/deploy | bash -s                      ==》英文版

curl -sSL http://dockerclub.net/public/script/deploy |  bash -s          ==> 中文版

shipyard安装完成后使用http://192.168.100.100:8080就可以访问了(iptables防火墙要是开启了,要记得打开8080端口访问)

shipyard访问页面默认登录用户名:admin,密码:shipyard,登录进去后,可以在"ACCOUNTS"选项里管理用户,可以添加用户,并对用户进行角色授权

#三、一般维护:

1)添加node节点:

curl -sSL http://dockerclub.net/public/script/deploy | ACTION=node DISCOVERY=etcd://<shipyard部署机ip> bash -s                      ##中文版

curl -sSL https://shipyard-project.com/deploy | ACTION=node DISCOVERY=etcd://<shipyard部署机ip> bash -s                               ##英文版

 

2) 删除shipyard(在节点机上执行,就会将节点从shipyard管理里踢出)

curl http://dockerclub.net/public/script/deploy | ACTION=remove bash -s    ##中文版

curl -sSL https://shipyard-project.com/deploy | ACTION=remove bash -s      ##英文版

3)stop 与start :

docker stop shipyard-proxy shipyard-certs shipyard-discovery shipyard-rethinkdb shipyard-swarm-agent shipyard-swarm-manager shipyard-controller

docker start shipyard-proxy shipyard-certs shipyard-discovery shipyard-rethinkdb shipyard-swarm-agent shipyard-swarm-manager shipyard-controller

 

4)如果想将安装重新来一遍

for i in `docker ps |sed '1d'| awk '{print $NF}'`;do docker rm -f $i; done

docker stop `docker ps -a -q`

docker rm `docker ps -a -q`

curl -s https://shipyard-project.com/deploy | bash -s

 

5)添加节点:

比如添加182.48.115.235作为一个节点。那么就需要在182.48.115.235这台机器上执行下面的命令:

curl -sSL https://shipyard-project.com/deploy | ACTION=node DISCOVERY=etcd://192.168.100.100:4001 bash -s

注意:

1)上面命令中的192.168.100.100是shipyard的部署机的ip;

2)192.168.100.100机器的iptables防火墙要打开4001端口。最好是关闭防火墙

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!