Share
Embed
Transcript
15 slides
-
Who am I • RRR • Capital One • DevOps
• Amelia • Toronto Roderick R. Randolph Opinions expressed are solely my own and do not express the views or opinions of my employer. /roderickrandolph -
What is Ansible? Ansible is an IT automation tool. It
can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates. http://docs.ansible.com/ansible/ -
Why Ansible? • Agentless • Simple, easy to use AND
read • Powerful orchestration features • Highly extensible -
What is Ansible Container? Ansible Container is an open source
project that aims to enable the automation of the entire container build, deployment and management process. https://www.ansible.com/ansible-container -
Why Ansible Container? • Shell scripting in Dockerfiles is bad
• Reuse existing Ansible modules / roles • Orchestrate across containers • Idempotent -
How does Ansible Container work? • Docker Compose • Version
1.7.0 • Uses the Version 1 file format • Ansible Container Builder (Docker image) • Runs ansible-playbook from inside the container • Docker connection plugin (now available in Ansible 2.1) • Can be used outside of ansible-container -
Ansible Container features (as of 9/8/16) • Build containers •
Run containers • Push containers to any Docker registry • Ship containers to a Docker cloud compatible platform • Google's Kubernetes • RedHat's OpenShift -
Ansible Container gotchas and tips! • SSH is not required
• Python is required to run Ansible in containers • Ansible's raw module can be used to install Python into the container • Don't mix container-managed playbooks with server-managed playbooks • Use Ansible roles to share tasks between playbooks • Ansible Galaxy roles must be installed next to the playbook vs. in the global default directory (i.e. /etc/ansible/roles) • E.g. ansible-galaxy install <role> -p ansible/roles • Use --flatten to reduce image size • Docker-in-Docker and Ansible Container don't play well together -
Upcoming 0.2.0 features (eta: early Oct '16) •Build Cache •Naming
and tagging images •Template rendering in container.yml •Custom build variables and volumes •And more… https://docs.ansible.com/ansible-container/roadmaps/roadmap_0_2_0.html -
Resources • Ansible Container GitHub: • https://github.com/ansible/ansible-container • Ansible Container
Docs: • https://docs.ansible.com/ansible-container/ • https://www.ansible.com/blog/ansible-container-project • Demo: • http://goo.gl/DkTddK • Jenkins Pipeline: • https://jenkins.io/doc/pipeline/