Giter Site home page Giter Site logo

rhidayat1980 / ansibleplaybook-rancher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joshuacox/ansibleplaybook-rancher

0.0 2.0 0.0 127 KB

Ansible playbook to keep a Rancher container running on a docker host

License: Apache License 2.0

Makefile 88.94% Shell 11.06%

ansibleplaybook-rancher's Introduction

ansibleplaybook-rancher

Ansible playbook to keep a Rancher container running on a docker host

I am merely following the instructions at this [link] (https://github.com/rancherio/rancher) , and ensuring the rancher/server container is started properly

usage

add these lines to /etc/ansible/hosts or wherever you keep your inventory similar to: For the host that runs the rancher server

[rancherserver]
rancherserver ansible_ssh_port=$PORT ansible_ssh_host=$IP_ADDRESS ansible_ssh_user=root

For the hosts that run the rancher agents

[rancheragent]
rancheragent ansible_ssh_port=$PORT ansible_ssh_host=$IP_ADDRESS ansible_ssh_user=root

For the hosts that run the rancherOS,

[rancheros]
rancheros ansible_ssh_port=$PORT ansible_ssh_host=$IP_ADDRESS ansible_ssh_user=root

you need to get each of the RancherOS VMs them running the ubuntu-console, log into each and sudo ros service enable ubuntu-console; or you can call the console playbook directly like so

ansible-playbook rancherOSubuntuconsole.yml

or make console to set the ubuntu console in all your rancherOS images (needed for ansible to run)

and then you’ll need to install python, make bootstrap, then get the server up

ansible-playbook rancherServer.yml

or use make server, once the server is running get auth setup and add a host you’ll get something like:

sudo docker run -d --privileged -v /var/run/docker.sock:/var/run/docker.sock rancher/agent:v0.7.8 $URL

where $URL is a big long url that points at your rancher server, run make agent and you will be prompted for your url, or make a file url and place your URL in this file, now run the playbook and your agents should come online

ansible-playbook rancherAgent.yml

stick a line in cron that runs it every five minutes and you’ll ensure their up and running

ansibleplaybook-rancher's People

Contributors

joshuacox avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.