Buytaert kris tools

46
7 Tools for your devops 7 Tools for your devops stack stack Kris Buytaert Loadays 2012

Transcript of Buytaert kris tools

Page 1: Buytaert kris tools

7 Tools for your devops 7 Tools for your devops stackstack

Kris BuytaertLoadays 2012

Page 2: Buytaert kris tools

Kris BuytaertKris Buytaert• I used to be a Dev,I used to be a Dev,• Then Became an OpThen Became an Op• Chief Trolling Officer and Open Source Chief Trolling Officer and Open Source

Consultant @inuits.euConsultant @inuits.eu• Everything is an effing DNS ProblemEverything is an effing DNS Problem• Building Clouds since before the bookstoreBuilding Clouds since before the bookstore• Some books, some papers, some blogsSome books, some papers, some blogs• But mostly, trying to be good at my jobBut mostly, trying to be good at my job

Page 3: Buytaert kris tools

What's this devops thing What's this devops thing anyhow ? anyhow ?

Page 4: Buytaert kris tools

World , 200X-2009World , 200X-2009Patrick Debois, Gildas Le Nadan, Andrew Clay Shafer, Kris Buytaert, Jezz Patrick Debois, Gildas Le Nadan, Andrew Clay Shafer, Kris Buytaert, Jezz Humble, Lindsay Holmwood, John Willis, Chris Read, Julian Simpson, and Humble, Lindsay Holmwood, John Willis, Chris Read, Julian Simpson, and

lots of others ..lots of others ..

Gent , October 2009Gent , October 2009

Mountain View , June 2010Mountain View , June 2010

Hamburg , October 2010Hamburg , October 2010

Boston, March 2011Boston, March 2011

Mountain View, June 2011Mountain View, June 2011

Bangalore, Melbourne, Bangalore, Melbourne,

Goteborg , October 2011Goteborg , October 2011

........

Page 5: Buytaert kris tools

● Devops is a growing professional and cultural Devops is a growing professional and cultural movementmovement

● We don't have all the answers yetWe don't have all the answers yet● We are reaching out to different communities We are reaching out to different communities ● We will point out problems we see..We will point out problems we see..● Only the name is new Only the name is new

While we are still working out the solutionsWhile we are still working out the solutions

Page 6: Buytaert kris tools

Devops, a definition:Devops, a definition:

Page 7: Buytaert kris tools

● Adopt the new philosophy. We are in a new economic age. Western management Adopt the new philosophy. We are in a new economic age. Western management must awaken to the challenge, must learn their responsibilities, and take on must awaken to the challenge, must learn their responsibilities, and take on leadership for change.leadership for change.

● Cease dependence on inspection to achieve quality. Eliminate the need for massive Cease dependence on inspection to achieve quality. Eliminate the need for massive inspection by building quality into the product in the first place.inspection by building quality into the product in the first place.

● Improve constantly and forever the system of production and service, to improve Improve constantly and forever the system of production and service, to improve quality and productivity, and thus constantly decrease costs.quality and productivity, and thus constantly decrease costs.

● Institute training on the job.Institute training on the job.● Institute leadership The aim of supervision should be to help people and machines Institute leadership The aim of supervision should be to help people and machines

and gadgets do a better job. and gadgets do a better job. ● Drive out fear, so that everyone may work effectively for the company. Drive out fear, so that everyone may work effectively for the company. ● Break down barriers between departments. People in research, design, sales, and Break down barriers between departments. People in research, design, sales, and

production must work as a team, in order to foresee problems of production and production must work as a team, in order to foresee problems of production and usage that may be encountered with the product or service.usage that may be encountered with the product or service.

● Eliminate slogans, exhortations, and targets for the work force asking for zero defects Eliminate slogans, exhortations, and targets for the work force asking for zero defects and new levels of productivity. Such exhortations only create adversarial and new levels of productivity. Such exhortations only create adversarial relationships, as the bulk of the causes of low quality and low productivity belong to relationships, as the bulk of the causes of low quality and low productivity belong to the system and thus lie beyond the power of the work force.the system and thus lie beyond the power of the work force.

● Eliminate management by objective. Eliminate management by numbers Eliminate management by objective. Eliminate management by numbers and numerical goals. Instead substitute with leadership.and numerical goals. Instead substitute with leadership.

● Remove barriers that rob the hourly worker of his right to pride of Remove barriers that rob the hourly worker of his right to pride of workmanship. The responsibility of supervisors must be changed from workmanship. The responsibility of supervisors must be changed from sheer numbers to quality.sheer numbers to quality.

