Infrastructure with Chef • Adopting Continuous Delivery patterns • A sample workflow/toolchain using Chef & Jenkins • Challenges when managing application binaries • Demo of the Jenkins Traceability Plugin • Q&A
• Describe desired system state • Manage configuration drift • Multi-platform support • Capture full Application Infrastructure configuration in code • Apply that code to bare compute resources http://www.flickr.com/photos/louisb/4555295187/
the easy things approachable and the hard things possible • Non-restrictive DSL • Full power of Ruby available to work through edge cases • Open Source development community • Supermarket for custom resources & reusable cookbooks
your entire infrastructure from a central source of truth • Manage 100’s/1000’s/10,000’s of nodes with a single Chef Server • Open Source Chef Server • High-Availability • Chef Server Federation • Analytics
Test software projects continuously • Your entire Application Infrastructure configuration—expressed as code—is a software project too • Monitor execution of externally-run jobs • Set up CI jobs to run test-kitchen • Set up CI jobs to promote Chef code
manage all Application Infrastructure state via cookbooks • Use Git as a collaborative SCM • Use Jenkins to poll SCM for cookbook updates then initiate builds & tests • Test-Kitchen to run tests on cookbooks
Test Kitchen KEY Cookbook Change (new git branch) Local Dev runs Test Kitchen works Commit Change Push to remote Open Pull Request Initiate Jenkins CI Yes No Code Change Required Pull Request merged by reviewer Jenkins runs Test Kitchen Initiate Jenkins CI Code Review pass/ fail Pass Pass tests pass/ fail notify github Fail Fail Minor Modification Killed notify github Jenkins Build Job Pull Request merged by reviewer incr cookbook version upload frozen cookbook git tag cookbook repo Jenkins Promote Job Integration Environment Testing via Serverspec Update Env Run Chef on Env Test Jenkins Promote Job UAT Environment Testing via Cucumber Update Env Run Chef on Env Test Jenkins Promote Job Production Environment Testing via Ext. Suite Update Env Run Chef on Env Test
(new git branch) Local Dev runs Test Kitchen works Commit Change Push to remote Open Pull Request Initiate Jenkins CI Yes No Code Change Required Git Chef Jenkins Test Kitchen KEY
Chef Jenkins Test Kitchen KEY Jenkins Build Job Pull Request merged by reviewer incr cookbook version upload frozen cookbook git tag cookbook repo Jenkins Promote Job Integration Environment Testing via Serverspec Update Env Run Chef on Env Test Jenkins Promote Job UAT Environment Testing via Cucumber Update Env Run Chef on Env Test Jenkins Promote Job Production Environment Testing via Ext. Suite Update Env Run Chef on Env Test
Jenkins Test Kitchen KEY Cookbook Change (new git branch) Local Dev runs Test Kitchen works Commit Change Push to remote Open Pull Request Initiate Jenkins CI Yes No Code Change Required Pull Request merged by reviewer Jenkins runs Test Kitchen Initiate Jenkins CI Code Review pass/ fail Pass Pass tests pass/ fail notify github Fail Fail Minor Modification Killed notify github Jenkins Build Job Pull Request merged by reviewer incr cookbook version upload frozen cookbook git tag cookbook repo Jenkins Promote Job Integration Environment Testing via Serverspec Update Env Run Chef on Env Test Jenkins Promote Job UAT Environment Testing via Cucumber Update Env Run Chef on Env Test Jenkins Promote Job Production Environment Testing via Ext. Suite Update Env Run Chef on Env Test