Useful python script to add a host to Rancher

Just posting this to be helpful. We run our own virtualised platform and I deploy Docker hosts using Puppet. Here’s a link to a short Python script which gets a new registration token from Rancher and then starts the agent to add this host to Rancher. This was that last part of the puzzle to get automatic local deployment of hosts.

http://pastebin.com/zmBiJA1j

4 Likes