Shipyard 编译环境搭建及部署验证

1. 操作系统 Centos 7.2 标准安装

  #cat /etc/redhat-release

  CentOS Linux release 7.2.1511 (Core)


2. 安装 docker golang nodejs npm git

  #yum install -y docker golang nodejs npm git


3. 配置 golang 环境

  #mkdir -p /root/go/workspace

  #vi /etc/profile

    export GOROOT=/usr/lib/golang

    export GOPATH=/root/go/workspace

    export PATH=$PATH:$GOROOT/bin

#source /etc/profile


4. 安装 Godep 和 bower

  #go get github.com/tools/godep

  #ln -s /usr/bin/godep /root/go/workspace/bin/godep

  #npm install -g bower


5. 下载 shipyard 代码

  #go get github.com/shipyard/shipyard


6. 编译

  #cd /root/go/workspace/src/github.com/shipyard/shipyard

  #make build

  #make media

  #cd /root/go/workspace/src/github.com/shipyard/shipyard/controller

  #./controller -h

  #docker build -t shipyard/shipyard:latest .


7. 运行容器

  Datastore

    #docker run -ti -d --restart=always --name shipyard-rethinkdb -p 8080:8080 rethinkdb

  Discovery

    #docker run -ti -d -p 4001:4001 -p 7001:7001 --restart=always --name shipyard-discovery microbox/etcd -name discovery

  Swarm Manager

    #docker run -ti -d --restart=always --name shipyard-swarm-manager swarm:latest manage --host tcp://0.0.0.0:3375 etcd://192.168.230.128:4001

  Swarm Agent

    #docker run -ti -d --restart=always --name shipyard-swarm-agent swarm:latest join --addr 192.168.230.128:2375 etcd://192.168.230.128:4001

  Controller

    #docker run -ti -d --restart=always --name shipyard-controller --link shipyard-rethinkdb:shipyard-rethinkdb --link shipyard-swarm-manager:swarm -p 80:8080 shipyard/shipyard:latest server -d tcp://swarm:3375


8. 检查 shipyard 是否成功启动

访问 http://192.168.230.128/,出现 shipyard 主页,使用 admin/shipyard 登录

Shipyard 编译环境搭建及部署验证_第1张图片
shipyard

备注:

    加粗倾斜部分为宿主机IP

shipyard 介绍:

    https://shipyard-project.com/

github shipyard 主页:

    https://github.com/shipyard/shipyard

你可能感兴趣的:(Shipyard 编译环境搭建及部署验证)