How to be a Chef (Developer Edition)
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

How to be a Chef (Developer Edition)

  • 530 views
Uploaded on

Talk about Opscode Chef, a tool that helps to configurate services for servers.

Talk about Opscode Chef, a tool that helps to configurate services for servers.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
530
On Slideshare
530
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
2
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. How to be a Chef(Developer Edition)Rodrigo AyalaDevelopersábado, 1 de junio de 13
  • 2. @RodrigoAyalasábado, 1 de junio de 13
  • 3. (Web) Apps are a bunch of softwareinterconnected in a nice waysábado, 1 de junio de 13
  • 4. But software liveson serverssábado, 1 de junio de 13
  • 5. And we can’t to playdumb with thatsábado, 1 de junio de 13
  • 6. tions?sábado, 1 de junio de 13
  • 7. Cloud, or local serversábado, 1 de junio de 13
  • 8. Local serversábado, 1 de junio de 13
  • 9. Local serverPros:sábado, 1 de junio de 13
  • 10. Local serverPros:✓You know where your data livessábado, 1 de junio de 13
  • 11. Local serverPros:✓You know where your data lives✓ The equipment is yours and you canpersonalize as you wantsábado, 1 de junio de 13
  • 12. Local serverPros:✓You know where your data lives✓ The equipment is yours and you canpersonalize as you wantCons:sábado, 1 de junio de 13
  • 13. Local serverPros:✓You know where your data lives✓ The equipment is yours and you canpersonalize as you wantCons:✓You are responsible to give power and agood Tº to the serversábado, 1 de junio de 13
  • 14. Local serverPros:✓You know where your data lives✓ The equipment is yours and you canpersonalize as you wantCons:✓You are responsible to give power and agood Tº to the server✓ The environment should be able to supportcatastrophes. (TIER)sábado, 1 de junio de 13
  • 15. Local serverPros:✓You know where your data lives✓ The equipment is yours and you canpersonalize as you wantCons:✓You are responsible to give power and agood Tº to the server✓ The environment should be able to supportcatastrophes. (TIER)✓It needs a lot of configuration (and thatneeds a lot of time)sábado, 1 de junio de 13
  • 16. Cloudsábado, 1 de junio de 13
  • 17. CloudPros:sábado, 1 de junio de 13
  • 18. CloudPros:✓You don’t need an huge initial investment tobuy (expensive) serverssábado, 1 de junio de 13
  • 19. CloudPros:✓You don’t need an huge initial investment tobuy (expensive) servers✓You can dynamically create an ITarchitecturesábado, 1 de junio de 13
  • 20. CloudPros:✓You don’t need an huge initial investment tobuy (expensive) servers✓You can dynamically create an ITarchitectureCons:sábado, 1 de junio de 13
  • 21. CloudPros:✓You don’t need an huge initial investment tobuy (expensive) servers✓You can dynamically create an ITarchitectureCons:✓ If for any reason the cloud service is down,you can’t do anything but waitsábado, 1 de junio de 13
  • 22. CloudPros:✓You don’t need an huge initial investment tobuy (expensive) servers✓You can dynamically create an ITarchitectureCons:✓ If for any reason the cloud service is down,you can’t do anything but wait✓It needs a lot of configuration (and thatneeds a lot of time)sábado, 1 de junio de 13
  • 23. CloudIaaS PaaSsábado, 1 de junio de 13
  • 24. CloudIaaS PaaSInfrastructure as a Service✓Flexible✓Cheapsábado, 1 de junio de 13
  • 25. CloudIaaS PaaSPlatform as a Service✓First deploy in just minutes✓You don’t have to worry aboutsoftware updatessábado, 1 de junio de 13
  • 26. CloudIaaS PaaS¿ ?sábado, 1 de junio de 13
  • 27. sábado, 1 de junio de 13
  • 28. Configuration Management toolWritten in RubyOpen Sourcesábado, 1 de junio de 13
  • 29. 88.3K lines of code7.497 commitsSince March 2008https://github.com/opscode/chef* Metrics by http://www.ohloh.net/p/opscode-chefsábado, 1 de junio de 13
  • 30. Let’s see how it workssábado, 1 de junio de 13
  • 31. Chefsábado, 1 de junio de 13
  • 32. ChefChef ServerChef Solosábado, 1 de junio de 13
  • 33. Chef ServerChef ClientChef ClientChef ClientChef Server(Repository)sábado, 1 de junio de 13
  • 34. Chef SoloForever Alone versionsábado, 1 de junio de 13
  • 35. Chef SoloChef Solo Chef Solo Bootstrapedsábado, 1 de junio de 13
  • 36. Let’s see how it workssábado, 1 de junio de 13
  • 37. Cookbookhttp://community.opscode.com/cookbookshttps://github.com/opscode-cookbookssábado, 1 de junio de 13
  • 38. ★ Java★ postgreSQL★ MySQL★ SELinux★ RVM★ etcCookbooksábado, 1 de junio de 13
  • 39. Recipessábado, 1 de junio de 13
  • 40. RecipesAre included on cookbooksWritten in RubyThere are functions available as DSLYou can use ERB templates with Recipessábado, 1 de junio de 13
  • 41. ResourcesUsed on recipesDefine actions that can be takenThere are functions available as DSLService, yum_package, execute or directory area few examples of thishttp://docs.opscode.com/chef/resources.htmlsábado, 1 de junio de 13
  • 42. template /etc/sudoers dosource sudoers.erbmode 0440owner rootgroup platform?(freebsd) ? wheel : rootvariables(:sudoers_groups => node[authorization][sudo][groups],:sudoers_users => node[authorization][sudo][users],:passwordless => node[authorization][sudo][passwordless],:include_sudoers_d => node[authorization][sudo][include_sudoers_d],:agent_forwarding => node[authorization][sudo][agent_forwarding],:sudoers_defaults => node[authorization][sudo][sudoers_defaults])not_if { node[:some_value]}endRecipe examplesábado, 1 de junio de 13
  • 43. Run listsábado, 1 de junio de 13
  • 44. {"run_list":["recipe[user]","recipe[sudo]","recipe[main::user]","recipe[yum::epel]","recipe[nginx]","recipe[redis::server]","recipe[build-essential]","recipe[rvm::user]","recipe[main]","recipe[nginx_conf]","recipe[main::nginx]","recipe[main::dirs]"]],sábado, 1 de junio de 13
  • 45. Let’s cook!sábado, 1 de junio de 13
  • 46. How to start$ gem install knife-solo$ gem install chef-solo$ gem install chefsábado, 1 de junio de 13
  • 47. How to start$ knife solo bootstrap user@ipnumber nodes/ip.json -ipemfile.pemsábado, 1 de junio de 13
  • 48. https://github.com/opscode/chef-repoEmpty cookbooksábado, 1 de junio de 13
  • 49. “Bundler” for Chefhttps://github.com/applicationsonline/librarian-chefsábado, 1 de junio de 13
  • 50. Gracias!sábado, 1 de junio de 13