All Projects → joshuacox → Ansibleplaybook Rancher

joshuacox / Ansibleplaybook Rancher

Licence: apache-2.0
Ansible playbook to keep a Rancher container running on a docker host

Labels

Projects that are alternatives of or similar to Ansibleplaybook Rancher

Easyrss
Google Reader Client for Android
Stars: ✭ 137 (-6.16%)
Mutual labels:  makefile
Reggae
Build system in D, Python, Ruby, Javascript or Lua
Stars: ✭ 141 (-3.42%)
Mutual labels:  makefile
Terraform Makefile
Helps me actually use terraform for multiple environments
Stars: ✭ 143 (-2.05%)
Mutual labels:  makefile
Openfpgaduino
All open source file and project for OpenFPGAduino project
Stars: ✭ 137 (-6.16%)
Mutual labels:  makefile
K8s Vagrant Multi Node
A Kubernetes Vagrant Multi node environment using kubeadm.
Stars: ✭ 141 (-3.42%)
Mutual labels:  makefile
Sphinxtr
The Sphinx Thesis Resource
Stars: ✭ 142 (-2.74%)
Mutual labels:  makefile
Human Phenotype Ontology
Ontology for the description of human clinical features
Stars: ✭ 134 (-8.22%)
Mutual labels:  makefile
Android Libjpeg Turbo
Standalone Android.mk configuration for libjpeg-turbo.
Stars: ✭ 145 (-0.68%)
Mutual labels:  makefile
Ansible Cloud Hosting
Set of scripts to quickly build private cloud hosting.
Stars: ✭ 141 (-3.42%)
Mutual labels:  makefile
Proprietary vendor lge
Stars: ✭ 143 (-2.05%)
Mutual labels:  makefile
Letsgo
Golang 小视频教程,零散时间学习 Golang
Stars: ✭ 139 (-4.79%)
Mutual labels:  makefile
Makepytorchplusplus
How and why you want to make your pytorch CUDA/CPP extension with a Makefile
Stars: ✭ 142 (-2.74%)
Mutual labels:  makefile
Rbcurse
ruby based curses widgets: fields, buttons, textarea. menus, message boxes, tabbed panes, tables, listboxes, splitpanes, scrollpanes. Event based, MVC architecture. (DEPRECATED - PLS USE rbcurse-core)
Stars: ✭ 142 (-2.74%)
Mutual labels:  makefile
Thingos
A lightweight Linux OS for things.
Stars: ✭ 138 (-5.48%)
Mutual labels:  makefile
Proprietary vendor motorola
Stars: ✭ 143 (-2.05%)
Mutual labels:  makefile
Openwrt Shadowsocksr
ShadowsocksR-libev for OpenWrt/LEDE
Stars: ✭ 136 (-6.85%)
Mutual labels:  makefile
Zsh Tmux Neovim Docker
Modern zsh/tmux/neovim setup in docker, with italics
Stars: ✭ 142 (-2.74%)
Mutual labels:  makefile
Keyboard Pcbs
Keyboard PCBs
Stars: ✭ 146 (+0%)
Mutual labels:  makefile
Smarchglasses public
Stars: ✭ 143 (-2.05%)
Mutual labels:  makefile
Gb
A minimal C implementation of Nintendo Gameboy - An fast research environment for Reinforcement Learning
Stars: ✭ 143 (-2.05%)
Mutual labels:  makefile

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 you can then use ansible to maintain containers, ansible docs here

Quick Start from installing RancherOS

Append the example hosts to your ansible hosts file

cat hosts>>/etc/ansible/hosts

Now replace $IPADDRESS and $PORT in that file as necessary

now enable the ubuntu-console, if you did not do so in cloud-config

make console

then bootstrap python for ansible to function:

make bootstrap

Note: this may hang, ctrl-C if it does, and test:

make ping

Then you can

make server

and

make agent

detailed 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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].