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

Ansible meetup-0915

Embed Size (px)

Citation preview

ANSIBLE MEETUPAUTOMATION TO INFINITY AND BEYOND!

/ Pierre Mavro @deimosfr

ABOUT THE SPEAKERPIERRE MAVRO / @DEIMOSFR

Co-FounderDevOps at Worked for and Wrote Tech and (www.deimos.fr)Motorcycle enthusiastAutomation and NoSQL lover

NousmotardsCriteoRedHat Ullink

MariaDB High Performance Bookblog wiki

ABOUT NOUSMOTARDS is a social network for bikers made by bikers:Nousmotards

Manage eventsCreate road booksEasily meet new friends...

NOUSMOTARDS ANDROID DEMONousmotards android, ...

ABOUT FOUNDERS

3 friends with the same passion

SOME SEXY TECHNOS WE'RE USING

SOME USED APPSElasticSearchRabbitMQNeo4jRedisMongoDBNginxHaproxy...

LANGUAGES AND FRAMEWORKSJavaSpring BootJavascriptAngularJSPythonShell scripts

WHY DID WE CHOOSE ANSIBLE?YAML make it simple and easy to readFast to write and executeAgentlessTons of available community plugins and roleWritten in PythonBecause that just ROX !!!

NOUSMOTARDS

ARCHITECTURE OVERVIEW

DEEP DIVE

ARCHITECTURE

DOCKERWhat is Docker?Simple to install (repo + packages)Store images in a Docker registry (public/private)Container versionningUses some LXC internalsEasy to useStable enough for small production

PACKERWhat is Packer?Define source imagePre scripts (ansible dependencies)Run Ansible playbookPost scripts (clean)Export in wished formatPush to your Docker registry

ANSIBLEStore everything on GitAvoid repetition (with_*)Set multiple envsUse vars at maxUse facts at maxFail fastCommunity: Ansible Galaxy

SMARTER IS BETTER

GITKeep / trace all updates from Ansible changesUse hooks for sanity checks

JENKINSBUILD APPS WITH DOCKER

AND PUBLISH TO PRIVATE REPO

JENKINSBUILD CONTAINERS WITH PACKER AND ANSIBLE

THEN PUBLISH TO REGISTRY

DEPLOY: GIT + JENKINSGit hooks and Jenkins's APIDefine tag triggers within the team

JENKINSDEPLOY NEW CONTAINERS WITH ANSIBLE

HARDER, BETTER,

FASTER, STRONGER

CONSULWhat is Consul?Why using Consul?Ansible deploy the serversAnsible deploy the agents on containersRegister/unregister DNS entry with container start/stopUse consul_io.py for Ansible inventory

CONSUL TEMPLATEWhy is this needed?Choose a Load Balancer (like Haproxy)Use consul-template from Ansible GalaxyConfigure Consul template for HaproxyRun it to get HAProxy updated with consul changes

NOW IT'S OK!

LET'S SUMMARIZE IT

ANSIBLE IS EVERYWHERE!!!To build physical serversTo build containersTo deploy containersIntegrated with Git and Jenkins

ANSIBLE CONTRIBUTIONSAnsible Consul inventoryRoles we're sharing:

consul-templateelasticsearchgraphitemariadbneo4jpacker

https://galaxy.ansible.com/list#/users/3601

WHAT'S NEXT?Waiting for Ansible v2Making functionnal tests with Ansible

JOIN US!

www.nousmotards.com

ANSIBLE MEETUPWWW.NOUSMOTARDS.COM

/

Watch again:

Pierre Mavro @deimosfr

http://nousmotards.github.io/ansible-meetup-0915