molander / docker-rancher-presentation

Code to create a Docker + Rancher + Cattle cluster with Ansible and Terraform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Intro to Docker orchestration with Rancher using Terraform & Ansible for deployment

Description

  • Aids in setup of Docker + Rancher on Digital Ocean with Terraform/Ansible
  • Also contains nodejs-echo-hostname which helps to illustrate Rancher load balancing

Setup

  • Create a Digital Ocean API token
  • set an environment variable for the token
export DIGITALOCEAN_TOKEN="ABDC123..."
  • Install ansible

  • Install terraform

  • To create your VMs, from ./terraform run

terraform apply
  • The script updates ansible inventory with the new IPs

  • Visit http://IP_OF_YOUR_DOCKER_0_BOX:8080/ Infrastructure > Add Hosts

  • Run

ansible all -u root -a "COMMAND_RANCHER_GIVES_YOU"

NOTE: add a curl to grab this and automatically insert into ansible cmd

Done!

You should now have a multi-node Rancher + Cattle + Docker cluster going that you can now run containers on

About

Code to create a Docker + Rancher + Cattle cluster with Ansible and Terraform


Languages

Language:HCL 69.0%Language:JavaScript 31.0%