• Stars
    star
    145
  • Rank 254,144 (Top 6 %)
  • Language Makefile
  • License
    Apache License 2.0
  • Created over 9 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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

More Repositories

1

mkdomoticz

Make a persistent domoticz container PDQ
Makefile
16
star
2

reactionetes

Spin up a Kubernetes stack dedicated to Reaction Commerce PDQ
Shell
16
star
3

mkTrojanHorse

This will make a linux machine into a Trojan Horse, and by that I mean we'll add a line to rc.local that starts autossh to create a reverse tunnel
Makefile
7
star
4

roustabout

A group of immigrant workers who are willing to work for docker, but not legally recognized as citizens of docker
Shell
3
star
5

reaction-generic-theme

Generic Theme Reaction Commerce
CSS
3
star
6

nx_example

Example ~/.nx directory
Nix
2
star
7

packer-ubuntu-chef-solo

Packer Ubuntu Chef Solo
Shell
2
star
8

local-debian

Make a local debian base image to be used for Docker
Shell
2
star
9

mkcloudatcost

Make a cloudatcost cloud PDQ
Makefile
2
star
10

randosay

Say Randomizer that utilizes both cowsay and ponysay.
Shell
2
star
11

mkFreeIPA

Make a persistent FreeIPA docker container PDQ
Makefile
2
star
12

bAInchmark

AI benchmarking
Python
2
star
13

reactiondev

Reaction Commerce Dev Environment
Shell
2
star
14

local-nginx

local-nginx docker container with everything built locally
Makefile
1
star
15

animated-ninja

A small repo to hold a couple of scripts I use to keep my dockers images up to date and refreshed with the latest packages
Shell
1
star
16

mkrsnapshot

Make an rsnapshot backup PDQ
Shell
1
star
17

katacoda-scenarios

Katacoda Scenarios
Shell
1
star
18

packer-gentoo

Packer builder for a Minimal Gentoo box based on the veewee-to-packer conversion
Shell
1
star
19

travisci.local

Shell
1
star
20

Firemate

Firefox containerized
Makefile
1
star
21

mkELK

Make a persistent ELK stack docker container PDQ!
Makefile
1
star
22

cli-Intro-to-Git

Introduction to git using Bash in 60 seconds or less
1
star
23

huboard-foreman-base

Huboard Enterprise Base Install with Foreman
Ruby
1
star
24

postgresocto

Postgres container for octohost - meant for dev not production, use an external SQL server for production
1
star
25

mysql-packer

Packer builder for a MySQL box
Shell
1
star
26

dark-travis-ci

Dark stylish theme for Travis-CI
CSS
1
star
27

docker-chef-solo

Basic Docker Image with Chef-Solo installed
Shell
1
star
28

Ardushipper

Ship serial from arduino to syslog via pyserial
Python
1
star
29

nx

nx is a simple wrapper tool for nixos
Shell
1
star
30

swappy

Create a swapfile PDQ
Shell
1
star
31

arch-packer

Minimal Arch install converted from veewee template
Shell
1
star
32

gamelifter

GameLifter
1
star
33

wg-init

Shell
1
star
34

skill-na-show

Play NA show on mycroft
Python
1
star
35

docker-prototype

A generic prototype Dockerfile folder with a few useful utilities
Makefile
1
star
36

ConfigurationManagementWithChef-SoloTest

Configuration Management with Chef-Solo Test for the book of the same title from Packt Publishing
Ruby
1
star
37

mkarduino

mkarduino
Makefile
1
star
38

mkpostgres

Make a persistent postgres container PDQ
Makefile
1
star
39

dacksible

Packer builder to make a docker container builder using ansible
Shell
1
star
40

ejabberdocker-ansible-playbook

Playbook to spin up an ejabberd docker container
Makefile
1
star
41

whc-openfire

Openfire setup to be used by the WHC
Makefile
1
star
42

elkto

ELK container for Octohost
Shell
1
star
43

vaers_dot

plot over time
Jupyter Notebook
1
star
44

SSShutdown

Abstract shutdown
Shell
1
star
45

mindockermup

mindmup in a docker container
1
star