Slide 1

Slide 1 text

devops wtf is devops

Slide 2

Slide 2 text

Infrastructure in the Cloud IaaS vs. PaaS Chef very short WTF is … Devops

Slide 3

Slide 3 text

Hi! I am Peter, a developer. ... devops heroes ... devops heroes

Slide 4

Slide 4 text

I like writing code design patterns the Integrated Development Environment aka. IDE I like less... reading manual pages troubleshooting servers configuration files lifting heavy things managing services and packages software deployments ... devops heroes

Slide 5

Slide 5 text

” “ things developers say ... I don't do system related tasks, especially not in production. - Developer can someone else do it this time please? pretty please?

Slide 6

Slide 6 text

” “ more things developers say ... - The same Developer Give me full control, or else when things go wrong, I am powerless to fix it. Just changed motorcycle wheels. I’ll jump anyway, it will be okay ...

Slide 7

Slide 7 text

Infrastructure flickr.com/photos/mrfrosted/278847814/

Slide 8

Slide 8 text

Infrastructure flickr.com/photos/mrfrosted/278847814/ server operating system database cache / shared memory network

Slide 9

Slide 9 text

I finished writing the code! Server room Servers Racks Labor Electricity & AC Configuration Deployment $150,000,000 + 16 months When can our customers start paying? Oh, we probably need a couple more things ... Oh, oh, and I almost forgot. Ahh, I'm also gonna need you to go ahead and come in on Sunday, too... ... devops heroes

Slide 10

Slide 10 text

Houston we have a problem. TPS report not found. ... devops heroes

Slide 11

Slide 11 text

use the Cloud the what? who are you? I'm Joana, ... the fairy godmother, ... ahh, never mind me. Just use the Cloud Luke, err.. Peter. ... devops heroes

Slide 12

Slide 12 text

The Cloud flickr.com/photos/21644167@N04/3897234326/

Slide 13

Slide 13 text

flickr.com/photos/21644167@N04/3897234326/ The Cloud rapid provision api pay per use self maintained resilient & distributed diverse

Slide 14

Slide 14 text

Web Application Architecture ... Cloud cloud ... the cloud

Slide 15

Slide 15 text

Cloud Jargon ... as a service IaaS Infrastructure PaaS Platform SaaS Software ... the cloud

Slide 16

Slide 16 text

IaaS vs. PaaS complex painful do it yourself total freedom total freedom cheaper better performance simple comfortable someone else "did it" constraints conventions expensive so-so performance ... the cloud

Slide 17

Slide 17 text

What would you choose? IaaS PaaS lets see examples ... ... the cloud

Slide 18

Slide 18 text

Microsoft IaaS vs. PaaS Microsoft Windows Azure "Virtual Machines" Microsoft Windows Azure "Web Sites" everything works git push to deploy infrastructure pain custom deploys has ActiveDirectory! windowsazure.com ... the cloud

Slide 19

Slide 19 text

Google IaaS vs. PaaS Google "Compute Engine" Google "App Engine" custom APIs lots of limitations lots of abilities includes: Java, Go, PHP, Python and much much more... no longer beta! Google I/O release per-minute billing cloud.google.com ... the cloud

Slide 20

Slide 20 text

less control more comfort Amazon AWS IaaS vs. PaaS AWS EC2 AWS BeanStalk almost full control no comfort aws.amazon.com AWS OpsWorks AWS CloudFormation ... the cloud

Slide 21

Slide 21 text

git push deploy lots of magic easy scalability many partners expensive poor performance IaaS vs. PaaS Salesforce Heroku heroku.com I dont like "magic", give me more control! You say its slow and expensive? ... no no, it will not do. ... the cloud

Slide 22

Slide 22 text

I can't deploy to a "platform" We will use servers in the Cloud! Just tell me when customers start paying! ... devops heroes

Slide 23

Slide 23 text

what someone has to actually do to use Servers in the (AWS) Cloud - For each world region - Define architecture (app+db+cache+stuff) - Select instance types and OS images (AMI) - Proper security groups (firewalls) - Generate SSH keys - Install packages - Configure services - Deploy application - Have a nervous breakdown - Repeat from start for each server - Profit!

Slide 24

Slide 24 text

awsofa.info

Slide 25

Slide 25 text

That is a lot of work. So many things can go wrong ... ... devops heroes

Slide 26

Slide 26 text

How do I do the same thing a hundred times without making mistakes? Chef, or Puppet, or CFEngine, or ... so many options. ... devops heroes

Slide 27

Slide 27 text

Automation infoq.com/presentations/Infrastructure-as-Code #!/bin/sh NODES="webserver database" for n in $NODES do ssh $n complex-script.sh done

Slide 28

Slide 28 text

zeroturnaround.com/labs/rebel-labs-release-it-ops-devops-productivity-report-2013

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

open source configures servers cookbooks & recipes ruby dsl ... chef

Slide 31

Slide 31 text

redis cookbook cookbooks/redis/recipes/default.rb package "redis-server" do action :upgrade end service "redis-server" do action :nothing supports status: true, restart: true end template "/etc/redis/redis.conf" do source "redis.conf.erb" owner "root" mode "0644" variables({ bind: node[:redis][:bind] }) notifies :restart, "service[redis-server]" end 1. cookbook/redis/attributes/default.rb 2. solo.json ... chef

Slide 32

Slide 32 text

