getting to push_button_deploys

57
Getting to Push Button Deploys Moovweb January 19, 2012

Upload: christian-mague

Post on 20-Jun-2015

635 views

Category:

Technology


0 download

DESCRIPTION

A rundown of the tools and procedures that I have implemented at Moovweb to increase the velocity of software deployment.

TRANSCRIPT

Page 1: Getting to push_button_deploys

Getting to Push Button Deploys

Moovweb

January 19, 2012

Page 2: Getting to push_button_deploys

Things Everyone Wants

Page 3: Getting to push_button_deploys

Reality

… is it done yet??? … is it done yet??? … is it done yet???

Page 4: Getting to push_button_deploys

Gotta Have It!

PROS

Increase velocity of change/responsiveness Get Operations out of the loop Buzzword compliance – aka Shiny!!!

Page 5: Getting to push_button_deploys

PROS

Increase velocity of change/responsiveness

Page 6: Getting to push_button_deploys

PROS – Ops Gets Out of Loop

Less work for Operations Developers feel more in control

Page 7: Getting to push_button_deploys

Gotta Have It!

CONS

Increase velocity of change Shared responsibility Not always easy

Page 8: Getting to push_button_deploys

Make It So...

Page 9: Getting to push_button_deploys

Components

Page 10: Getting to push_button_deploys

Components

Page 11: Getting to push_button_deploys

Components

Page 12: Getting to push_button_deploys

Components

Page 13: Getting to push_button_deploys

Components - MoovStack

Page 14: Getting to push_button_deploys

CI

Jenkins ( maiden name is Hudson ) Checks out a deploy branch from git Runs a few sanity checks Packages software Uploads to software repo Tags build in git

Page 16: Getting to push_button_deploys

Jenkins

Page 17: Getting to push_button_deploys

Jenkins

Page 18: Getting to push_button_deploys

Rake

Page 19: Getting to push_button_deploys

Packaging

But it's sooooo hard

save yourself first.....

Page 20: Getting to push_button_deploys

Using FPM

https://github.com/jordansissel/fpm

Page 21: Getting to push_button_deploys

Building a Gem

Page 22: Getting to push_button_deploys

Right Tool Packages

Something that does not change often Don't need to roll back quickly Don't need more than 1 version at a time You cache external repos or limit to just yours

Page 23: Getting to push_button_deploys

Right Tool Gems

Fast roll back – gem cache Easy setup of gem server Need more than 1 version at a time Bundler for dependencies Bundle exec for peace of mind

Page 24: Getting to push_button_deploys

Configuration Management

Puppet everything from bare metal/base image Seperate data from manifests with an ENC Max troubleshooting time is 20 minutes Amazon free ”chaos monkey” service

Page 25: Getting to push_button_deploys

Puppet – Start with a sane base

Page 27: Getting to push_button_deploys

ENC – Node Entries Inherit

Page 28: Getting to push_button_deploys

ENC – Scripting Additions

Page 29: Getting to push_button_deploys

ENC - Output

Page 30: Getting to push_button_deploys

Manifests Contain ENC Variables

Page 31: Getting to push_button_deploys

Templates Contain ENC Variables

Page 32: Getting to push_button_deploys

Puppet - Tips

Execs hurt – try to avoid them Recursive directories – use vcsrepo instead Write your own types – just restart in between Run mongrel or passenger Use behind a load balancer for fun Use reporting, but take the DB off of your

master Write your own facts and save lots of time

Page 33: Getting to push_button_deploys

Puppet - Scaling

Page 34: Getting to push_button_deploys

Mcollective – Do It NOW!!

Orchestration framework Crazy Parallel Write more ruby code... Clients and Agents

Page 35: Getting to push_button_deploys

Mcollective – Crazy Parallel

6380 nrpe checks across 370 hosts in 3.8 seconds

Page 36: Getting to push_button_deploys

Use Facts and Classes to Filter

Page 37: Getting to push_button_deploys

Mcollective – Custom Agent

Page 38: Getting to push_button_deploys

Mcollective – Custom Client

Page 39: Getting to push_button_deploys

Mcollective - Tips

Remeber you have a machine gun pointed at your foot

Wrap command in IO.popen and log everything Log to syslog Use ApacheMQ For EC2 tune your keep alives (registerinterval) Remember you have a machine gun pointed at

your foot

Page 40: Getting to push_button_deploys

Mcollective - Scaling

Page 41: Getting to push_button_deploys

Sinatra

Web app in 5 minutes Much more minimal than rails Written in Ruby so I can interface with

Mcollective easily

http://www.sinatrarb.com/

Page 42: Getting to push_button_deploys

Sinatra – Addons

sinatra-respond_to - useful as API Pony – send email from Sinatra Twitter Bootstrap – make things pretty

Page 44: Getting to push_button_deploys

Public Example

Page 45: Getting to push_button_deploys

Really Simple

Page 46: Getting to push_button_deploys

Sinatra - Tips

Run a few behind Nginx Use helpers whenever possible Log every push Use it to integrate all your data

Page 47: Getting to push_button_deploys

Actual Push Procedure

Page 48: Getting to push_button_deploys

Dashboard Functionality Push software Audit software Real-time monitoring check Performance data integration Log data integration Troubleshooting tools for developers Utilities for non-technical staff Open trouble tickets Cost information (in progress) Userful links to other data sources

Page 49: Getting to push_button_deploys

Oppy – an example

Page 50: Getting to push_button_deploys

Oppy – an example

Page 51: Getting to push_button_deploys

Oppy – an example

Page 52: Getting to push_button_deploys

Oppy – an example

Page 53: Getting to push_button_deploys

Oppy – an example

Page 54: Getting to push_button_deploys

Oppy – an example

Page 55: Getting to push_button_deploys

Thanks

Michael Catlin (organizer) Tarun Desikan (giving me free reign/enough rope) R.I. Pienaar ( Mcollective author and helpful guy) Andrew Farmer ( for helping to get this going )

Page 56: Getting to push_button_deploys

Links

http://blog.moovweb.com/ http://www.devco.net/ http://www.puppetlabs.com/ http://blog.mague.com/ http://www.sinatrarb.com/ http://jenkins-ci.org/

IRC #puppet,#mcollective,#devops

Page 57: Getting to push_button_deploys

Author

Chris Mague

[email protected]

IRC: bosszaru usually on #gaijin

Twitter: @maguec