标签:
docker rancher 体验
官方 github
https://github.com/rancher/rancher
环境说明:
10.6.0.140
10.6.0.187
10.6.0.188
修改主机名:
10.6.0.140 = hostnamectl --static set-hostname reancher-manager
10.6.0.187 = hostnamectl --static set-hostname reancher-node-1
10.6.0.188 = hostnamectl --static set-hostname reancher-node-2
[root@reancher-manager ~]#mkdir -p /opt/rencher/mysql [root@reancher-manager ~]#docker run -d --name rencher --restart=always -v /opt/rencher/mysql:/var/lib/mysql -p 8080:8080 rancher/server [root@reancher-manager ~]#docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c8209da7add0 rancher/server "/usr/bin/s6-svscan /" 12 minutes ago Up 12 minutes 3306/tcp, 0.0.0.0:8080->8080/tcp rencher
浏览器访问:
http://10.6.0.140:8080
显示如下:
1.
2. 填写访问地址,如果为私网IP ,会提示。
3. node 节点 复制: docker run -d --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.0.2 http://10.6.0.140:8080/v1/scripts/8944D0EC8BCFEB4F127C:1472544000000:BIX8IC8bWsRbx60NMhka4AmxmpQ
进行安装rancher-agent
[root@reancher-node-1 ~]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6c7f533527ec rancher/agent:v1.0.2 "/run.sh run" 4 minutes ago Up 4 minutes rancher-agent 7566aa61cdbe rancher/agent:v1.0.2 "/run.sh state" 4 minutes ago Exited (0) 4 minutes ago rancher-agent-state 032d85c88779 rancher/agent:v1.0.2 "/run.sh http://10.6." 5 minutes ago Exited (0) 4 minutes ago fervent_morse
4. 安装完毕,等待5分钟左右,在 WEB UI 界面,可以看到如下:
5. 点击如下: 添加 容器
标签:
原文地址:http://www.cnblogs.com/jicki/p/5822707.html