Your SlideShare is downloading. ×

Continuous Deployment of Operational Configs

3,058

Published on

How to implement continuous deployment of operational configurations using Chef and Git. …

How to implement continuous deployment of operational configurations using Chef and Git.

Given as a lightning talk at the "Continuous Deployment ArchCamp, 03/30/2011.
http://www.meetup.com/ArchCamp/events/16419122/

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
3,058
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
22
Comments
0
Likes
0
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. Continuous Deployment for Ops (who use Chef and git) @mikebabineau EA2D
  • 2. Infrastructure as Code“Enable the reconstruction of the business from nothing but asource code repository, an application data backup, and baremetal resources” - Jesse Robbins
  • 3. Chef primerClient-server config management toolCookbooks - modules with recipes for doing stuffRoles - which recipes? what settings?Data Bags - JSON object storageKnife - CLI tool
  • 4. Bad:$ knife role edit myrole
  • 5. Better:$ knife role from file roles/myrole.json
  • 6. How?$ tree -a chef-repochef-repo├── .chef├── .git├── cookbooks│ └── myapp├── databags└── roles └── myrole.json
  • 7. Best:$ git push origin master
  • 8. How?for cookbook in $(git_diff("cookbooks")); do knife cookbook upload $cookbookdonefor role in $(git_diff("roles")); do knife role from file $roledonefor bag in $(git_diff("databags")); do for item in $(git_diff("items", $bag)); do knife data bag from file $bag $item donedone
  • 9. How do you test?$ git push origin dev
  • 10. $ cat .chef/knife.rb...# (original by jtimberman@opscode.com)require gritbranch = Grit::Repo.new("#{current_dir}/..").head.namecase branchwhen "master" orgname = "ea2d"else orgname = "ea2d-dev"endvalidation_key "#{current_dir}/#{orgname}-validator.pem"chef_server_url "https://api.opscode.com/organizations/#{orgname}"validation_client_name "#{orgname}-validator"...https://gist.github.com/829733
  • 11. Questions?mikeb@ea2d.comWere hiring:AWS, Java, Chef, Python,JS, GAE, NoSQL, DevOps, etc.http://ea2d.com/jobs/

×