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.

Continuous Deployment of Operational Configs


Published on

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.

Published in: Technology
  • Dating direct: ❶❶❶ ❶❶❶
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating for everyone is here: ❤❤❤ ❤❤❤
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Continuous Deployment of Operational Configs

  1. 1. Continuous Deployment for Ops (who use Chef and git) @mikebabineau EA2D
  2. 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. 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. 4. Bad:$ knife role edit myrole
  5. 5. Better:$ knife role from file roles/myrole.json
  6. 6. How?$ tree -a chef-repochef-repo├── .chef├── .git├── cookbooks│ └── myapp├── databags└── roles └── myrole.json
  7. 7. Best:$ git push origin master
  8. 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. 9. How do you test?$ git push origin dev
  10. 10. $ cat .chef/knife.rb...# (original by gritbranch ="#{current_dir}/..").head.namecase branchwhen "master" orgname = "ea2d"else orgname = "ea2d-dev"endvalidation_key "#{current_dir}/#{orgname}-validator.pem"chef_server_url "{orgname}"validation_client_name "#{orgname}-validator"...
  11. 11. Questions?mikeb@ea2d.comWere hiring:AWS, Java, Chef, Python,JS, GAE, NoSQL, DevOps, etc.