Infrastructure Automation with Chef & Ansible

May. 13, 2016

More Related Content


Infrastructure Automation with Chef & Ansible

  1. INFRASTRUCTURE AUTOMATION WITH CHEF & ANSIBLE Tips & tools for automating your web infrastructure. Waqar Alamgir @wajrcs
  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. Meet this IT GUY & Service Provider
  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. 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. Typical Infrastructure
  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.  PHP  Nginx  Redis  PostgreSQL  Gearman My Typical Project
  9. Configuration Management Software  Ansible  Chef  Puppet  SaltStack  CFEngine  Juju  many others
  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. 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. Terminologies Knife? Command line tool to interface between your local code repo and your chef server.
  13. Terminologies Nodes? Servers in your system.
  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. Terminologies Cookbooks? The base unit of configuration, so you would have a cookbook for nginx, postgres, gunicorn, etc.
  16. Terminologies Recipes? A computer program that runs cookbooks Mostly written in Ruby or Python
  17. Chef Infrastructure
  18. Chef Infrastructure
  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. Who is Using Chef  Facebook, with over 20K instances  Yahoo!  IGN  Nordstrom  Dream Host  Target  Bloomberg
  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. Ansible Infrastructure
  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. Who is Using Ansible  Twitter  Apple  NASA  CISCO  Juniper  HootSuit
  25. Demo Application - LAMP Stack Provision Theme  Common system level tools  MySQL, Memcached, Beanstalk  Web tools as Apache, PHP
  26. Demo Application - LAMP Stack
  27. Demo Application - LAMP Stack
  28. Demo Application - LAMP Stack
  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. <Thank You!> Questions? Contact Information twitter: @wajrcs github: alamgir/tutorials/tree/master/vagrant- lamp-ansible