Getting to push_button_deploys
-
Upload
christian-mague -
Category
Technology
-
view
635 -
download
0
description
Transcript of Getting to push_button_deploys
![Page 1: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/1.jpg)
Getting to Push Button Deploys
Moovweb
January 19, 2012
![Page 2: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/2.jpg)
Things Everyone Wants
![Page 3: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/3.jpg)
Reality
… is it done yet??? … is it done yet??? … is it done yet???
![Page 4: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/4.jpg)
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](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/5.jpg)
PROS
Increase velocity of change/responsiveness
![Page 6: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/6.jpg)
PROS – Ops Gets Out of Loop
Less work for Operations Developers feel more in control
![Page 7: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/7.jpg)
Gotta Have It!
CONS
Increase velocity of change Shared responsibility Not always easy
![Page 8: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/8.jpg)
Make It So...
![Page 9: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/9.jpg)
Components
![Page 10: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/10.jpg)
Components
![Page 11: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/11.jpg)
Components
![Page 12: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/12.jpg)
Components
![Page 13: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/13.jpg)
Components - MoovStack
![Page 14: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/14.jpg)
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](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/16.jpg)
Jenkins
![Page 17: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/17.jpg)
Jenkins
![Page 18: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/18.jpg)
Rake
![Page 19: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/19.jpg)
Packaging
But it's sooooo hard
save yourself first.....
![Page 20: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/20.jpg)
Using FPM
https://github.com/jordansissel/fpm
![Page 21: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/21.jpg)
Building a Gem
![Page 22: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/22.jpg)
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](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/23.jpg)
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](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/24.jpg)
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](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/25.jpg)
Puppet – Start with a sane base
![Page 26: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/26.jpg)
ENC – Use Groups!
http://docs.puppetlabs.com/guides/installing_dashboard.html
![Page 27: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/27.jpg)
ENC – Node Entries Inherit
![Page 28: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/28.jpg)
ENC – Scripting Additions
![Page 29: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/29.jpg)
ENC - Output
![Page 30: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/30.jpg)
Manifests Contain ENC Variables
![Page 31: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/31.jpg)
Templates Contain ENC Variables
![Page 32: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/32.jpg)
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](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/33.jpg)
Puppet - Scaling
![Page 34: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/34.jpg)
Mcollective – Do It NOW!!
Orchestration framework Crazy Parallel Write more ruby code... Clients and Agents
![Page 35: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/35.jpg)
Mcollective – Crazy Parallel
6380 nrpe checks across 370 hosts in 3.8 seconds
![Page 36: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/36.jpg)
Use Facts and Classes to Filter
![Page 37: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/37.jpg)
Mcollective – Custom Agent
![Page 38: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/38.jpg)
Mcollective – Custom Client
![Page 39: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/39.jpg)
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](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/40.jpg)
Mcollective - Scaling
![Page 41: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/41.jpg)
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](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/42.jpg)
Sinatra – Addons
sinatra-respond_to - useful as API Pony – send email from Sinatra Twitter Bootstrap – make things pretty
![Page 43: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/43.jpg)
Public Example
https://github.com/maguec/mco_dashboard_example
![Page 44: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/44.jpg)
Public Example
![Page 45: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/45.jpg)
Really Simple
![Page 46: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/46.jpg)
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](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/47.jpg)
Actual Push Procedure
![Page 48: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/48.jpg)
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](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/49.jpg)
Oppy – an example
![Page 50: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/50.jpg)
Oppy – an example
![Page 51: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/51.jpg)
Oppy – an example
![Page 52: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/52.jpg)
Oppy – an example
![Page 53: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/53.jpg)
Oppy – an example
![Page 54: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/54.jpg)
Oppy – an example
![Page 55: Getting to push_button_deploys](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/55.jpg)
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](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/56.jpg)
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](https://reader038.fdocuments.us/reader038/viewer/2022110120/5584c5c9d8b42aeb138b4825/html5/thumbnails/57.jpg)
Author
Chris Mague
IRC: bosszaru usually on #gaijin
Twitter: @maguec