Pithikos / ansible-docker-demo

Small demo on how to use Ansible to provision Docker containers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ansible - Docker demo

Prerequisites

If you don't have Docker installed, follow the instructions here to install it.

Install Ansible on Ubuntu

sudo apt-get install software-properties-common -y
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible -y

Install docker-py (assuming you have pip installed)

pip install docker-py

Demo

Get development environment up

ansible-playbook development.yml

Deploy to production

ansible-playbook production.yml

(you should edit the production server in the hosts file for this to work)

About

Small demo on how to use Ansible to provision Docker containers