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.
Sysops cu Chefinfrastructură sub formă de cod             Istvan Hoka          Cluj.rb - clujrb.org          www.zencash.com
Intro1. Chef: ce problema rezolva si cum o   rezolva2. Un mod usor de a incerca Chef3. Folosire Chef la infrastructura   p...
Chefhttp://www.opscode.com/chef/
"An open-source systems integration framework builtspecifically for automating the            cloud."
automating the    cloud
automating the    cloud      ?
Rails app• Nginx      • Solr• Unicorn    • Monit• Rails      • Cron• MySQL      • Amazon EC2• Redis      • Ubuntu• Memcach...
The Server
Jackpot!
Missionaccomplished    The Server
Scaling
Take #2App             DB
Scaling!
Take #3                            Load balancer App 1              App 2                   App 3             App 4       ...
Cum rezolvă Chef   problema?
Chef server                                   Node. Role:                                      LBNode. Role: App      Node...
Cookbooks                            Chef Server                                               Roles                      ...
Chef Server•   HTTP API    ‣   knife    ‣   chef-solo•   CouchDB    ‣   cookbooks: libraries, attributes, definitions, reci...
chef-client run•   Convergence    ‣   Build, Register, and Authenticate the Node    ‣   Synchronize Cookbooks•   Compile  ...
Cookbooks• Attributes• Definitions• Libraries• Templates• Metadata• Recipes• Ruby, JSON, ERB
Chef “Hello World”?• Chef Server• Chef client• Chef workstation
Chef Hello World1. Hosted Chef + AWS EC22. Virtualization
Vagranthttp://vagrantup.com/
Vagrant• Oracle VirtualBox - virtualbox.org• Chef Solo
Vagrant setup1. Install VirtualBox2. Install Vagrant3. Setup
Vagrantfile
Vagrant                        Apache                        MySQL                       Memcache                         ...
Cookbooks• https://github.com/opscode-  cookbooks• https://github.com/37signals/  37s_cookbooks• https://github.com/engine...
Vagrant• Web dev pe Linux de pe Windows,  OSX• Izolare• Configuratie repetabila
Chef Solo +Capistrano
Chef• Infrastructura ca si cod• Configuratie repetabila• Scalabil
Sysops cu Chef
Sysops cu Chef
Sysops cu Chef
Upcoming SlideShare
Loading in …5
×

Sysops cu Chef

1,098 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Sysops cu Chef

  1. 1. Sysops cu Chefinfrastructură sub formă de cod Istvan Hoka Cluj.rb - clujrb.org www.zencash.com
  2. 2. Intro1. Chef: ce problema rezolva si cum o rezolva2. Un mod usor de a incerca Chef3. Folosire Chef la infrastructura pentru inceput
  3. 3. Chefhttp://www.opscode.com/chef/
  4. 4. "An open-source systems integration framework builtspecifically 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. Missionaccomplished The Server
  11. 11. Scaling
  12. 12. Take #2App DB
  13. 13. Scaling!
  14. 14. Take #3 Load balancer App 1 App 2 App 3 App 4 Cache 1 Cache 2Index 1 DB Master Redis Master Cache 3 Slave 1 Slave 2 Slave
  15. 15. Cum rezolvă Chef problema?
  16. 16. Chef server Node. Role: LBNode. 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 World1. Hosted Chef + AWS EC22. Virtualization
  23. 23. Vagranthttp://vagrantup.com/
  24. 24. Vagrant• Oracle VirtualBox - virtualbox.org• Chef Solo
  25. 25. Vagrant setup1. Install VirtualBox2. Install Vagrant3. 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

×