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

Chef: Why you should automate your web infrastructure by Kate Heddleston

PyCon 2013
March 17, 2013

Chef: Why you should automate your web infrastructure by Kate Heddleston

PyCon 2013

March 17, 2013
Tweet

More Decks by PyCon 2013

Other Decks in Technology

Transcript

  1. Here's what I'm going to talk to you about. •

    Why you should automate your web infrastructure. • What is Chef? • How to use Chef to set-up a python/Django project.
  2. Why you should automate your web infrastructure. • All of

    your configuration information is in one place (and that place isn't someone's head) • You can spin up perfectly configured servers instantly! • You can change things in one place and have them propagate through your entire system • You can create dev and test environments that are exact replicas of production.
  3. What is Chef? "Reality-based automation for the cloud." "Infrastructure as

    code." "A global view of your system as opposed to a local one."
  4. Chef Server • central storage for all your chef configuraions

    • stores all your git repo stuff as structured data in json • uses couchDB for storage and querying • Hosted Chef free for up to 5 nodes - then you should host it yourself Chef Server
  5. Roles • A nice way of abstracting what a node

    does and what should be installed on it. I.e. a webserver role vs. a database role • run_list of installations • Can talk about other machines in your infrastructure by their role; open up firewalls to front-end servers • You can query roles
  6. Cookbooks • The base unit of configuration, so you would

    have a cookbook for nginx, postgres, gunicorn, etc.
  7. What exactly happens when I run this command? knife rackspace

    server create -r 'role[webserver]' -N chef.myserver.org -S chef.myserver.org -f 3 -I 125
  8. • You really, really, really, really should use something for

    server configuration • Getting started with your Django server ◦ https://github.com/heddle317/django-chef-application To sum it all up...
  9. Other tools like Chef • Heroku ◦ "Like having two

    full-time dev ops people on your team." • Puppet ◦ http://bitfieldconsulting.com/puppet-vs-chef • Salt ◦ this one is in python, but it's new
  10. No developers were harmed in the making of this presentation...

    John Lynn Robert MacCloy Adam DePue Hearsay Social
  11. Links to particularly interesting articles I found while making this

    presentation • http://version2beta.com/articles/dev- environments-with-vagrant-chef-and-git/ • http://devopsanywhere.blogspot. com/2011/10/puppet-vs-chef-fight.html • http://en.wikipedia. org/wiki/Comparison_of_open_source_confi guration_management_software
  12. Questions? You can also find me in the hallways OR

    At the Hearsay Social beer bash: 6-8pm at David's 5151 Stars and Stripes Dr.