Slide 1

Slide 1 text

ANSIBLE MEETUP AUTOMATION TO INFINITY AND BEYOND! / Pierre Mavro @deimosfr

Slide 2

Slide 2 text

ABOUT THE SPEAKER PIERRE MAVRO / @DEIMOSFR Co-Founder DevOps at Worked for and Wrote Tech and (www.deimos.fr) Motorcycle enthusiast Automation and NoSQL lover Nousmotards Criteo RedHat Ullink MariaDB High Performance Book blog wiki

Slide 3

Slide 3 text

ABOUT NOUSMOTARDS is a social network for bikers made by bikers: Nousmotards Manage events Create road books Easily meet new friends ...

Slide 4

Slide 4 text

NOUSMOTARDS ANDROID DEMO Nousmotards android, ...

Slide 5

Slide 5 text

ABOUT FOUNDERS 3 friends with the same passion

Slide 6

Slide 6 text

SOME SEXY TECHNOS WE'RE USING

Slide 7

Slide 7 text

SOME USED APPS ElasticSearch RabbitMQ Neo4j Redis MongoDB Nginx Haproxy ...

Slide 8

Slide 8 text

LANGUAGES AND FRAMEWORKS Java Spring Boot Javascript AngularJS Python Shell scripts

Slide 9

Slide 9 text

WHY DID WE CHOOSE ANSIBLE? YAML make it simple and easy to read Fast to write and execute Agentless Tons of available community plugins and role Written in Python Because that just ROX !!!

Slide 10

Slide 10 text

NOUSMOTARDS ARCHITECTURE OVERVIEW

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

DEEP DIVE ARCHITECTURE

Slide 13

Slide 13 text

DOCKER What is Docker? Simple to install (repo + packages) Store images in a Docker registry (public/private) Container versionning Uses some LXC internals Easy to use Stable enough for small production

Slide 14

Slide 14 text

PACKER What is Packer? Define source image Pre scripts (ansible dependencies) Run Ansible playbook Post scripts (clean) Export in wished format Push to your Docker registry

Slide 15

Slide 15 text

ANSIBLE Store everything on Git Avoid repetition (with_*) Set multiple envs Use vars at max Use facts at max Fail fast Community: Ansible Galaxy

Slide 16

Slide 16 text

SMARTER IS BETTER

Slide 17

Slide 17 text

GIT Keep / trace all updates from Ansible changes Use hooks for sanity checks

Slide 18

Slide 18 text

JENKINS BUILD APPS WITH DOCKER AND PUBLISH TO PRIVATE REPO

Slide 19

Slide 19 text

JENKINS BUILD CONTAINERS WITH PACKER AND ANSIBLE THEN PUBLISH TO REGISTRY

Slide 20

Slide 20 text

DEPLOY: GIT + JENKINS Git hooks and Jenkins's API Define tag triggers within the team

Slide 21

Slide 21 text

JENKINS DEPLOY NEW CONTAINERS WITH ANSIBLE

Slide 22

Slide 22 text

HARDER, BETTER, FASTER, STRONGER

Slide 23

Slide 23 text

CONSUL What is Consul? Why using Consul? Ansible deploy the servers Ansible deploy the agents on containers Register/unregister DNS entry with container start/stop Use consul_io.py for Ansible inventory

Slide 24

Slide 24 text

CONSUL TEMPLATE Why is this needed? Choose a Load Balancer (like Haproxy) Use consul-template from Ansible Galaxy Configure Consul template for Haproxy Run it to get HAProxy updated with consul changes

Slide 25

Slide 25 text

NOW IT'S OK! LET'S SUMMARIZE IT

Slide 26

Slide 26 text

ANSIBLE IS EVERYWHERE!!! To build physical servers To build containers To deploy containers Integrated with Git and Jenkins

Slide 27

Slide 27 text

ANSIBLE CONTRIBUTIONS Ansible Consul inventory Roles we're sharing: consul-template elasticsearch graphite mariadb neo4j packer https://galaxy.ansible.com/list#/users/3601

Slide 28

Slide 28 text

WHAT'S NEXT? Waiting for Ansible v2 Making functionnal tests with Ansible

Slide 29

Slide 29 text

JOIN US! www.nousmotards.com

Slide 30

Slide 30 text

ANSIBLE MEETUP WWW.NOUSMOTARDS.COM / Watch again: Pierre Mavro @deimosfr http://nousmotards.github.io/ansible-meetup-0915