基礎(chǔ)環(huán)境需要安裝docker(這里不做介紹)
自動(dòng)安裝
使用自動(dòng)部署Shell腳本
curl -sSL https://shipyard-project.com/deploy | bash -s
結(jié)果如下
[root@contract ~]# curl -sSL https://shipyard-project.com/deploy | bash -s
Deploying Shipyard
-> Starting Database
-> Starting Discovery
-> Starting Cert Volume
-> Starting Proxy
-> Starting Swarm Manager
-> Starting Swarm Agent
-> Starting Controller
Waiting for Shipyard on 10.2.2.11:8080
Shipyard available at http://10.2.2.11:8080
Username: admin Password: shipyard
不出問(wèn)題的話就說(shuō)明安裝完畢了蕉朵,通過(guò)IP:8080 訪問(wèn)
訪問(wèn)界面
常見(jiàn)的錯(cuò)誤
- 執(zhí)行完自動(dòng)部署腳本后發(fā)現(xiàn)容器名shipyard-rethinkdb被占用
[root@contract ~]# curl -sSL https://shipyard-project.com/deploy | bash -s
Deploying Shipyard
-> Starting Database
docker: Error response from daemon: Conflict. The container name "/shipyard-rethinkdb" is already in use by container "4168730dbc8cb055562965b1ee129047ad337158ff2593480fbf3b4088551024". You have to remove (or rename) that container to be able to reuse that name.
See 'docker run --help'.
解決方法:
刪除所有相關(guān)的容器即可。
docker stop $(docker ps -a- q)
docker rm $(docker ps -a -q)
這里由于我第一次安裝沒(méi)有其他容器尔许,因此我是刪除了所有容器
- 啟動(dòng)容器是報(bào)網(wǎng)絡(luò)錯(cuò)誤
restartmanger wait error: driver failed programming external connectivity on endpoint shipyard-controller (5522daa5d553912455f36fef6abd42823230a6741f93593fc2b77e2cacb98031): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8080 -j DNAT --to-destination 172.17.0.3:8080 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1))
這是因?yàn)閐ocker程序沒(méi)有在iptables里創(chuàng)建相應(yīng)的鏈(chain),所以需要重啟iptables和docker的服務(wù)。
service iptables restart
service docker restart