SlideShare uma empresa Scribd logo
1 de 54
Baixar para ler offline
WHAT WE TALK ABOUT WHEN WE
TALK ABOUT DEVOPS
Ricard Clau - GeeksHubs @ Numa Barcelona
WHO AM I?
• Currently working as CTO at Holaluz
• Ex Wonga, Hailo, SocialPoint, Ulabox, Privalia…
• Developer for many years, been automating
things for a while, DevOps before it was trendy!
• Open-source contributor & occasional speaker
AGENDA
• Problems most companies have
• What is DevOps about?
• Tactical patterns to tackle problems
• Introduction & examples: Packer, Ansible &
Terraform
THEORY
What does DevOps try to help with?
WHYTHISTALK?
• Most companies misunderstand DevOps
• Most teams don´t know how to get started
• Not every project is green field
• Automation and DevOps quickly add value
• Tools work for Windows as well! No excuses!
COMMON PROBLEMS
• Hard to integrate new features
• Deployments are an event
• Environments are completely different
• Poor applications monitoring
• Weak DR and painful error recovery
WRONG MINDSETS
• Devs think their work ends when it works locally
• Ops don´t want to change things for stability
• C-levels often don´t get it, or see it as a project
• Bad dynamics reduce time to rethink processes
• Tools have a learning curve, need to invest
USUAL FRUSTRATIONS
• Devs don´t feel empowered
• Ops don´t trust Devs (generally speaking)
• C-levels, POs, don´t understand these deps
• Legacy architectures and code don´t help
• Small time to improve if prod constantly breaks
TIME FOR A CHANGE!
Stop the suffering!
DEVOPS IS NOT...
• A separate team or a job title
• Some tool / process you can buy
• A silver bullet to solve all your problems
• Devs with root access / Ops writing Ruby
• A threat to existing Ops
DEVOPS IS…
• Devs and Ops working together to deliver value
• Empower teams, reduce hard dependencies
• Communicaton, Integration, Collaboration
• Boosting productivity, make life easier!
• Automation, CI/CD, Infrastructure as code…
ENABLETHE BUSINESS!
That´s what they pay us for!
TACTICAL PATTERNS
Gradual introduction, like in Holaluz
CI / CD / DEPLOYMENTS
If anything, start with this!
DEPLOYMENTS
• 1 click deploy / rollback. No excuses
• Start with a tool like Capistrano / Ansistrano
and a simple rsync / git strategy (Github dep)
• Generate artifacts in your CI/CD system
• Consider if this is enough or go extra mile with
immutable infrastructure
CONTINUOUS INTEGRATION
• Git flow or trunk development?
• Having Jenkins in the stack is not CI
• Run tests automatically every time you push
• Keep the build quick, green and gradually
increase test coverage
CONTINUOUS DELIVERY
• Logical evolution of CI, after the build stage our
code is prepared to go toTest / Prod
• Not the same as Continuous Deployment
• Small and faster releases, less risk, less bugs,
boost productivity, sense of progress
• Definition of done: Deployed to Production
CONFIG MANAGEMENT
Stop having snowflakes! Envs all the same!
WHYTHESETOOLS?
• We used to do shell commands to build servers
• Nobody remembers all that was executed!
• Your servers WILL fail. It is not an IF question, but a
WHEN question.And you need to rebuild them
• Bonus: Local,Test and Prod are exactly the same
PRODUCTION
• “Production” is a config hashmap, with the
exact same components as test, just less power
• It often ends up being some mythological
place nobody is able to constantly rebuild
• It is painful to apply to existing infra, but totally
worth the investment
PUSHVS PULL MODELS
Control Machine
Connects to N servers
(SSH o WinRM) and
pushes changes
Master
Servers have“agents” installed
who pull updates from master
PROS & CONS
• Push model is easier to introduce gradually but it
can get tricky to keep track of what and when was
executed
• Pull model requires maturity as you can cause
massive disasters. It also presents some scale issues
IMAGES CREATION
• Many platforms allow the creation of “images”
• Or we can create Docker images as well
• Servers are built much quicker if we bake high!
• Packer can orchestrate all this and integrates
with all config management tools
LOGS,TIME SERIES, MONITOR
What is happening in my apps & infra?
MEANINGFUL LOGS
• Get to know the logging levels standards
• Send them to a common place where you can see
real time and query (ELK, Splunk, …). No more
grep / tail PLEASE!
• Add context and apply “grok” filters
• Bonus: Remember to enable logrotate!
TIME-SERIES DATA
• Evolution of metrics over time
• Both Infrastructure and Business metrics
• Grafana + InfluxDB / ElasticSearch / Cloudwatch…
• Crucial for Internet of Things monitoring
• Identify patterns, forecast, intervention analysis…
MONITORING / ALERTING
• It is all about setting thresholds and taking
actions if we go over / below them
• Cloudwatch + SNS, Zabbix, Pagerduty, Sensu…
• Take out alerts that get ignored: NOISE
• Better basic monitoring than nothing at all
EXTRATHOUGHTS
• Try to have the same setup in all envs
• There are too many tools, hard to standarise,
and we all have our preferences!
• Many devs don´t see value in this… until they
are on-call and cannot see what is going on!
SOMETOOLS I USE
Packer,Ansible &Terraform
BUILD AUTOMATED
MACHINE IMAGES
CONCEPTS
• Builders: Platforms you build images in. It is all
about what you start from!
• Provisioners: Installs and configures
• Post-processors: Optional final steps
DEMOTIME!
• Virtualbox and AWS examples for Ubuntu 16 and
Windows Server 2012R2
• Check these packer scripts at https://github.com/
ricardclau/geekshubsbcn/tree/master/packer
AWS EBS BUILDER
• Start from an existing AMI
• Packer creates a temporary key pair (in
Windows it retrieves the admin password)
• Provision box
• Store instance as new AMI
VIRTUALBOX /VMWARE
• Start from an ISO or existing image
• Need to bypass GUI for SO installation using
boot_command / Autounattend.xml
• Provision box
• Store as new image
WHAT I LIKE
• Builds for multiple platforms from a single
source configuration
• VERY Easy to understand
• Works (and can provision) in Win, Mac, Linux
• Easy to share provisioning scripts or use Puppet /
Ansible recipes
CAVEATS
• Need to be very prescriptive or you end up
with multiple very similar templates
• A bit hard to go with a DRY approach
• Some things are hard to destroy / replace with
new images
ANSIBLE
Automation for everyone
SHOWTIME!
• Let´s explore some Holaluz playbooks!
• We combine Galaxy roles with our own stuff!
BASIC CONCEPTS
• Inventories -> Group of servers
• Tasks -> Actions to execute
• Roles -> Reusable sets of tasks
• Playbook ->Tasks + roles applied to a part of
an inventory
PLAYBOOKS
• Group we target (from the inventory) -> hosts
• We connect with a remote_user
• And we can “become” another user
• For Windows we need to set communication
mode to WinRM and port to 5985 or 5986
ROLES
• Reusable tasks changing variables
• Folders: defaults, tasks, handlers, templates…
• Many open-source roles in Ansible Galaxy
• Sometimes tricky to make your Ansible code
reusable by other people
INVENTORIES
• We can create one “by hand” if small setup
• They can also be dynamic
• ec2.py -> creates groups by different AWS
concepts (EC2 Name, tags,ASGs…) we can use in
playbooks as targets
WHAT I LIKE
• Relatively low learning curve
• Easy to gradually introduce
• No need for agents, only need SSH / WinRM
• Plays nicely with Windows servers
• Decent community roles in Ansible Galaxy
CAVEATS
• Many bugs, BC breaks and questionable changes
• Tricky to know when we last ran some playbook in
a big setup (Ansible Tower can help)
• Tricky to make it fully idempotent
• Windows support has room for improvement
WRITE, PLAN AND CREATE
INFRASTRUCTURE AS CODE
CONCEPTS
• Provider: Platform we are automating
• Resources:Automatable things in the Provider
• Modules: Reusable set of resources
• State: Used to diff desired state to existing. Can be
stored remotely and supports distributed locking
DEMOTIME!
• Let´s build a test and prodVPC with Apache
servers under ELB!
• Check these terraform code at https://github.com/
ricardclau/geekshubsbcn/tree/master/terraform
VPC (10.161.0.0/16)Region: eu-west-1
AZ: eu-west-1a AZ: eu-west-1b AZ: eu-west-1c
DMZ1 (10.161.0.0/24) DMZ2 (10.161.1.0/24) DMZ3 (10.161.2.0/24)
APP1 (10.161.4.0/24) APP2 (10.161.5.0/24) APP3 (10.161.6.0/24)
BASTION
NAT2
APP PUBLIC ELB
NAT3
APP2APP1 APP3
NAT1
PUBLICIPSONLYPRIVATEIPS
WHAT I LIKE
• Can integrate with anything that has an API
• Easy to extend, contribute and really quick to add
new features. Excellent Github community
• Existing resources can be imported (PAIN)
• Have used it for 18 months, multiple providers, rarely
hit a bug and was always quickly fixed
CAVEATS
• Once you goTerraform, STOP using Console
• Some providers don´t have nice update support
• Terraform modules feel a bit hacky
• Sometimes state needs manual edition (getting
much better but beware new providers)
THANKSTO…
• Ex-colleagues Hailo & Wonga - StephenTan,
Nico Engelen, Chris Hoolihan, Álex Hernández
• Peter Mounce ex-Just Eat - Windows
• London DevOps meetup organisers
• All of you for coming!
RECOMMENDED BOOKS
• The Phoenix Project - Gene Kim, Kevin Behr, George Spafford
• The DevOps Handbook - Gene Kim, Patrick Debois
• The Logstash Book - JamesTurnbull
• Ansible for Devops - Jeff Geerling
• Terraform: Up and Running - JamesTurnbull
QUESTIONS? CONTACT?
• Email: ricard.clau@gmail.com
• Twitter: @ricardclau
• Github: https://github.com/ricardclau
• If you think these techniques help your company,
let´s talk!

