Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Infrastructure Automation with Chef & Ansible

2,261 views

Published on

What is Infrastructure and why you should automate it?
Typical Infrastructure
Benefits
CMS/ Automation
Chef / Terminologies / Disadvantages
Ansible / Disadvantages
Demo
Summary

Author: Waqar Alamgir; Twitter @wajrcs

Published in: Software
  • Be the first to comment

Infrastructure Automation with Chef & Ansible

  1. 1. INFRASTRUCTURE AUTOMATION WITH CHEF & ANSIBLE Tips & tools for automating your web infrastructure. Waqar Alamgir @wajrcs https://github.com/waqar-alamgir/tutorials/tree/master/vagrant-lamp-ansible
  2. 2. Here’s What I’m Going To Talk To You About!  What is Infrastructure and why you should automate it?  Typical Infrastructure  Benefits  CMS/ Automation  Chef / Terminologies / Disadvantages  Ansible / Disadvantages  Demo  Summary  Questions
  3. 3. Meet this IT GUY & Service Provider
  4. 4. Why you should automate your web infrastructure  All of your configuration information is in one place.  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 your production.
  5. 5. Infrastructure  A high performance, reliable, and secure integrated technology infrastructure for managing multiple hosted applications by Application Service Providers.  Application infrastructure, comprised of application servers, web servers, and often database servers, is a core component in most network architectures.
  6. 6. Typical Infrastructure
  7. 7. Benefits  Technical benefits:  Continuous software delivery  Less complex problems to fix  Faster resolution of problems  Business benefits:  Faster delivery of features  More stable operating environments  More time available to add value (rather than fix/maintain)
  8. 8.  PHP  Nginx  Redis  PostgreSQL  Gearman My Typical Project
  9. 9. Configuration Management Software  Ansible  Chef  Puppet  SaltStack  CFEngine  Juju  many others
  10. 10. What is Chef? “Reality-based automation for the cloud.” “Infrastructure as Code.” “A global view of your system as opposed to local one”
  11. 11. Terminologies Chef Server?  Central storage for all your chef config.  Stores all your git repo stuff as structured data in json.  Uses CouchDB for storage and quering  Hosted Chef free for up to 5 nodes – then you should host it yourself.
  12. 12. Terminologies Knife? Command line tool to interface between your local code repo and your chef server.
  13. 13. Terminologies Nodes? Servers in your system.
  14. 14. Terminologies Roles? A nice way of abstracting what a node does and what should be installed on it. i.e.  A webserver role  A database role Open up firewall for front-end severs.
  15. 15. Terminologies Cookbooks? The base unit of configuration, so you would have a cookbook for nginx, postgres, gunicorn, etc.
  16. 16. Terminologies Recipes? A computer program that runs cookbooks Mostly written in Ruby or Python
  17. 17. Chef Infrastructure
  18. 18. Chef Infrastructure
  19. 19. Chef disadvantages  You need to know Ruby (infrastructure as code)  Need to install Chef Client on nodes  Chef Client can be broken (example, Rubygems Sandbox in 11/12 versions)  Different teams with different approaches  Documentation is not perfect  Too many tools and options
  20. 20. Who is Using Chef  Facebook, with over 20K instances  Yahoo!  IGN  Nordstrom  Dream Host  Target  Bloomberg
  21. 21. Ansible  Runs locally (push model, like Chef Solo)  Client-less (need only Python)  YAML configs, "command to infrastructure"  Huge community  Ansible Tower for more automation
  22. 22. Ansible Infrastructure
  23. 23. Ansible disadvantages  Bad team workflow  Small flexibility in coding  Poor development testing  Limited support for Windows (from 1.7 can use winrm, but still not perfect and small amount of modules)
  24. 24. Who is Using Ansible  Twitter  Apple  NASA  CISCO  Juniper  HootSuit
  25. 25. Demo Application - LAMP Stack Provision Theme  Common system level tools  MySQL, Memcached, Beanstalk  Web tools as Apache, PHP
  26. 26. Demo Application - LAMP Stack
  27. 27. Demo Application - LAMP Stack
  28. 28. Demo Application - LAMP Stack
  29. 29. To Sum it all up….  You should really, really, really use something for server configuration.  Chef: Ruby code to infrastructure.  Ansible: YAML commands to infrastructure, with no clients.
  30. 30. <Thank You!> Questions? Contact Information twitter: @wajrcs github: https://github.com/waqar- alamgir/tutorials/tree/master/vagrant- lamp-ansible

×