● Remove barriers that rob people in management and in engineering of Remove barriers that rob people in management and in engineering of their right to pride of workmanship. their right to pride of workmanship.

● Institute a vigorous program of education and self-improvement.Institute a vigorous program of education and self-improvement.● Put everybody in the company to work to accomplish the transformation. The Put everybody in the company to work to accomplish the transformation. The

transformation is everybody's job.transformation is everybody's job.

Page 8: Buytaert kris tools

William Edwards William Edwards Deming Deming

1986, Out of the Crisis. 1986, Out of the Crisis.

http://en.wikipedia.org/wiki/W._Edwards_Deminghttp://en.wikipedia.org/wiki/W._Edwards_Deming

Page 9: Buytaert kris tools

““DevOps is a cultural andDevOps is a cultural and

professional movement”professional movement”

Adam JacobAdam Jacob

Page 10: Buytaert kris tools

CAMSCAMS● CultureCulture● AutomationAutomation● MeasurementMeasurement● SharingSharing

Damon Edwards and John WillisDamon Edwards and John Willis

Page 11: Buytaert kris tools

Culture :Culture :

Page 12: Buytaert kris tools

Devs vs OpsDevs vs Ops

Page 13: Buytaert kris tools
Page 14: Buytaert kris tools

Breaking the SilosBreaking the Silos

Getting AlongGetting AlongOpsOpsDevs Devs

Page 15: Buytaert kris tools

What tool?What tool?

Page 16: Buytaert kris tools
Page 17: Buytaert kris tools

Automation:Automation:

Page 18: Buytaert kris tools

We all know / use We all know / use ● Deployment automation :Deployment automation :

● Fai , kickstart, preseed, cobbler,Fai , kickstart, preseed, cobbler,● Configuration ManagementConfiguration Management

● Puppet, chef, cfengine, bcfg2Puppet, chef, cfengine, bcfg2● Build Automation Build Automation

● Jenkins, maven, ant, cruisecontrol, Jenkins, maven, ant, cruisecontrol, hudsonhudson

Page 19: Buytaert kris tools

The Marionette CollectiveThe Marionette Collective● Distributed ssh ++Distributed ssh ++● OrchestrationOrchestration● What version of ssh do I have installed on my What version of ssh do I have installed on my

servers ? servers ? ● On what servers is XYZ running ? On what servers is XYZ running ? ● Clean al my ssl certs ? Clean al my ssl certs ? ● Restart apache on all servers with fact X Restart apache on all servers with fact X

Page 20: Buytaert kris tools

mc-servicemc-servicemc-service httpd status -W /uat/

* [ ============================================================> ] 80 / 80

bleh.poc.com status=stopped xs03.ta.google.com status=stopped elasticsearch02.uat.com status=stopped dbs01-.poc.com status=stopped dino.uat.com status=stopped dsp01.uat.com status=stopped webserver01.uat.com status=running dbs01-old.uat.com status=stopped alexdb02-hdp.poc.com status=stopped postfix.uat.com status=stopped ns01.uat.com status=stopped devtools03.uat.com status=running

Page 21: Buytaert kris tools

mc-packagemc-packagemc-package -W /dev/ status jdk * [ ============================================================> ] 33 / 33

servicesdb01.dev.com version = -absent services.dev.google.com version = jdk-1.6.0_13-fcs drbdtest02.dev.google.com version = -absent services3.dev.google.com version = jdk-1.6.0_20-fcs um.dev.google.com version = jdk-1.5.0_19-fcs devtools03.uat.com version = jdk-1.6.0_29-fcs alexandria02.dev.google.com version = -absent weblink01.dev.com version = -absent wikitest.dev.google.com version = jdk-1.6.0_24-fcs payment.dev.google.com version = jdk-1.5.0_17-fcs tiff2pdf01.dev.com version = -absent devdoos.dev.com version = jdk-1.6.0_30-fcs wiki.dev.google.com version = jdk-1.6.0_24-fcs reporting01.dev.com version = -absent devtools01-dev.uat.com version = jdk-1.6.0_23-fcs devtools02.uat.com version = jdk-1.6.0_29-fcs drbdtest01.dev.google.com version = -absent

---- package agent summary ---- Nodes: 33/33 Versions: 1 * 1.5.0_17-fcs, 1 * 1.5.0_19-fcs, 1 * 1.6.0_13-fcs, 1 * 1.6.0_20-fcs, 1 * 1.6.0_23-fcs, 2 * 1.6.0_24-fcs, 2 * 1.6.0_29-fcs, 1 * 1.6.0_30-fcs, 1 * 1.6.0_31-fcs, 22 * absent Elapsed Time: 1.73 s

Page 22: Buytaert kris tools

