CentOS7安装部署Shipyard管理系统(亲测可用)
一、基础环境部署
# step 1: 安装必要的一些系统工具
yum install -y yum-utils device-mapper-persistent-data lvm2
# Step 2: 添加软件源信息
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
# Step 3: 更新并安装 Docker-CE
yum makecache fast
yum -y install docker-ce
# Step 4: 开启Docker服务
service docker start
# Step 5: 添加防火墙规则,否则看不到容器和镜像
firewall-cmd --zone=public --permanent --add-port=2375/tcp
# Step 6: 重启防火墙
firewall-cmd --reload
二、部署
# Step 1: 下载基础镜像
# docker pull alpine
# docker pull rethinkdb
# docker pull microbox/etcd
# docker pull ehazlett/curl
# docker pull rancher/rancher-agent
# docker pull rancher/rancher
# docker pull shipyard/docker-proxy
# docker pull swarm
# docker pull shipyard/shipyard
# Step 2: 下载中文镜像
docker pull dockerclub/shipyard
# Step 3:下载官方一键部署脚本
wget https://shipyard-project.com/deploy(已经失效)
下载地址:https://download.csdn.net/download/aiqixiao1015/10651507 (最新下载地址)
# Step 4:替换Controller为中文版
sed -i 's/shipyard\/shipyard:latest/dockerclub\/shipyard:latest/g' shipyard-deploy
# Step 5: 部署
sh shipyard-deploy
三、基础操作:
# step 1: 删除Shipyard环境
cat deploy | ACTION=remove bash
# step 2: 添加节点主机
curl https://shipyard-project.com/deploy | ACTION=node DISCOVERY=etcd://主服务器IP:4001 bash
【添加CentOS6.x系统的节要先升级kernel和docker,具体操作如下】
a、升级内核:参考:https://blog.51cto.com/zlyang/2052942
b、升级docker:
1、下载docker:wget https://get.docker.com/builds/Linux/x86_64/docker-1.10.3
2、停止docker服务:
service docker stop
3、替换docker二进制文件
cp /usr/bin/docker /usr/bin/docker_bak
cp docker-1.9.1 /usr/bin/docker
4、启动docker服务
service docker start
5、添加Shipyard节点
curl https://shipyard-project.com/deploy | ACTION=node DISCOVERY=etcd://主服务器IP:4001 bash
四、界面展示
登录:
容器:
镜像: