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

Infrastructure As Code PGHTechFest 2014

Infrastructure As Code PGHTechFest 2014

André H

June 08, 2014
Tweet

More Decks by André H

Other Decks in Programming

Transcript

  1. •  What is DevOps •  Who is a DevOp? • 

    Benefits of DevOps •  What is Infrastructure as Code •  Benefits of Infrastructure as Code •  Tools
  2. “DevOps is a cultural and professional movement. Period. That’s it…

    There’s no technology, you can’t patent ‘devops’.” -- Adam Jacobs Velocity 2010
  3. COLLABORATION “Devops means giving a shit about your job enough

    to not pass the buck. Devops means giving a shit about your job enough to want to learn all the parts and not just your little world.” -- John Vincent
  4. BUT I HAVE DEVOPS IN MY TITLE •  Where are

    the Devs •  Where are the Ops •  Where is QA •  Do you collaborate ?
  5. “Ah, but “devops” does not mean the same PERSON has

    to do dev and ops, rather the barriers between dev and ops are eliminated” -- Cornelia Davis
  6. INFRASTRUCTURE CONFIGURATION 1.  Dev: I need a server with X,Y,andZ

    2.  Ops: Get server or VM a.  Log in b.  Install packages c.  GOTO b d.  Document ? Maybe 3.  Deploy 4.  Ooops we forgot the super duper package 5.  Back to 2a
  7. THE BLAME GAME •  No documentation •  Not repeatable • 

    What version of packages were installed •  What version of the config files were installed •  Does it match the current application ? •  Was it done right •  How portable is it ?
  8. “models your infrastructure in code, by breaking it down into

    components that interact with each other. In this context, Infrastructure isn’t anything physical, ...” --Jens Segers
  9. “I’m a system admin, I don’t write code” --Soon to

    be Unemployed SysAdmin Pete Cheslock DevOps Days Pittsburgh 2014
  10. •  Makes Ops a 1st class citizen •  Standard language

    for Devs, Ops and QA •  Versioning •  Repeatable •  Documented •  Testable by all
  11. I AM A HERETIC •  Tools don’t matter •  They

    all get the job done •  Pick one
  12. VS

  13. http://blog.sciencelogic.com/agent-vs-agentless-monitoring/10/2011 Ansible Chef Puppet Salt Agentless Agent Agent Agent Playbooks

    Cookbooks / Resipe Modules / Manifests Modules / States YAML DSL Ruby DSL Limited DSL YAML Python Ruby Ruby Python
  14. ANSIBLE --- - hosts: webservers vars: http_port: 80 max_clients: 200

    remote_user: root tasks: - name: ensure apache is at the latest version yum: pkg=httpd state=latest - name: write the apache config file template: src=/srv/httpd.j2 dest=/etc/httpd.conf notify: - restart apache - name: ensure apache is running service: name=httpd state=started handlers: - name: restart apache service: name=httpd state=restarted
  15. CHEF package 'nginx' do action :install end cookbook_file '/etc/nginx/nginx.conf' do

    source 'nginx.conf' mode '0644’ end service 'nginx' do action [:start, :enable] end
  16. REFERENCES •  http://getchef.com •  http://puppetlabs.com •  http://saltstack.com •  http://ansible.com • 

    http://atpras.blogspot.com/2014/02/ansible-hello- world.html •  http://sdarchitect.wordpress.com/2012/12/13/ infrastructure-as-code/ •  http://en.wikipedia.org/wiki/DevOps •  http://jenssegers.be/blog/44/infrastructure-as-code