Chef Workflowat SecondMarket                                     Julian Dunn              Senior Systems Operations Engine...
What’s Meant by Workflow?
What’s Meant by Workflow?           How to not trample on others when making           changes           Encompasses the e...
Cookbook Development
Development Workflow            Local development: Vagrant and VirtualBox            Unit tests: ChefSpec     RSpec.config...
A Word About Git Organization            Break cookbooks into individual repos            – chef-cookbooks/{name}.git     ...
Roles as Data            Roles contain only data, not run_lists            Version the roles cookbook like othersMember FI...
Limitations of Local   Development
Limitations of Local Cookbook Development            Missing databags and search            Develop against a Chef server ...
Deployment
Deployment: It’s all about communication            Spork            – Uploading and freezing stable cookbooks            ...
The Future
The Future            More people touching Chef            Modularize cookbooks            Improve unit & integration test...
Thanks!                           t: @julian_dunn                      e: jdunn@aquezada.com              g: github.com/se...
Upcoming SlideShare
Loading in …5
×

Chef Workflow Strategies at SecondMarket

2,118 views

Published on

A presentation I gave at the Chef-NYC meetup group's Workflow Strategies night on January 29, 2013

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

No Downloads
Views
Total views
2,118
On SlideShare
0
From Embeds
0
Number of Embeds
729
Actions
Shares
0
Downloads
19
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • Take a poll to see how long people have been using ChefNever - new to it< 6 months6 months - 1 year> 1 year
  • What’s meant by workflow?
  • If you’re organized in how you develop and test your cookbooks, you’ll also be organized when it comes to deploy them, by ensuring changes are tested
  • Explain a bit about Vagrant and VirtualBox for those who are newUnit tests: Just started with this using ChefSpec – still somewhat immature in my view. First need to learn Rspec, but many things are not intuitiveIntegration tests: test-kitchen
  • Unit tests: Just started with this using ChefSpec – still somewhat immature in my view. First need to learn Rspec, but many things are not intuitiveIntegration tests:
  • Missing data bags and search: ChefSpec allows some mocking but that’s for unit testing only. When integration testing with test-kitchen, need a real Server
  • When it comes time for deployment – obviously the most important thing is communication. The tools are used as a means to that end, to automate the routine aspects of communication but there is no substitute for talking to someone if it falls outside those bounds!Sporkto upload and freeze stable cookbooks, as well as promoting versions to certain environments.Unlike Etsy we pin all cookbook versions in all environments, because developers need a stable dev environment for their features.All spork notifications are sent to HipChat; we also graph deploys in Graphite (not currently used)Semantic versioning: unstable cookbooks are never frozen
  • Training up some developers to use Chef as well. Could make Spring properties changes for example without involving OpsModularize cookbooks so that SecondMarket’s bespoke applications each have a cookbook. Easier for developers to handle (smaller pieces == smaller blast radius)
  • Chef Workflow Strategies at SecondMarket

    1. 1. Chef Workflowat SecondMarket Julian Dunn Senior Systems Operations Engineer jdunn@secondmarket.com
    2. 2. What’s Meant by Workflow?
    3. 3. What’s Meant by Workflow? How to not trample on others when making changes Encompasses the entire process of making the change – cookbook development or modification – unit/integration testing – deployment – notificationsMember FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
    4. 4. Cookbook Development
    5. 5. Development Workflow Local development: Vagrant and VirtualBox Unit tests: ChefSpec RSpec.configure do |config| config.before(:all) do ::Chef::Config(:[]).with(:solo).and_return(nil) # or false end end Integration tests: test-kitchen w/ MinitestsMember FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
    6. 6. A Word About Git Organization Break cookbooks into individual repos – chef-cookbooks/{name}.git Allows: – Independent development – Tracking & merging from upstream – Contributing changes backMember FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
    7. 7. Roles as Data Roles contain only data, not run_lists Version the roles cookbook like othersMember FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
    8. 8. Limitations of Local Development
    9. 9. Limitations of Local Cookbook Development Missing databags and search Develop against a Chef server – “cheftest” environment – vagrant-butcher – vagrant-vbguestMember FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
    10. 10. Deployment
    11. 11. Deployment: It’s all about communication Spork – Uploading and freezing stable cookbooks – Change versions per environment – Notifications to HipChat Semantic versioning CHANGELOG.md / JIRAMember FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
    12. 12. The Future
    13. 13. The Future More people touching Chef Modularize cookbooks Improve unit & integration testing Cookbooks in CI Code reviewsMember FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
    14. 14. Thanks! t: @julian_dunn e: jdunn@aquezada.com g: github.com/secondmarket-cookbooks w: www.juliandunn.net SecondMarket’s hiring!Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.

    ×