This is a creation in
Article, where the information may have evolved or changed.
1, about rancher
The last time you set up a rancher environment but the network what is not configured well.
The container was not successfully created. This time, the network is the problem.
Previously VirtualBox installed CoreOS did not configure IP, resulting in network access.
Agent not registered successfully, no host environment, can not create Docker application.
2, configure the network
If you do not configure the VirtualBox network environment, the network is a NAT environment, this time as long as the idea set to 10.0.2.15.
This is the IP of the NAT assigned by VirtualBox, but this network is not able to communicate with the external.
Only port forwarding is used, and if you want to put CoreOS in an intranet environment, you need to use a bridged network:
Then configure the IP:
vi#编辑文件:#是网卡的名字[Network]Address=192.168.2.196Gateway=192.168.2.1DNS=192.168.2.1DNS=114.114.114.114
Then restart the service:
systemctl restart systemd-networkd
This is the time to assign IP. can be accessed in the intranet.
3, set host
Add a Host:
First enter the host IP, if the wrong write can be modified in the admin menu:
Then add an agent, with the agent service, can be rancher monitored.
Of course, this host is itself.
When added, a super-long ID is generated, which can then be viewed using the Docker logs ID.
If booting is not a problem and you can see the service using Docker PS, you are signed up.
You can see it in the host:
4, create a Tomcat container
Create a container:
Enter the name of the Tomcat image, and then map Port 9090 for Tomcat 8080.
Because the rancher already uses port 8080.
Tomcat starts and needs to wait for the next tomcat download to start.
Successful start-up allows monitoring of the container:
Tomcat has access to:
The IP of the host plus the mapped port 9090.
4, summary
The text of this text connection is: http://blog.csdn.net/freewebsys/article/details/51150874 not allowed to reprint without the Bo master.
Bo main address is: Http://blog.csdn.net/freewebsys
Rancher provides a powerful feature that makes Docker creation a few clicks and finishes,
It greatly shortens the time and energy of setting up the environment.
And can directly monitor the health of the container. You can create, copy, and migrate containers at any time.
It's also incredibly easy for complex Docker configurations.