Successfully reported this slideshow.

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

Related Audiobooks

Free with a 14 day trial from Scribd

See all

Sysops cu Chef

  1. 1. Sysops cu Chef infrastructură sub formă de cod Istvan Hoka Cluj.rb - clujrb.org www.zencash.com
  2. 2. Intro 1. Chef: ce problema rezolva si cum o rezolva 2. Un mod usor de a incerca Chef 3. Folosire Chef la infrastructura pentru inceput
  3. 3. Chef http://www.opscode.com/chef/
  4. 4. "An open-source systems integration framework built specifically for automating the cloud."
  5. 5. automating the cloud
  6. 6. automating the cloud ?
  7. 7. Rails app • Nginx • Solr • Unicorn • Monit • Rails • Cron • MySQL • Amazon EC2 • Redis • Ubuntu • Memcache • Sysadmin: Gigel
  8. 8. The Server
  9. 9. Jackpot!
  10. 10. Mission accomplished The Server
  11. 11. Scaling
  12. 12. Take #2 App DB
  13. 13. Scaling!
  14. 14. Take #3 Load balancer App 1 App 2 App 3 App 4 Cache 1 Cache 2 Index 1 DB Master Redis Master Cache 3 Slave 1 Slave 2 Slave
  15. 15. Cum rezolvă Chef problema?
  16. 16. Chef server Node. Role: LB Node. Role: App Node. Role: App Node. Role: App Node. Role: App Cache 1 Cache 2 Index 1 DB Master Redis Master Cache 3 Slave 1 Slave 2 Slave
  17. 17. Cookbooks Chef Server Roles Data Bags Cookbooks Nodes Nodes Data Bags Roles Node (chef-client) Commands Node Node knife (chef-client) (chef-client) (chef-client)
  18. 18. Chef Server • HTTP API ‣ knife ‣ chef-solo • CouchDB ‣ cookbooks: libraries, attributes, definitions, recipes ‣ nodes ‣ roles ‣ data bags • RabbitMQ • Solr • Web UI
  19. 19. chef-client run • Convergence ‣ Build, Register, and Authenticate the Node ‣ Synchronize Cookbooks • Compile ‣ Assemble Libraries, Attributes, Definitions, Recipes • Execute ‣ Converge ‣ Save node ‣ Run notifications
  20. 20. Cookbooks • Attributes • Definitions • Libraries • Templates • Metadata • Recipes • Ruby, JSON, ERB
  21. 21. Chef “Hello World”? • Chef Server • Chef client • Chef workstation
  22. 22. Chef Hello World 1. Hosted Chef + AWS EC2 2. Virtualization
  23. 23. Vagrant http://vagrantup.com/
  24. 24. Vagrant • Oracle VirtualBox - virtualbox.org • Chef Solo
  25. 25. Vagrant setup 1. Install VirtualBox 2. Install Vagrant 3. Setup
  26. 26. Vagrantfile
  27. 27. Vagrant Apache MySQL Memcache Redis `pwd` /vagrant Guest OS (VirtualBox): Linux Host OS: Windows, OSX, Linux
  28. 28. Cookbooks • https://github.com/opscode- cookbooks • https://github.com/37signals/ 37s_cookbooks • https://github.com/engineyard/ey- cloud-recipes • https://github.com/cookbooks
  29. 29. Vagrant • Web dev pe Linux de pe Windows, OSX • Izolare • Configuratie repetabila
  30. 30. Chef Solo + Capistrano
  31. 31. Chef • Infrastructura ca si cod • Configuratie repetabila • Scalabil

Editor's Notes

  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • ×