shipyard 搭建
参考网址:https://shipyard-project.com/docs/deploy/
https://juejin.im/entry/588940fc2f301e0069b2397d
下载shipyard相关的镜像
为节省pull 镜像的时间,首先下载好docker镜像
下载地址:百度网盘
解压后目录如下
[root@minil shipyard]# tree
.
├── 1.tar
├── 2.tar
├── 3.tar
├── 4.tar
├── 5.tar
├── 6.tar
├── docker.sh
├── loadshipyard.sh
├── pullshipyard.sh
└── saveshipyard.sh
$ ./loadshipyard.sh
自动安装
$ curl -sSL https://shipyard-project.com/deploy | bash -s
默认会在 8080 端口启动 Shipyard,使用 http://IP:8080 即可访问,假如想修改启动的端口可以设置 PORT 环境变量。
$ curl -sSL https://shipyard-project.com/deploy | PORT=6969 bash -s
打开浏览器,输入你的域名或者 IP:HOST 既能看见登入页面了,默认的账号的 admin 密码是 shipyard
节点的部署
$ curl -sSL https://shipyard-project.com/deploy > docker.sh
$ export ACTION=node DISCOVERY=etcd://121.42.29.28:4001 && bash docker.sh
这里的 ACTION 是指定脚本的安装方式为 node 安装,指定服务发现程序的 ip、port配置为上一个master节点运行shipyard-discovery服务
运行成功后,我们还需要查看容器中得 log 看看成功注册
需要查看的是 NAMES 为 shipyard-swarm-manage 的容器
$ docker logs shipyard-swarm-manage
remove shipyard相关服务
curl -sSL https://shipyard-project.com/deploy > docker.sh
$ export ACTION=remove && bash docker.sh