/README.org

http://github.com/dysinger/chef-box · Org · 100 lines · 73 code · 27 blank · 0 comment · 2 complexity · c6c8db38488e3fec82f0d3c33d077539 MD5 · raw file

  1. #+Title:Chef Box: Chef Vagrant Boxes & Playground
  2. #+AUTHOR:Tim Dysinger
  3. #+EMAIL:tim@dysinger.net
  4. #+DATE:2011-06-26
  5. This project enables you to automatically build a complete set of
  6. [[http://www.ubuntu.com/][Ubuntu]] boxes for use with [[http://vagrantup.com][Vagrant]]. The boxes are built with the
  7. [[http://wiki.opscode.com/display/chef/Package%2BInstallation%2Bon%2BDebian%2Band%2BUbuntu][Official OpsCode Chef 0.10.4 Ubuntu Packages]] baked in. This means you
  8. can start either a Chef Server or Client Node easily at boot time.
  9. Also included in this project is the Vagrant scaffolding to launch a
  10. Chef cluster on your Desktop. The default 'vagrant up' starts a Chef
  11. Server & 2 Chef Client Nodes. The nodes are setup to automatically
  12. join the Chef cluster. You can practice your cookbook, search, knife
  13. and shef skills really easily with 3 disposable nodes. See the
  14. examples below for more info.
  15. You can also merge the contents of this project into your existing
  16. [[https://github.com/opscode/chef-repo][Chef Repo]] and record, as an artifact in your git repository, how you
  17. built your Vagrant Box instead of it being mystery-meat from the
  18. interweb cache.
  19. * Requirements
  20. - [[http://www.virtualbox.org/wiki/Downloads][VirtualBox]] 4.1.2
  21. - [[http://rvm.beginrescueend.com/][RVM]] latest
  22. * Setup
  23. #+BEGIN_SRC: sh
  24. gem install bundler
  25. bundle install
  26. #+END_SRC
  27. * Build
  28. Build a Natty 64bit Box [ Warning: Building a Vagrant Box takes
  29. about 20 minutes on my i7 MacBook Pro. ]
  30. #+BEGIN_SRC: sh
  31. rake box:natty64
  32. #+END_SRC
  33. Build a LTS Lucid 32bit Box
  34. #+BEGIN_SRC: sh
  35. rake box:lucid32
  36. #+END_SRC
  37. Build All Boxes [ Warning: Takes several hours to build all 32 & 64
  38. bit boxes. Do this overnight. ]
  39. #+BEGIN_SRC: sh
  40. rake box:all
  41. #+END_SRC
  42. * Launch
  43. Launch a 3-Node Natty64 Cluster
  44. #+BEGIN_SRC: sh
  45. vagrant up
  46. #+END_SRC
  47. Launch a 3-Node Lucid32 Cluster
  48. #+BEGIN_SRC: sh
  49. BOX=lucid32 vagrant up
  50. #+END_SRC
  51. Only 1 Chef Server & 1 Chef Client Node
  52. #+BEGIN_SRC: sh
  53. vagrant up chef.vm
  54. vagrant up node0.vm
  55. #+END_SRC
  56. * Knife
  57. Works Anywhere (Host or Guest)
  58. #+BEGIN_SRC: sh
  59. knife node list
  60. knife node show chef.vm
  61. knife search node "name:node*.vm"
  62. knife cookbook list
  63. knife cookbook upload ...
  64. knife role list
  65. knife role from file ...
  66. knife node run_list add ...
  67. knife ssh "*:*" "sudo chef-client" -a ip -x vagrant -i .ssh/id_rsa --no-host-key-verify
  68. #+END_SRC
  69. * Changelog
  70. *** 0.5 Works with VirtualBox 4.0.10. Rebuild your VMS.
  71. *** 0.6 Works with VirtualBox 4.1.0. & Vagrant 0.8.5. Rebuild your VMS.
  72. *** 0.6.1 Works with VirtualBox 4.1.2 & Vagrant 0.8.5
  73. * License [[LICENSE][Apache 2]]