Slides: http://www.slideshare.net/JohnCulviner/intro-to-docker-and-clustering-with-rancher-from-scratch
- Aids in setup of Docker + Rancher on Digital Ocean with Terraform.
- Also contains a variety of different language API examples that demonstrate how the Rancher/HAProxy load balancer works:
export DIGITALOCEAN_TOKEN="ABDC123..."
- Install terraform
- Make sure you have a
~/.ssh/id_rsa
. If you don't runssh-keygen
with default options from~/.ssh/
- To create your VMs, from
./terraform
run
terraform apply
- Update
./ansible/inventory.ini
for the IPs of your new VMs - Install ansible
- From
./ansible
run
ansible-playbook install-docker-rancher.yml
- Visit http://IP_OF_YOUR_DOCKER_0_BOX:8080/ Infrastructure > Add Hosts
- Run
ansible all -u root -a "COMMAND_RANCHER_GIVES_YOU"
You should now have a 4 node Rancher + Cattle + Docker cluster going that you can run containers on