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

Sysops cu Chef by Istvan Hoka

GeekMeetRo
September 29, 2012

Sysops cu Chef by Istvan Hoka

GeekMeetRo

September 29, 2012
Tweet

More Decks by GeekMeetRo

Other Decks in Programming

Transcript

  1. Sysops  cu  Chef infrastructură  sub  formă  de  cod Istvan Hoka

    Cluj.rb - clujrb.org www.zencash.com Saturday, September 29, 12
  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 Saturday, September 29, 12
  3. Rails  app •Nginx •Unicorn •Rails •MySQL •Redis •Memcache •Solr •Monit

    •Cron •Amazon  EC2 •Ubuntu •Sysadmin:  Gigel Saturday, September 29, 12
  4. App 1 DB Master Index 1 Slave 1 Slave 2

    Redis Master Slave Cache 1 Cache 3 Cache 2 Load balancer App 2 App 3 App 4 Take  #3 Saturday, September 29, 12
  5. DB Master Index 1 Slave 1 Slave 2 Redis Master

    Slave Cache 1 Cache 3 Cache 2 Node. Role: LB Chef server Node. Role: App Node. Role: App Node. Role: App Node. Role: App Saturday, September 29, 12
  6. Chef Server knife (chef-client) Node (chef-client) Node (chef-client) Node (chef-client)

    Cookbooks Roles Data Bags Nodes Cookbooks Nodes Data Bags Roles Commands Saturday, September 29, 12
  7. Chef  Server • HTTP  API ‣ knife ‣ chef-­‐solo •

    CouchDB ‣ cookbooks:  libraries,  a7ributes,  defini@ons,  recipes ‣ nodes ‣ roles ‣ data  bags • RabbitMQ • Solr • Web  UI Saturday, September 29, 12
  8. chef-­‐client  run • Convergence ‣ Build,  Register,  and  Authen@cate  the

     Node ‣ Synchronize  Cookbooks • Compile ‣ Assemble  Libraries,  A7ributes,  Defini@ons,    Recipes • Execute ‣ Converge ‣ Save  node ‣ Run  no@fica@ons Saturday, September 29, 12
  9. Cookbooks • A7ributes • Defini@ons • Libraries • Templates •

    Metadata • Recipes • Ruby,  JSON,  ERB Saturday, September 29, 12
  10. Chef  Hello  World 1. Hosted  Chef  +  AWS  EC2 2.

    VirtualizaLon Saturday, September 29, 12
  11. Vagrant Host OS: Windows, OSX, Linux Guest OS (VirtualBox): Linux

    /vagrant Apache MySQL Memcache Redis `pwd` Saturday, September 29, 12
  12. Vagrant •Web  dev  pe  Linux  de  pe  Windows,  OSX •Izolare

    •ConfiguraLe  repetabila Saturday, September 29, 12