//关闭防火墙 并禁止自启
[root@localhost ~]# systemctl stop firewalld
[root@localhost ~]# systemctl disable firewalld //安装Docker
[root@localhost ~]# yum install docker //修改docker配置文件,添加下面一行,进行docker加速设置
[root@localhost ~]# vi /etc/sysconfig/docker
ADD_REGISTRY='--add-registry xxx.mirror.aliyuncs.com' //启动Docker服务
[root@localhost ~]# systemctl start docker //下载相关镜像(这些镜像如果不提前下载,则在下面一键安装部署时会自动下载,不过要等待一段时间. 所以最好提前下载,一键部署时就很快了)
[root@localhost ~]# docker pull rethinkdb
[root@localhost ~]# docker pull microbox/etcd
[root@localhost ~]# docker pull shipyard/docker-proxy
[root@localhost ~]# docker pull swarm
[root@localhost ~]# docker pull dockerclub/shipyard //脚本文件下载
链接:https://pan.baidu.com/s/1u3Y4faASJ4O2NtU6JWAhyg
提取码:hs6c
//将脚本文件 放在当前目录下
[root@localhost ~]# ls
anaconda-ks.cfg shipyard-deploy //更改文件权限
[root@localhost ~]# chmod shipyard-deploy //一键部署
[root@localhost ~]# sh shipyard-deploy
Deploying Shipyard
-> Starting Database
-> Starting Discovery
-> Starting Cert Volume
-> Starting Proxy
-> Starting Swarm Manager
-> Starting Swarm Agent
-> Starting Controller
Waiting for Shipyard on 192.168.56.51: Shipyard available at http://192.168.56.51:8080
Username: admin Password: shipyard //部署后,可以看到相应的shipyard容器已经创建好了
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f0053bf796e0 dockerclub/shipyard:latest "/bin/controller -..." minutes ago Up minutes 0.0.0.0:->/tcp shipyard-controller
5ddce4c32760 swarm:latest "/swarm j --addr 1..." minutes ago Up minutes /tcp shipyard-swarm-agent
8deee2bfb70c swarm:latest "/swarm m --replic..." minutes ago Up minutes /tcp shipyard-swarm-manager
72a89c385dc4 shipyard/docker-proxy:latest "/usr/local/bin/run" minutes ago Up minutes 0.0.0.0:->/tcp shipyard-proxy
82410e4ac7ce alpine "sh" minutes ago Up minutes shipyard-certs
b91d4eb077c4 microbox/etcd:latest "/bin/etcd -addr 1..." minutes ago Up minutes 0.0.0.0:->/tcp, 0.0.0.0:->/tcp shipyard-discovery
2f777c47cb87 rethinkdb "rethinkdb --bind all" minutes ago Up minutes /tcp, /tcp, /tcp shipyard-rethinkdb //最后访问http://192.168.56.51:8080,使用admin/shipyard用户名和密码登录即可. (注意:一键部署之后,需要稍等一会儿,8080端口才能起来)