Mais conteúdo relacionado

Mais procurados

Get There meetup March 2018 - Microservices in action at the Dutch National P...
Get There meetup March 2018 - Microservices in action at the Dutch National P...Get There meetup March 2018 - Microservices in action at the Dutch National P...
Get There meetup March 2018 - Microservices in action at the Dutch National P...Bert Jan Schrijver
 
iSense Java Summit 2017 - Microservices in action at the Dutch National Police
iSense Java Summit 2017 - Microservices in action at the Dutch National PoliceiSense Java Summit 2017 - Microservices in action at the Dutch National Police
iSense Java Summit 2017 - Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
Greenfields tech decisions
Greenfields tech decisionsGreenfields tech decisions
Greenfields tech decisionsTrent Hornibrook
 
SaltConf14 - Justin Carmony, Deseret Digital Media - Teaching Devs About DevOps
SaltConf14 - Justin Carmony, Deseret Digital Media - Teaching Devs About DevOpsSaltConf14 - Justin Carmony, Deseret Digital Media - Teaching Devs About DevOps
SaltConf14 - Justin Carmony, Deseret Digital Media - Teaching Devs About DevOpsSaltStack
 
Devops With Boxfuse and Shippable
Devops With Boxfuse and ShippableDevops With Boxfuse and Shippable
Devops With Boxfuse and ShippableAndrew Schwabe
 
