In our previous article, we have installed a rancher server on CentOS 7 machine As a single container(Non-HA). If you don’t add any external database, it has its own database. Now check How To Add Docker Host in Rancher. We can deploy and add a docker host container in the rancher server.
How To Add Docker Host In a Rancher Server:
Location of Rancher Container is /var/lib/docker/containers/2e907d74ff3d8246e
1. Recommended CPU w/ AES-NI
2. 1GB RAM
3. Able to communicate with a Rancher server via HTTP or https.
Check Out: Install Rancher Server
Add Host in Rancher
Go to your rancher server and click on infrastructure –> hosts
I’m using the same host where Rancher is installed & Click on Save. After clicking on save. You will see this window.
Points to remember:
- You can add a different machine where all the containers are running. I’m using the same machine.
- Make sure if there is any firewall, You need to allow traffic from and to all other hosts on UDP ports 500 and 4500 (IPSec networking)
- Specify the public IP of the server where containers are running.
- Copy and paste the code on the registered host with rancher then All the containers will be in Rancher Server.
Check Out: Check Running Container In Docker
Agent launched Now.
You will see both containers which were created on this docker/Rancher server. Now it’s showing up.
Check Out: Take Backup of a Container In Docker
In the same way, you can add more Containers and hosts where Containers are running.
You’re done docker host in rancher add container deploy