This repository has been archived by the owner on Aug 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
05 Rancher Agents Setup
satrapu edited this page Oct 14, 2017
·
3 revisions
This page details how to register several hosts (aka Rancher agents) to a running instance of Rancher server.
A Rancher agent is a Docker host which runs one or more containers.
More information can be found here.
- Go to Rancher UI
- Select "tgd" environment, if it's not already the selected one
- Go to menu → Infrastructure → Hosts → click "Add Host" button
- Copy the above selected text
- Connect to the VM to host Rancher agent #1 using ssh
docker-machine ssh ra1
- Paste and run the previously copied command
The above command will create a Docker container named rancher-agent.
## The command looks something like this: # sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib /rancher rancher/agent:v1.2.5 http://192.168.99.100:8080/v1/scripts/E16CD86C33A1E2399AA1:1483142400000:uMn9PmfeLyOZLJQckI3uLnQ0s
- Connect to the VM to host Rancher agent #2 using ssh
docker-machine ssh ra2
- Paste and run the previously copied command
## The command looks something like this: # sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.5 http://192.168.99.100:8080/v1/scripts/E16CD86C33A1E2399AA1:1483142400000:uMn9PmfeLyOZLJQckI3uLnQ0s
- Go to Rancher UI
- Go to menu → Infrastructure → Hosts and you should see 2 hosts: ra1 and ra2, registered to "tgd" environment