Serverless On Stage - Serverless URL Shortener
Serverless On Stage - Serverless URL ShortenerServerless On Stage - Serverless URL Shortener
Serverless On Stage - Serverless URL ShortenerLuca Bianchi
 
Mind the Gap: Crossing the DevOps Chasm
Mind the Gap: Crossing the DevOps ChasmMind the Gap: Crossing the DevOps Chasm
Mind the Gap: Crossing the DevOps ChasmQualiQuali
 
Navigating the Incubator at the Apache Software Foundation
Navigating the Incubator at the Apache Software FoundationNavigating the Incubator at the Apache Software Foundation
Navigating the Incubator at the Apache Software FoundationBrett Porter
 
Devops and Immutable infrastructure - Cloud Expo 2015 NYC
Devops and Immutable infrastructure  - Cloud Expo 2015 NYCDevops and Immutable infrastructure  - Cloud Expo 2015 NYC
Devops and Immutable infrastructure - Cloud Expo 2015 NYCJohn Willis
 
Handling 1 Billion Requests/hr with Minimal Latency Using Docker
Handling 1 Billion Requests/hr with Minimal Latency Using DockerHandling 1 Billion Requests/hr with Minimal Latency Using Docker
Handling 1 Billion Requests/hr with Minimal Latency Using DockerMatomy
 
OpenValue meetup October 2017 - Microservices in action at the Dutch National...
OpenValue meetup October 2017 - Microservices in action at the Dutch National...OpenValue meetup October 2017 - Microservices in action at the Dutch National...
OpenValue meetup October 2017 - Microservices in action at the Dutch National...Bert Jan Schrijver
 
JavaZone 2017 - Microservices in action at the Dutch National Police
JavaZone 2017 - Microservices in action at the Dutch National PoliceJavaZone 2017 - Microservices in action at the Dutch National Police
JavaZone 2017 - Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
Microservices in action at the Dutch National Police
Microservices in action at the Dutch National PoliceMicroservices in action at the Dutch National Police
Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
Innovating faster with SBT, Continuous Delivery, and LXC
Innovating faster with SBT, Continuous Delivery, and LXCInnovating faster with SBT, Continuous Delivery, and LXC
Innovating faster with SBT, Continuous Delivery, and LXCkscaldef
 
