Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.

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.

  1. Go to Rancher UI
  2. Select "tgd" environment, if it's not already the selected one
  3. Go to menu → Infrastructure → Hosts → click "Add Host" button
  4. Copy the above selected text
  5. Connect to the VM to host Rancher agent #1 using ssh
    docker-machine ssh ra1
  6. 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
    The above command will create a Docker container named rancher-agent.
  7. Connect to the VM to host Rancher agent #2 using ssh
    docker-machine ssh ra2
  8. 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
  9. Go to Rancher UI
  10. Go to menu → Infrastructure → Hosts and you should see 2 hosts: ra1 and ra2, registered to "tgd" environment
Clone this wiki locally