cookbooks/redis/attributes/default.rb default[:redis][:bind] = "127.0.0.1" cookbooks/redis/templates/default/redis.conf.erb # If you want you can bind a single interface, if the bind option is not # specified all the interfaces will listen for incoming connections. bind <%= @bind %> ... template "/etc/redis/redis.conf" do ... variables({ bind: node[:redis][:bind] }) end redis cookbook ... chef

Slide 33

Slide 33 text

running chef-solo $ chef-solo -c solo.rb -j solo.json ... solo.rb cookbook_path "cookbooks" solo.json { "run_list": "recipe[redis]" } ... chef

Slide 34

Slide 34 text

$ sudo chef-solo -c solo.rb -j solo.json Starting Chef Client, version 11.4.0 Compiling Cookbooks... Converging 3 resources Recipe: redis::default * package[redis-server] action upgrade - upgrade package redis-server from uninstalled to 2:2.2.12-1build1 * service[redis-server] action nothing (up to date) * template[/etc/redis/redis.conf] action create (up to date) Chef Client finished, 1 resources updated First run installs redis, creates configuration file. ... chef

Slide 35

Slide 35 text

Second time, everything is already up to date. Idempotency! ƒ[ƒ(x)] ≡ ƒ(x) $ sudo chef-solo -c solo.rb -j solo.json Starting Chef Client, version 11.4.0 Compiling Cookbooks... Converging 3 resources Recipe: redis::default * package[redis-server] action upgrade (up to date) * service[redis-server] action nothing (up to date) * template[/etc/redis/redis.conf] action create (up to date) Chef Client finished, 0 resources updated ... chef

Slide 36

Slide 36 text

making a small change to JSON parameters passed to Chef run. running chef-solo solo.json { "redis": { "bind": "0.0.0.0" }, "run_list": "recipe[redis]" } ... chef

Slide 37

Slide 37 text

$ sudo chef-solo -c solo.rb -j solo.json Starting Chef Client, version 11.4.0 Compiling Cookbooks... Converging 3 resources Recipe: redis::default * package[redis-server] action upgrade (up to date) * service[redis-server] action nothing (up to date) * template[/etc/redis/redis.conf] action create - update template[/etc/redis/redis.conf] from 81b4f1 to 8a6cec --- /etc/redis/redis.conf 2011-07-27 17:26:50.000000000 +0000 +++ /tmp/chef-rendered-template20130406-2537-f8vlv6 2013-04-06 ... @@ -27,7 +27,7 @@ # If you want you can bind a single interface, if the bind option is not # specified all the interfaces will listen for incoming connections. # -bind 127.0.0.1 +bind 0.0.0.0 # Specify the path for the unix socket that will be used to listen for # incoming connections. There is no default, so Redis will not listen * service[redis-server] action restart - restart service service[redis-server] Chef Client finished, 2 resources updated ... chef

Slide 38

Slide 38 text

A single server is just not enough … how do I scale? I have some pretty graphs for you ... ... devops heroes

Slide 39

Slide 39 text

requests # of servers CPU aggregate techblog.netflix.com/2012/01/auto-scaling-in-amazon-cloud.html

Slide 40

Slide 40 text

WTF is ... Devops?

Slide 41

Slide 41 text

CAMS Culture Automation Measurement Sharing wtf is ... devops opscode.com/blog/2010/07/16/what-devops-means-to-me/ by John Willis @botchagalupe

Slide 42

Slide 42 text

○ Interactions over processes and tools. ○ Continuous delivery of value. ○ Welcome changing requirements. ○ Provide an environment for motivated individuals to succeed. Culture wtf is ... devops parts from agilemanifesto.org

Slide 43

Slide 43 text

“Between 12:00 AM and 11:59 PM on April 25, 2013, Quora released new versions of the site 46 times. This was a normal day for us.” - Quora engineering.quora.com/Continuous-Deployment-at-Quora “Deployment every 11.6s, 1,079 max in one hour. 10,000 mean number of hosts per deployment, with 30,000 maximum” - Amazon. com youtube.com/watch?v=PW1lhU8n5So “On the Google Consumer Surveys team, 8 minutes after you commit code it's live in production.” - Google developers.google.com/live/shows/772717729 “10+ deploys per day.” - John Allspaw, 2009 youtube.com/watch?v=LdOe18KhtT4 wtf is ... devops

Slide 44

Slide 44 text

● Minimize required manual work. ● Simplicity is essential. ● Working software over comprehensive documentation. ● Easiest thing to solve, often neglected. Automation wtf is ... devops

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

○ Measure everything as often as possible. ○ Metrics of performance, process and people. ○ Unprecedented real-time visibility. ○ Enable continuous improvement. (Kaizen) Measurement wtf is ... devops

Slide 47

Slide 47 text

“... we also track really important stuff, like how much coffee is left in the kitchen” - Etsy codeascraft.com/2011/02/15/measure-anything-measure-everything end of 2009 end of 2012 Etsy.com : Deploys per day Measure Everything wtf is ... devops

Slide 48

Slide 48 text

Why do it? fast iterations ⇒ fast feedback loops Customer Business Release Feedback wtf is ... devops

Slide 49

Slide 49 text

○ Expand creativity and knowledge. ○ Feedback and learning for everyone. ○ Collaboration of diverse people on shared ideas. ○ Empowerment of teams and individuals. Sharing wtf is ... devops

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

Deploy better systems at less cost in less time at lower risk. wtf is ... devops

Slide 52

Slide 52 text

enable the business wtf is ... devops

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

take these slides offline bit.ly/hackademy-devops minifigures.lego.com Cheerleaders are spastic! They stretch like elastic!