Bol.com Tech lab September 2017 - Microservices in action at the Dutch Nation...
Bol.com Tech lab September 2017 - Microservices in action at the Dutch Nation...Bol.com Tech lab September 2017 - Microservices in action at the Dutch Nation...
Bol.com Tech lab September 2017 - Microservices in action at the Dutch Nation...Bert Jan Schrijver
 
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National Police
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National PoliceCodeMotion Amsterdam 2018 - Microservices in action at the Dutch National Police
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National PoliceBert Jan Schrijver
 
DevOps Cardiff - Puppet vs Chef vs Ansible
DevOps Cardiff - Puppet vs Chef vs AnsibleDevOps Cardiff - Puppet vs Chef vs Ansible
DevOps Cardiff - Puppet vs Chef vs AnsibleMark Phillips
 
The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012Jan Jongboom
 

Mais procurados (19)

Get There meetup March 2018 - Microservices in action at the Dutch National P...
Get There meetup March 2018 - Microservices in action at the Dutch National P...Get There meetup March 2018 - Microservices in action at the Dutch National P...
Get There meetup March 2018 - Microservices in action at the Dutch National P...
 
iSense Java Summit 2017 - Microservices in action at the Dutch National Police
iSense Java Summit 2017 - Microservices in action at the Dutch National PoliceiSense Java Summit 2017 - Microservices in action at the Dutch National Police
iSense Java Summit 2017 - Microservices in action at the Dutch National Police
 
Greenfields tech decisions
Greenfields tech decisionsGreenfields tech decisions
Greenfields tech decisions
 
Migrating big data
Migrating big dataMigrating big data
Migrating big data
 
SaltConf14 - Justin Carmony, Deseret Digital Media - Teaching Devs About DevOps
SaltConf14 - Justin Carmony, Deseret Digital Media - Teaching Devs About DevOpsSaltConf14 - Justin Carmony, Deseret Digital Media - Teaching Devs About DevOps
SaltConf14 - Justin Carmony, Deseret Digital Media - Teaching Devs About DevOps
 
Devops With Boxfuse and Shippable
Devops With Boxfuse and ShippableDevops With Boxfuse and Shippable
Devops With Boxfuse and Shippable
 
Serverless On Stage - Serverless URL Shortener
Serverless On Stage - Serverless URL ShortenerServerless On Stage - Serverless URL Shortener
Serverless On Stage - Serverless URL Shortener
 
Mind the Gap: Crossing the DevOps Chasm
Mind the Gap: Crossing the DevOps ChasmMind the Gap: Crossing the DevOps Chasm
Mind the Gap: Crossing the DevOps Chasm
 
Navigating the Incubator at the Apache Software Foundation
Navigating the Incubator at the Apache Software FoundationNavigating the Incubator at the Apache Software Foundation
Navigating the Incubator at the Apache Software Foundation
 
Devops and Immutable infrastructure - Cloud Expo 2015 NYC
Devops and Immutable infrastructure  - Cloud Expo 2015 NYCDevops and Immutable infrastructure  - Cloud Expo 2015 NYC
Devops and Immutable infrastructure - Cloud Expo 2015 NYC
 
Handling 1 Billion Requests/hr with Minimal Latency Using Docker
Handling 1 Billion Requests/hr with Minimal Latency Using DockerHandling 1 Billion Requests/hr with Minimal Latency Using Docker
Handling 1 Billion Requests/hr with Minimal Latency Using Docker
 
OpenValue meetup October 2017 - Microservices in action at the Dutch National...
OpenValue meetup October 2017 - Microservices in action at the Dutch National...OpenValue meetup October 2017 - Microservices in action at the Dutch National...
OpenValue meetup October 2017 - Microservices in action at the Dutch National...
 
JavaZone 2017 - Microservices in action at the Dutch National Police
JavaZone 2017 - Microservices in action at the Dutch National PoliceJavaZone 2017 - Microservices in action at the Dutch National Police
JavaZone 2017 - Microservices in action at the Dutch National Police
 
Microservices in action at the Dutch National Police
Microservices in action at the Dutch National PoliceMicroservices in action at the Dutch National Police
Microservices in action at the Dutch National Police
 
Innovating faster with SBT, Continuous Delivery, and LXC
Innovating faster with SBT, Continuous Delivery, and LXCInnovating faster with SBT, Continuous Delivery, and LXC
Innovating faster with SBT, Continuous Delivery, and LXC
 
