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.

chef loves windows

3,853 views

Published on

Published in: Business, Technology
  • Be the first to comment

  • Be the first to like this

chef loves windows

  1. 1. slideshare.net/matschaffer/chef-loves-windows Chef Loves Windows Mat Schaffer, ALT.NET – Nov, 2011
  2. 2. Our agenda• Me• You• Old cars and automation• How chef works• Setting up Chef• An Example deployment (Node.js)
  3. 3. Mat Schaffergithub.com/matschaffer@matschaffer
  4. 4. (for hire)
  5. 5. • Linux System Administration• Ruby on Rails• Chef• Chef on Win2k3 via Cygwin
  6. 6. You
  7. 7. Your CM
  8. 8. Expensive ($2k-$3k) Hand made 12.5 hours
  9. 9. $850Heavily Automated 1.5 hours
  10. 10. 250 early car companies failed by 1930*“Most tech companies are essentially American auto companies pre-Ford.” - Trotter Cashion
  11. 11. Chef
  12. 12. (Chef server) $ chef-server $ chef-client my_cookbook my_cookbook my_cookbook $ chef-client my_cookbook ├── README.rdoc ├── attributes ├── definitions ├── files │   └── default ├── libraries ├── metadata.rb ├── providers ├── recipes │   └── default.rb ├── resources └── templates └── defaultb
  13. 13. node rolecookbook
  14. 14. Step 1: Get a Chef server
  15. 15. http://manage.opscode.com
  16. 16. http://devops.mashion.net/chef-install
  17. 17. Step 2: Get some cookbooks
  18. 18. Cookbooks?
  19. 19. http://community.opscode.com
  20. 20. github.com/matschaffer/ chef-loves-windows Thanks toDoug MacEachern (VMware) &Seth Chisamore (OpsCode)
  21. 21. git clone https://github.com/matschaffer/chef-loves-windows.gitcd chef-loves-windows### configure knifeknife cookbook upload -afor ROLE in roles/*.rb; do knife role from file $ROLE;done
  22. 22. Step 3: Prepare a server
  23. 23. WinRMREM Configure itwinrm quickconfig -qREM A chef run uses some memory, let it.winrm set winrm/config/winrs @{MaxMemoryPerShellMB="300"}REM A chef run also takes some time, let it.winrm set winrm/config @{MaxTimeoutms="1800000"}REM For dev/testing allow unencrypted basic authwinrm set winrm/config/service @{AllowUnencrypted="true"}winrm set winrm/config/service/auth @{Basic="true"}
  24. 24. Or SSHWinSSHDCygwinFreeSSHd
  25. 25. github.com/opscode/knife-windows gem install knife-windows knife bootstrap windows winrm $HOST -r “role[$ROLE]” -x Administrator -P $PASSWORD knife winrm -m $HOST -x Administrator -P $PASSWORD ‘chef-client -c c:/chef/client.rb’ knife bootstrap windows ssh $HOST -r “role[$ROLE]” -x Administrator -i $KEY knife ssh -m $HOST -x Administrator -i $KEY ‘chef-client -c c:/chef/client.rb’
  26. 26. C:> w32tm /resync$ ntpdate pool.ntp.org
  27. 27. 42!
  28. 28. Wrap-UP• Automation can save your business• CM is a key part of your stack• Opscode.com and EC2 is all you need• Yes, it works on windows
  29. 29. github.com/matschaffer@matschaffer Thank you questions?

×