fpmfpm● Yes the F stands for EffingYes the F stands for Effing

● #packagingsucks#packagingsucks

● Missing upstreamMissing upstream

● Ancient upstreamAncient upstream

● Unneeded dependenciesUnneeded dependencies

● Broken upstreamBroken upstream

● Distro PoliciesDistro Policies

● ““Maximum RPM” ?Maximum RPM” ?

● Packaging is needed Packaging is needed

● Dependencies, tooling, repositoriesDependencies, tooling, repositories

● Anger driven developmentAnger driven development

Page 23: Buytaert kris tools

fpmfpm

Page 24: Buytaert kris tools

fpmfpmfpm -t rpm -s dir -n hornetq -v 2.2.5 hornetq Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.nNkVwh+ umask 022+ cd /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD+ exit 0Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.yUd4MV+ umask 022+ cd /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD+ cd /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD+ tar -zxf /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/data.tar.gz+ exit 0Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.jkpqeA+ umask 022+ cd /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD+ /usr/lib/rpm/brp-compress+ /usr/lib/rpm/brp-strip+ /usr/lib/rpm/brp-strip-static-archive+ /usr/lib/rpm/brp-strip-comment-noteProcessing files: hornetq-2.2.5-1.x86_64Checking for unpackaged file(s): /usr/lib/rpm/check-files /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILDWrote: /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/SRPMS/hornetq-2.2.5-1.src.rpmWrote: /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/RPMS/x86_64/hornetq-2.2.5-1.x86_64.rpmExecuting(%clean): /bin/sh -e /var/tmp/rpm-tmp.z2UL3B+ umask 022+ cd /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD+ rm -rf /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD+ exit 0Created /usr/local/hornetq-2.2.5.x86_64.rpm

Page 25: Buytaert kris tools

fpm in actionfpm in action● https://github.com/KrisBuytaert/build-gemshttps://github.com/KrisBuytaert/build-gems● Fork, pull Fork, pull ● Jenkins pulls , builds , pushes to repoJenkins pulls , builds , pushes to repo

Page 26: Buytaert kris tools

Measurement:Measurement:

Page 27: Buytaert kris tools

But Monitoring Sucks !But Monitoring Sucks !● #monitoringsucks trending#monitoringsucks trending● https://github.com/monitoringsucks/https://github.com/monitoringsucks/● 2008 Study :Nagios + Friends2008 Study :Nagios + Friends● 2011 Conclusion : Nagios/Icinga are the only 2011 Conclusion : Nagios/Icinga are the only

automatable alternatives automatable alternatives ● Monitoring and trending at scale , new kids Monitoring and trending at scale , new kids

Graphite, Icinga, flapjack, etc Graphite, Icinga, flapjack, etc ● Old Cool Kids, Ganglia Old Cool Kids, Ganglia

Page 28: Buytaert kris tools

Why #monitoringsucksWhy #monitoringsucksMonitoring is AWESOME. Metrics are AWESOME. I love it. Here's what I don't love: Monitoring is AWESOME. Metrics are AWESOME. I love it. Here's what I don't love:

● Having my hands tied with the model of host and service bindings. Having my hands tied with the model of host and service bindings.

● Having to set up "fake" hosts just to group arbitrary metrics together Having to set up "fake" hosts just to group arbitrary metrics together

● Having to either collect metrics twice - once for alerting and another for trending Having to either collect metrics twice - once for alerting and another for trending

● Only being able to see my metrics in 5 minute intervals Only being able to see my metrics in 5 minute intervals

● Having to chose between shitty interface but great monitoring or shitty monitoring Having to chose between shitty interface but great monitoring or shitty monitoring but great interface but great interface

● Dealing with a monitoring system that thinks IT is the system of truth for my Dealing with a monitoring system that thinks IT is the system of truth for my environment environment

● Not actually having any real choicesNot actually having any real choices

John Vincent (@lusis) on his blog http://lusislog.blogspot.com/2011/06/why-John Vincent (@lusis) on his blog http://lusislog.blogspot.com/2011/06/why-monitoring-sucks.htmlmonitoring-sucks.html

Page 29: Buytaert kris tools

LogstashLogstash● Not your average centralized logging toolNot your average centralized logging tool● Elasticsearch backedElasticsearch backed

● ShipperShipper● IndexerIndexer● WebWeb

Page 30: Buytaert kris tools

LogstashLogstash

● Collect from anywhereCollect from anywhere● FilterFilter● Send anywhereSend anywhere

● Queuing supportQueuing support

Page 31: Buytaert kris tools

Logstash in ActionLogstash in Action

Page 32: Buytaert kris tools