Bol.com Tech lab September 2017 - Microservices in action at the Dutch Nation...
Bol.com Tech lab September 2017 - Microservices in action at the Dutch Nation...Bol.com Tech lab September 2017 - Microservices in action at the Dutch Nation...
Bol.com Tech lab September 2017 - Microservices in action at the Dutch Nation...
 
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National Police
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National PoliceCodeMotion Amsterdam 2018 - Microservices in action at the Dutch National Police
CodeMotion Amsterdam 2018 - Microservices in action at the Dutch National Police
 
DevOps Cardiff - Puppet vs Chef vs Ansible
DevOps Cardiff - Puppet vs Chef vs AnsibleDevOps Cardiff - Puppet vs Chef vs Ansible
DevOps Cardiff - Puppet vs Chef vs Ansible
 
The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012The Architect Way - JSCamp.asia 2012
The Architect Way - JSCamp.asia 2012
 

Semelhante a What we talk about when we talk about DevOps

Habitat Overview
Habitat OverviewHabitat Overview
Habitat OverviewMandi Walls
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2Docker, Inc.
 
Ansible: What, Why & How
Ansible: What, Why & HowAnsible: What, Why & How
Ansible: What, Why & HowAlfonso Cabrera
 
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...Docker, Inc.
 
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...Gaetano Giunta
 
Vagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVaidik Kapoor
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchHoward Greenberg
 
Smart Platform Infrastructure with AWS
Smart Platform Infrastructure with AWSSmart Platform Infrastructure with AWS
Smart Platform Infrastructure with AWSJames Huston
 
Hot to build continuously processing for 24/7 real-time data streaming platform?
Hot to build continuously processing for 24/7 real-time data streaming platform?Hot to build continuously processing for 24/7 real-time data streaming platform?
Hot to build continuously processing for 24/7 real-time data streaming platform?GetInData
 
Open stack jobs avoiding the axe
Open stack jobs   avoiding the axeOpen stack jobs   avoiding the axe
Open stack jobs avoiding the axeJim Leitch
 
Top 10 dev ops tools (1)
Top 10 dev ops tools (1)Top 10 dev ops tools (1)
Top 10 dev ops tools (1)yalini97
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...Evans Ye
 
Deploying your SaaS stack OnPrem
Deploying your SaaS stack OnPremDeploying your SaaS stack OnPrem
Deploying your SaaS stack OnPremKris Buytaert
 

Semelhante a What we talk about when we talk about DevOps (20)

Habitat Overview
Habitat OverviewHabitat Overview
Habitat Overview
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2
 
The ABC's of IaC
The ABC's of IaCThe ABC's of IaC
The ABC's of IaC
 
Ansible: What, Why & How
Ansible: What, Why & HowAnsible: What, Why & How
Ansible: What, Why & How
 
Dev Ops without the Ops
Dev Ops without the OpsDev Ops without the Ops
Dev Ops without the Ops
 
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
Journey to Docker Production: Evolving Your Infrastructure and Processes - Br...
 
Stackato v6
Stackato v6Stackato v6
Stackato v6
 
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
 
Vagrant for Effective DevOps Culture
Vagrant for Effective DevOps CultureVagrant for Effective DevOps Culture
Vagrant for Effective DevOps Culture
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
Smart Platform Infrastructure with AWS
Smart Platform Infrastructure with AWSSmart Platform Infrastructure with AWS
Smart Platform Infrastructure with AWS
 
Stackato v5
Stackato v5Stackato v5
Stackato v5
 
Hot to build continuously processing for 24/7 real-time data streaming platform?
Hot to build continuously processing for 24/7 real-time data streaming platform?Hot to build continuously processing for 24/7 real-time data streaming platform?
Hot to build continuously processing for 24/7 real-time data streaming platform?
 
Open stack jobs avoiding the axe
Open stack jobs   avoiding the axeOpen stack jobs   avoiding the axe
Open stack jobs avoiding the axe
 
Stackato
StackatoStackato
Stackato
 
Top 10 dev ops tools (1)
Top 10 dev ops tools (1)Top 10 dev ops tools (1)
Top 10 dev ops tools (1)
 
The Architect Way
The Architect WayThe Architect Way
The Architect Way
 
DevOps tools for winning agility
DevOps tools for winning agilityDevOps tools for winning agility
DevOps tools for winning agility
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...
 
Deploying your SaaS stack OnPrem
Deploying your SaaS stack OnPremDeploying your SaaS stack OnPrem
Deploying your SaaS stack OnPrem
 

Mais de Ricard Clau

NoEresTanEspecial-PulpoCon22.pdf
NoEresTanEspecial-PulpoCon22.pdfNoEresTanEspecial-PulpoCon22.pdf
NoEresTanEspecial-PulpoCon22.pdfRicard Clau
 
