Chef Workflow Strategies at SecondMarket
Click here to load reader
-
Upload
julian-dunn -
Category
Technology
-
view
1.653 -
download
3
description
Transcript of Chef Workflow Strategies at SecondMarket
What’s Meant by Workflow?
Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
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
– notifications
Cookbook Development
Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
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/ Minitests
Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
A Word About Git Organization
Break cookbooks into individual repos
– chef-cookbooks/{name}.git
Allows:
– Independent development
– Tracking & merging from upstream
– Contributing changes back
Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
Roles as Data
Roles contain only data, not run_lists
Version the roles cookbook like others
Limitations of Local
Development
Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
Limitations of Local Cookbook Development
Missing databags and search
Develop against a Chef server
– “cheftest” environment
– vagrant-butcher
– vagrant-vbguest
Deployment
Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
Deployment: It’s all about communication
Spork
– Uploading and freezing stable cookbooks
– Change versions per environment
– Notifications to HipChat
Semantic versioning
CHANGELOG.md / JIRA
The Future
Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
The Future
More people touching Chef
Modularize cookbooks
Improve unit & integration testing
Cookbooks in CI
Code reviews
Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
Thanks!
t: @julian_dunn
g: github.com/secondmarket-cookbooks
w: www.juliandunn.net
SecondMarket’s hiring!