Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DevOps Introduction

DevOps Introduction

A glimpse into what is DevOps and the reasons for its existence

Yamil Urbina

March 23, 2018
Tweet

More Decks by Yamil Urbina

Other Decks in Education

Transcript

  1. Agile Software Development • Faster sprints • More iterations •

    More open to innovation • Constant improvements
  2. Development gang • Deliver code • Fix bugs • Solve

    complex problems • Some research and innovation on the mix
  3. Operations crew • Receive code from development • Learn how

    to install it on production • First line of support and troubleshooting • In charge of upgrading and maintaining software • In constant learning due to technological decisions and challenges made by dev
  4. QA team • In charge of ensuring software quality •

    Automated tests are run if the team is code-oriented • Very little or no server management knowledge • Depends on DEV for code; depends on OPS for infrastructure
  5. A typical Dev vs. Ops chat • 11:42pm - Dev:

    v1.17.2 is finally ready. Ops should deploy to production
  6. A typical Dev vs. Ops chat • 11:42pm - Dev:

    v1.17.2 is finally ready. Ops should deploy to production • 11:45pm - Ops: Ok cool. Do you have steps or documentation on what changes were made?
  7. A typical Dev vs. Ops chat • 11:42pm - Dev:

    v1.17.2 is finally ready. Ops should deploy to production • 11:45pm - Ops: Ok cool. Do you have steps or documentation on what changes were made? • 12:06am - Dev: Just look at the code, it's pretty explicit
  8. A typical Dev vs. Ops chat • 11:42pm - Dev:

    v1.17.2 is finally ready. Ops should deploy to production • 11:45pm - Ops: Ok cool. Do you have steps or documentation on what changes were made? • 12:06am - Dev: Just look at the code, it's pretty explicit • 12:08am: Dev has disconnected from the chat
  9. package extendedresourcetoleration import ( "fmt" "io" "mysql" "mysql-cool-library" ) const

    PluginName = "ExtendedResourceToleration" func Register(plugins *admission.Plugins) { plugins.Register(PluginName, func(config io.Reader) (admission.Interface, error) { return newExtendedResourceToleration(), nil }) }
  10. • 2:19am - Ops: v1.17.2 is crashing all the time.

    Logs don't say anything. We only updated the code in production :/
  11. • 2:19am - Ops: v1.17.2 is crashing all the time.

    Logs don't say anything. We only updated the code in production :/ • 2:41am: Dev is now online
  12. • 2:19am - Ops: v1.17.2 is crashing all the time.

    Logs don't say anything. We only updated the code in production :/ • 2:41am: Dev is now online • 2:57am - Dev: Did you see the mysql-cool-library we added on this version? It needs MySQL 8. Did you upgrade your database?
  13. • 2:19am - Ops: v1.17.2 is crashing all the time.

    Logs don't say anything. We only updated the code in production :/ • 2:41am: Dev is now online • 2:57am - Dev: Did you see the mysql-cool-library we added on this version? It needs MySQL 8. Did you upgrade your database? • 2:58am - Ops: No. How could we know a library required such a big change? Upgrading the DB is risky!
  14. • 2:19am - Ops: v1.17.2 is crashing all the time.

    Logs don't say anything. We only updated the code in production :/ • 2:41am: Dev is now online • 2:57am - Dev: Did you see the mysql-cool-library we added on this version? It needs MySQL 8. Did you upgrade your database? • 2:58am - Ops: No. How could we know a library required such a big change? Upgrading the DB is risky! • 3:02am: Dev has disconnected from the chat
  15. Software design is more than code • UI/UX • Security

    • Documentation • Testing/Quality Control • Building processes • ...and many more topics
  16. I made this: # app.rb require 'sinatra' set :session_name, settings.session_name

    get '/' do if session? redirect '/profile' else @page_title = "This is my app. It is a good app." haml :alternate end end
  17. My dependencies file # Gemfile source "https://rubygems.org" gem 'sinatra' gem

    'sinatra-contrib' gem 'sinatra-config-file' gem 'sinatra-redirect-with-flash' gem 'couchdb' gem 'haml' gem 'bcrypt'
  18. I kind (kind?) of install my app like this: $

    apt-get install ruby ruby-dev apache2 couchdb couchdb-contrib $ systemctl start couchdb $ cd /Code/app $ gem install bundler $ bundle install $ ruby app.rb & $ systemctl start apache2
  19. Some concerns • What version of Ruby? Apache? CouchDB? •

    How is Apache2 configured? • Are your dependencies versioned?
  20. My NEW dependencies file # Gemfile source "https://rubygems.org" gem 'sinatra',

    "2.0.1" gem 'sinatra-contrib', "2.0.1" gem 'sinatra-config-file', "1.0" gem 'sinatra-redirect-with-flash', "0.2.1" gem 'couchdb', "0.2.2" gem 'haml', "5.0.4" gem 'bcrypt', "3.1.11"
  21. A bash script #!/bin/bash set -e # Install packages apt-get

    update apt-get install ruby-2.5.0 ruby-2.5.0-dev apache2.4 couchdb-2.1 couchdb-2.1-contrib # Configure Apache2 echo "RewriteRule ^ index.php [L]" > /var/www/html/.htaccess # Run the app systemctl start apache2 ruby app.rb &
  22. The DevOps Contract • Let's commit the script to the

    repository • Edit and version the script everytime a big change is made • This cuts the middleman • It will work for everyone
  23. DevOps is cultural change • Silos or groups are a

    bad thing; DevOps strives to eliminate distinctions • A Developer can do Ops, an Ops person can do Dev • People need to think about the whole software design process • Every team member influences how products are finished • Shared responsibility is a must; one-sided decisions have a great effect on software design
  24. DevOps is people management • People don't do what they're

    told; they do what they believe is right. Learn to communicate your goals properly instead of imposing on them • Encourage trust between teams; don't try to find the culprit when issues arise, instead ask people to help you solve problems • Go to standup or status meetings to learn what decisions may affect a product on the long run
  25. DevOps is experimentation • Improving something needs experimentation, research and

    testing • New technologies promise to solve current problems; the only way to verify this claim is implementing them on real applications • This needs time apart from delivering value and maintaining products
  26. The type of IT work for Operations • Business projects:

    Projects that deliver value to the customer • Intertal Projects: Infrastructure and operations projects, internal improvements, CI, repositories, etc. • Changes: Fixing bugs, changing settings and general improvements generated by the previous points. • Unplanned Work: Incidents, fixing problems caused by the previous types of work.
  27. 1. Moving from left to right • Seek profound understanding

    of a system • Never passing defects to the end product Dev ------------> Ops
  28. 2. Moving from right to left • Respond to internal

    and external customers • Improve feedback loops • Where can we improve what we are doing? /-------------------\ Dev -------------- Ops
  29. 3. Embed Continuous Learning • Take risks, reward those who

    fail anyways • Allocate time to research and implement improvements • Teams get better if they make mistakes
  30. Some resources • The Phoenix Project - Gene Kim, Kevin

    Behr, George Spafford • The DevOps Handbook - Gene Kim, Jez Humble, Patrick Debois and John Willis • Puppet 2017 State of DevOps Report