DevOps & Infraestructura como código: Promesas Rotas
DevOps & Infraestructura como código: Promesas RotasDevOps & Infraestructura como código: Promesas Rotas
DevOps & Infraestructura como código: Promesas RotasRicard Clau
 
DevOps Barcelona Conference 2018 - Intro
DevOps Barcelona Conference 2018 - IntroDevOps Barcelona Conference 2018 - Intro
DevOps Barcelona Conference 2018 - IntroRicard Clau
 
Speed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisSpeed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisRicard Clau
 
Scaling with Symfony - PHP UK
Scaling with Symfony - PHP UKScaling with Symfony - PHP UK
Scaling with Symfony - PHP UKRicard Clau
 
Redis Everywhere - Sunshine PHP
Redis Everywhere - Sunshine PHPRedis Everywhere - Sunshine PHP
Redis Everywhere - Sunshine PHPRicard Clau
 
Redis everywhere - PHP London
Redis everywhere - PHP LondonRedis everywhere - PHP London
Redis everywhere - PHP LondonRicard Clau
 
Escalabilidad y alto rendimiento con Symfony2
Escalabilidad y alto rendimiento con Symfony2Escalabilidad y alto rendimiento con Symfony2
Escalabilidad y alto rendimiento con Symfony2Ricard Clau
 
Betabeers Barcelona - Buenas prácticas
Betabeers Barcelona - Buenas prácticasBetabeers Barcelona - Buenas prácticas
Betabeers Barcelona - Buenas prácticasRicard Clau
 
Desymfony - Servicios
Desymfony  - ServiciosDesymfony  - Servicios
Desymfony - ServiciosRicard Clau
 

Mais de Ricard Clau (12)

devopsbcn23.pdf
devopsbcn23.pdfdevopsbcn23.pdf
devopsbcn23.pdf
 
devopsbcn22.pdf
devopsbcn22.pdfdevopsbcn22.pdf
devopsbcn22.pdf
 
NoEresTanEspecial-PulpoCon22.pdf
NoEresTanEspecial-PulpoCon22.pdfNoEresTanEspecial-PulpoCon22.pdf
NoEresTanEspecial-PulpoCon22.pdf
 
DevOps & Infraestructura como código: Promesas Rotas
DevOps & Infraestructura como código: Promesas RotasDevOps & Infraestructura como código: Promesas Rotas
DevOps & Infraestructura como código: Promesas Rotas
 
DevOps Barcelona Conference 2018 - Intro
DevOps Barcelona Conference 2018 - IntroDevOps Barcelona Conference 2018 - Intro
DevOps Barcelona Conference 2018 - Intro
 
Speed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisSpeed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with Redis
 
Scaling with Symfony - PHP UK
Scaling with Symfony - PHP UKScaling with Symfony - PHP UK
Scaling with Symfony - PHP UK
 
Redis Everywhere - Sunshine PHP
Redis Everywhere - Sunshine PHPRedis Everywhere - Sunshine PHP
Redis Everywhere - Sunshine PHP
 
Redis everywhere - PHP London
Redis everywhere - PHP LondonRedis everywhere - PHP London
Redis everywhere - PHP London
 
Escalabilidad y alto rendimiento con Symfony2
Escalabilidad y alto rendimiento con Symfony2Escalabilidad y alto rendimiento con Symfony2
Escalabilidad y alto rendimiento con Symfony2
 
Betabeers Barcelona - Buenas prácticas
Betabeers Barcelona - Buenas prácticasBetabeers Barcelona - Buenas prácticas
Betabeers Barcelona - Buenas prácticas
 
Desymfony - Servicios
Desymfony  - ServiciosDesymfony  - Servicios
Desymfony - Servicios
 

Último

Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086anil_gaur
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...soginsider
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 

Último (20)

Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 

