Continuous Deployment of Operational Configs
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Continuous Deployment of Operational Configs

  • 3,397 views
Uploaded 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/

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
    Be the first to like this
No Downloads

Views

Total Views
3,397
On Slideshare
3,154
From Embeds
243
Number of Embeds
2

Actions

Shares
Downloads
22
Comments
0
Likes
0

Embeds 243

http://blog.mikebabineau.com 138
http://eng.ea2d.com 105

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/