QA to sous-Chef
Sajnikanth Suriyanarayanan
Presented at Devops Summit on 27th March 2014
& at DevopsSG on 2nd October 2013
About Me
● Coastal GeoScientist and Civil Engineer
● 10+ years in Software Quality Assurance
and Functional Testing
● HP C...
● I’m a beginner
● May not be the standard way
● introduction to vagrant
● introduction to chef provisioning
● introductio...
Contents
● Background
● Problem
● Vagrant + bash
● Vagrant + Chef
● Demo
● Lessons Learned
Background
As Test Engineer, I usually:
● write test scripts
● merge pull requests
● deploy code
● test changes
Problem
Current project is brand new. So:
● write test scripts
● merge pull requests
● deploy code (where to?)
● test chan...
● App lives locally
● Experiment with technologies (mysql or
mongoDB; apache or nginx;)
● Unstable environment
Problem ......
Vagrant + bash
● Reproducible
● Portable
● Isolated; room for experimentation
● Use Bash to install apps 'automatically'
Vagrant + bash ...
Changing / maintaining bash scripts?
Vagrant + Chef
Apprehensions:
● Ruby
● Steep learning curve
○ hosted chef or chef solo
○ knife
○ opscode
○ cookbooks
○ rec...
Forget it!
Let’s get our hands dirty
Install nginx on vagrant VM using Chef
Pre-Requisites
● VirtualBox
● vagrant installed
● vagrant omnibus
● vagrant guest a...
vagrant init
Demo - Initialize vagrant
Demo - Create Cookbooks
mkdir ./cookbooks
knife cookbook site download nginx
Unarchive and delete tar
Demo - Update Vagrantfile
Demo - Let’s cook
vagrant up
Demo - Results?
Demo - Download apt
cookbook
knife cookbook site download apt
Demo - Update Vagrantfile
Demo - We try again
vagrant up
Cookbook bluepill not found
Cookbook rsyslog not found
Cookbook build-essential not found
C...
Demo - Download
cookbooks
Demo - Update Vagrantfile
Hungry Already?
Demo - and again
vagrant up
Easy way to manage cookbooks
gem install berkshelf
vagrant plugin install vagrant-berkshelf
Demo - enter Berkshelf
cookbook 'nginx'
Demo - Berksfile
berks install
Demo - using berkshelf
~/.berkshelf/cookbooks/
Demo - update Vagrantfile
update Vagrantfile to use berkshelf
vagrant reload
Demo - Results
Demo - Resources
● Presentation link - http://j.mp/devops-summit
● Demo repo - https://github.com/sajnikanth/chef-berkshel...
3 Important lessons learned while using chef
● RTFM
● RTFM
● RTFM
Lessons Learned
Questions?
Upcoming SlideShare
Loading in...5
×

QA to sous-Chef

751

Published on

This is my experience as a black box test engineer venturing into Devops using Chef. I cover the following topics during the course of my presentation - Why Chef, Pre-requisites, Cooking on a vagrant VM and conclude with an introduction to Berkshelf.

Published in: Technology, Self Improvement
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
751
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
7
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

QA to sous-Chef

  1. 1. QA to sous-Chef Sajnikanth Suriyanarayanan Presented at Devops Summit on 27th March 2014 & at DevopsSG on 2nd October 2013
  2. 2. About Me ● Coastal GeoScientist and Civil Engineer ● 10+ years in Software Quality Assurance and Functional Testing ● HP Certified Professional in Quality Center ● Lead Quality Assurance at Vistaprint ● http://sajnikanth.com
  3. 3. ● I’m a beginner ● May not be the standard way ● introduction to vagrant ● introduction to chef provisioning ● introduction to berkshelf Disclaimer & Take-Away
  4. 4. Contents ● Background ● Problem ● Vagrant + bash ● Vagrant + Chef ● Demo ● Lessons Learned
  5. 5. Background As Test Engineer, I usually: ● write test scripts ● merge pull requests ● deploy code ● test changes
  6. 6. Problem Current project is brand new. So: ● write test scripts ● merge pull requests ● deploy code (where to?) ● test changes
  7. 7. ● App lives locally ● Experiment with technologies (mysql or mongoDB; apache or nginx;) ● Unstable environment Problem ... A server should be like a phoenix, regularly rising from the ashes - Martin Fowler
  8. 8. Vagrant + bash ● Reproducible ● Portable ● Isolated; room for experimentation ● Use Bash to install apps 'automatically'
  9. 9. Vagrant + bash ... Changing / maintaining bash scripts?
  10. 10. Vagrant + Chef Apprehensions: ● Ruby ● Steep learning curve ○ hosted chef or chef solo ○ knife ○ opscode ○ cookbooks ○ recipe ○ omnibus ○ information overload!!
  11. 11. Forget it! Let’s get our hands dirty
  12. 12. Install nginx on vagrant VM using Chef Pre-Requisites ● VirtualBox ● vagrant installed ● vagrant omnibus ● vagrant guest additions ● knife Demo
  13. 13. vagrant init Demo - Initialize vagrant
  14. 14. Demo - Create Cookbooks mkdir ./cookbooks knife cookbook site download nginx Unarchive and delete tar
  15. 15. Demo - Update Vagrantfile
  16. 16. Demo - Let’s cook vagrant up
  17. 17. Demo - Results?
  18. 18. Demo - Download apt cookbook knife cookbook site download apt
  19. 19. Demo - Update Vagrantfile
  20. 20. Demo - We try again vagrant up Cookbook bluepill not found Cookbook rsyslog not found Cookbook build-essential not found Cookbook ohai not found Cookbook runit not found Cookbook yum not found Cookbook yum-epel not found
  21. 21. Demo - Download cookbooks
  22. 22. Demo - Update Vagrantfile
  23. 23. Hungry Already?
  24. 24. Demo - and again vagrant up
  25. 25. Easy way to manage cookbooks gem install berkshelf vagrant plugin install vagrant-berkshelf Demo - enter Berkshelf
  26. 26. cookbook 'nginx' Demo - Berksfile
  27. 27. berks install Demo - using berkshelf ~/.berkshelf/cookbooks/
  28. 28. Demo - update Vagrantfile update Vagrantfile to use berkshelf vagrant reload
  29. 29. Demo - Results
  30. 30. Demo - Resources ● Presentation link - http://j.mp/devops-summit ● Demo repo - https://github.com/sajnikanth/chef-berkshelf-demo ● Chef Tutorials ○ http://nathenharvey.com/blog/2012/12/06/learning-chef-part-1/ ○ https://learnchef.opscode.com/quickstart/ ● Berkshelf Introduction - http://youtu.be/hYt0E84kYUI
  31. 31. 3 Important lessons learned while using chef ● RTFM ● RTFM ● RTFM Lessons Learned Questions?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×