What we talk about when we talk about DevOps

  • 1. WHAT WE TALK ABOUT WHEN WE TALK ABOUT DEVOPS Ricard Clau - GeeksHubs @ Numa Barcelona
  • 2. WHO AM I? • Currently working as CTO at Holaluz • Ex Wonga, Hailo, SocialPoint, Ulabox, Privalia… • Developer for many years, been automating things for a while, DevOps before it was trendy! • Open-source contributor & occasional speaker
  • 3. AGENDA • Problems most companies have • What is DevOps about? • Tactical patterns to tackle problems • Introduction & examples: Packer, Ansible & Terraform
  • 4. THEORY What does DevOps try to help with?
  • 5. WHYTHISTALK? • Most companies misunderstand DevOps • Most teams don´t know how to get started • Not every project is green field • Automation and DevOps quickly add value • Tools work for Windows as well! No excuses!
  • 6. COMMON PROBLEMS • Hard to integrate new features • Deployments are an event • Environments are completely different • Poor applications monitoring • Weak DR and painful error recovery
  • 7. WRONG MINDSETS • Devs think their work ends when it works locally • Ops don´t want to change things for stability • C-levels often don´t get it, or see it as a project • Bad dynamics reduce time to rethink processes • Tools have a learning curve, need to invest
  • 8. USUAL FRUSTRATIONS • Devs don´t feel empowered • Ops don´t trust Devs (generally speaking) • C-levels, POs, don´t understand these deps • Legacy architectures and code don´t help • Small time to improve if prod constantly breaks
  • 9. TIME FOR A CHANGE! Stop the suffering!
  • 10. DEVOPS IS NOT... • A separate team or a job title • Some tool / process you can buy • A silver bullet to solve all your problems • Devs with root access / Ops writing Ruby • A threat to existing Ops
  • 11. DEVOPS IS… • Devs and Ops working together to deliver value • Empower teams, reduce hard dependencies • Communicaton, Integration, Collaboration • Boosting productivity, make life easier! • Automation, CI/CD, Infrastructure as code…
  • 14. CI / CD / DEPLOYMENTS If anything, start with this!
  • 15. DEPLOYMENTS • 1 click deploy / rollback. No excuses • Start with a tool like Capistrano / Ansistrano and a simple rsync / git strategy (Github dep) • Generate artifacts in your CI/CD system • Consider if this is enough or go extra mile with immutable infrastructure
  • 16. CONTINUOUS INTEGRATION • Git flow or trunk development? • Having Jenkins in the stack is not CI • Run tests automatically every time you push • Keep the build quick, green and gradually increase test coverage
  • 17. CONTINUOUS DELIVERY • Logical evolution of CI, after the build stage our code is prepared to go toTest / Prod • Not the same as Continuous Deployment • Small and faster releases, less risk, less bugs, boost productivity, sense of progress • Definition of done: Deployed to Production
  • 18. CONFIG MANAGEMENT Stop having snowflakes! Envs all the same!
  • 19. WHYTHESETOOLS? • We used to do shell commands to build servers • Nobody remembers all that was executed! • Your servers WILL fail. It is not an IF question, but a WHEN question.And you need to rebuild them • Bonus: Local,Test and Prod are exactly the same
  • 20. PRODUCTION • “Production” is a config hashmap, with the exact same components as test, just less power • It often ends up being some mythological place nobody is able to constantly rebuild • It is painful to apply to existing infra, but totally worth the investment
  • 21. PUSHVS PULL MODELS Control Machine Connects to N servers (SSH o WinRM) and pushes changes Master Servers have“agents” installed who pull updates from master
  • 22. PROS & CONS • Push model is easier to introduce gradually but it can get tricky to keep track of what and when was executed • Pull model requires maturity as you can cause massive disasters. It also presents some scale issues
  • 23. IMAGES CREATION • Many platforms allow the creation of “images” • Or we can create Docker images as well • Servers are built much quicker if we bake high! • Packer can orchestrate all this and integrates with all config management tools
  • 24. LOGS,TIME SERIES, MONITOR What is happening in my apps & infra?
  • 25. MEANINGFUL LOGS • Get to know the logging levels standards • Send them to a common place where you can see real time and query (ELK, Splunk, …). No more grep / tail PLEASE! • Add context and apply “grok” filters • Bonus: Remember to enable logrotate!
  • 26. TIME-SERIES DATA • Evolution of metrics over time • Both Infrastructure and Business metrics • Grafana + InfluxDB / ElasticSearch / Cloudwatch… • Crucial for Internet of Things monitoring • Identify patterns, forecast, intervention analysis…
  • 27.
  • 28. MONITORING / ALERTING • It is all about setting thresholds and taking actions if we go over / below them • Cloudwatch + SNS, Zabbix, Pagerduty, Sensu… • Take out alerts that get ignored: NOISE • Better basic monitoring than nothing at all
  • 29. EXTRATHOUGHTS • Try to have the same setup in all envs • There are too many tools, hard to standarise, and we all have our preferences! • Many devs don´t see value in this… until they are on-call and cannot see what is going on!
  • 32. CONCEPTS • Builders: Platforms you build images in. It is all about what you start from! • Provisioners: Installs and configures • Post-processors: Optional final steps
  • 33. DEMOTIME! • Virtualbox and AWS examples for Ubuntu 16 and Windows Server 2012R2 • Check these packer scripts at https://github.com/ ricardclau/geekshubsbcn/tree/master/packer
  • 34. AWS EBS BUILDER • Start from an existing AMI • Packer creates a temporary key pair (in Windows it retrieves the admin password) • Provision box • Store instance as new AMI
  • 35. VIRTUALBOX /VMWARE • Start from an ISO or existing image • Need to bypass GUI for SO installation using boot_command / Autounattend.xml • Provision box • Store as new image
  • 36. WHAT I LIKE • Builds for multiple platforms from a single source configuration • VERY Easy to understand • Works (and can provision) in Win, Mac, Linux • Easy to share provisioning scripts or use Puppet / Ansible recipes
  • 37. CAVEATS • Need to be very prescriptive or you end up with multiple very similar templates • A bit hard to go with a DRY approach • Some things are hard to destroy / replace with new images
  • 39. SHOWTIME! • Let´s explore some Holaluz playbooks! • We combine Galaxy roles with our own stuff!
  • 40. BASIC CONCEPTS • Inventories -> Group of servers • Tasks -> Actions to execute • Roles -> Reusable sets of tasks • Playbook ->Tasks + roles applied to a part of an inventory
  • 41. PLAYBOOKS • Group we target (from the inventory) -> hosts • We connect with a remote_user • And we can “become” another user • For Windows we need to set communication mode to WinRM and port to 5985 or 5986
  • 42. ROLES • Reusable tasks changing variables • Folders: defaults, tasks, handlers, templates… • Many open-source roles in Ansible Galaxy • Sometimes tricky to make your Ansible code reusable by other people
  • 43. INVENTORIES • We can create one “by hand” if small setup • They can also be dynamic • ec2.py -> creates groups by different AWS concepts (EC2 Name, tags,ASGs…) we can use in playbooks as targets
  • 44. WHAT I LIKE • Relatively low learning curve • Easy to gradually introduce • No need for agents, only need SSH / WinRM • Plays nicely with Windows servers • Decent community roles in Ansible Galaxy
  • 45. CAVEATS • Many bugs, BC breaks and questionable changes • Tricky to know when we last ran some playbook in a big setup (Ansible Tower can help) • Tricky to make it fully idempotent • Windows support has room for improvement
  • 46. WRITE, PLAN AND CREATE INFRASTRUCTURE AS CODE
  • 47. CONCEPTS • Provider: Platform we are automating • Resources:Automatable things in the Provider • Modules: Reusable set of resources • State: Used to diff desired state to existing. Can be stored remotely and supports distributed locking
  • 48. DEMOTIME! • Let´s build a test and prodVPC with Apache servers under ELB! • Check these terraform code at https://github.com/ ricardclau/geekshubsbcn/tree/master/terraform
  • 49. VPC (10.161.0.0/16)Region: eu-west-1 AZ: eu-west-1a AZ: eu-west-1b AZ: eu-west-1c DMZ1 (10.161.0.0/24) DMZ2 (10.161.1.0/24) DMZ3 (10.161.2.0/24) APP1 (10.161.4.0/24) APP2 (10.161.5.0/24) APP3 (10.161.6.0/24) BASTION NAT2 APP PUBLIC ELB NAT3 APP2APP1 APP3 NAT1 PUBLICIPSONLYPRIVATEIPS
  • 50. WHAT I LIKE • Can integrate with anything that has an API • Easy to extend, contribute and really quick to add new features. Excellent Github community • Existing resources can be imported (PAIN) • Have used it for 18 months, multiple providers, rarely hit a bug and was always quickly fixed
  • 51. CAVEATS • Once you goTerraform, STOP using Console • Some providers don´t have nice update support • Terraform modules feel a bit hacky • Sometimes state needs manual edition (getting much better but beware new providers)
  • 52. THANKSTO… • Ex-colleagues Hailo & Wonga - StephenTan, Nico Engelen, Chris Hoolihan, Álex Hernández • Peter Mounce ex-Just Eat - Windows • London DevOps meetup organisers • All of you for coming!
  • 53. RECOMMENDED BOOKS • The Phoenix Project - Gene Kim, Kevin Behr, George Spafford • The DevOps Handbook - Gene Kim, Patrick Debois • The Logstash Book - JamesTurnbull • Ansible for Devops - Jeff Geerling • Terraform: Up and Running - JamesTurnbull
  • 54. QUESTIONS? CONTACT? • Email: ricard.clau@gmail.com • Twitter: @ricardclau • Github: https://github.com/ricardclau • If you think these techniques help your company, let´s talk!