Kibana in ActionKibana in Action

Page 33: Buytaert kris tools

Graphite Graphite ● Graphing at ScaleGraphing at Scale● Graphing at EaseGraphing at Ease● Any metric is a graphAny metric is a graph

● echo "somestring $somevalue $timestamp" | echo "somestring $somevalue $timestamp" | nc <%= graphitehost %> 2003nc <%= graphitehost %> 2003

Page 34: Buytaert kris tools

Graphite ComposerGraphite Composer

x

Page 35: Buytaert kris tools

Graphite APIGraphite API

Page 36: Buytaert kris tools

Friends of Graphite Friends of Graphite ● Collection : Collection :

● Statsd, Statsd, ● Collectd,Collectd,● JmxtransJmxtrans● LogsterLogster

● Dashboards Dashboards ● TattleTattle● GdashGdash● ......

Page 37: Buytaert kris tools

Sharing:Sharing:

Page 38: Buytaert kris tools

● Open SourceOpen Source● GithubGithub● Talk about ExperiencesTalk about Experiences● Open SpacesOpen Spaces

Page 39: Buytaert kris tools

SushiSushi

Page 40: Buytaert kris tools

VagrantVagrant● Abstraction layer for VirtualBoxAbstraction layer for VirtualBox● Integrates well with Puppet/ChefIntegrates well with Puppet/Chef● Project = Project =

● VagrantfileVagrantfile● Manifests / CookbooksManifests / Cookbooks

● Portable, Small , VersionablePortable, Small , Versionable● Use veewee to build your boxenUse veewee to build your boxen

Page 41: Buytaert kris tools

VagrantfileVagrantfileVagrant::Config.run do |config| # All Vagrant configuration is done here. The most common configuration # options are documented and commented below. For a complete reference, # please see the online documentation at vagrantup.com.

config.vm.define :mongo1 do |mongo1_config| mongo1_config.ssh.max_tries = 100 mongo1_config.vm.box = "MyCentOS2" mongo1_config.vm.network("192.168.99.101") mongo1_config.vm.host_name = "mongo1" mongo1_config.vm.provision :puppet do |mongo1_puppet| mongo1_puppet.pp_path = "/tmp/vagrant-puppet" mongo1_puppet.manifests_path = "manifests" mongo1_puppet.module_path = "modules" mongo1_puppet.manifest_file = "site.pp" end end config.vm.define :mongo2 do |mongo2_config| mongo2_config.ssh.max_tries = 100 mongo2_config.vm.box = "MyCentOS2" mongo2_config.vm.network("192.168.99.102") mongo2_config.vm.host_name = "mongo2" mongo2_config.vm.provision :puppet do |mongo2_puppet| mongo2_puppet.pp_path = "/tmp/vagrant-puppet" mongo2_puppet.manifests_path = "manifests" mongo2_puppet.module_path = "modules" mongo2_puppet.manifest_file = "site.pp" end end

Page 42: Buytaert kris tools

Vagrant BlahVagrant Blah● Vagrant init Vagrant init ● Vagrant up Vagrant up ● Vagrant provision Vagrant provision ● Vagrant down Vagrant down ● Vagrant destroyVagrant destroy

Page 43: Buytaert kris tools

Quiz Time : Quiz Time : Which tool did I forget ?Which tool did I forget ?

Page 44: Buytaert kris tools

YouYou

Page 45: Buytaert kris tools

LinksLinkshttp://puppetlabs.com/mcollective/introduction/http://puppetlabs.com/mcollective/introduction/

https://github.com/jordansissel/fpmhttps://github.com/jordansissel/fpm

http://logstash.net/http://logstash.net/

https://github.com/rashidkpc/Kibanahttps://github.com/rashidkpc/Kibana

http://graphite.wikidot.com/http://graphite.wikidot.com/

https://github.com/wayfair/Graphite-Tattlehttps://github.com/wayfair/Graphite-Tattle

http://vagrantup.com/http://vagrantup.com/

https://github.com/KrisBuytaerthttps://github.com/KrisBuytaert

Page 46: Buytaert kris tools

ContactContactKris Buytaert Kris Buytaert [email protected]@inuits.be

Further ReadingFurther Reading@krisbuytaert @krisbuytaert http://www.krisbuytaert.be/blog/http://www.krisbuytaert.be/blog/http://www.inuits.be/http://www.inuits.be/

InuitsInuits

Duboistraat 50Duboistraat 502060 Antwerpen2060 AntwerpenBelgiumBelgium891.514.231891.514.231

+32 475 961221+32 475 961221

•Or the upcoming slidesOr the upcoming slides