Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Automated Infrastructure Testing
Search
Ranjib Dey
September 08, 2012
260
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Automated Infrastructure Testing
Testing strategies for chef managed infrastructure
Ranjib Dey
September 08, 2012
More Decks by Ranjib Dey
See All by Ranjib Dey
Consul @ PagerDuty
ranjibd
1
250
Extending CI/CD in Operations Using Chef & LXC
ranjibd
1
410
Adopting Test Driven Development in Operations
ranjibd
4
1.6k
Chef-LXC - Building and deploying custom containers
ranjibd
2
1.8k
How to mock a mocking bird - testing dynamic infrastructure
ranjibd
4
1.3k
A short introduction to LXC
ranjibd
1
420
Attaining Resiliency - Culture , Tools and Practices
ranjibd
2
1.3k
Enabling continuous delivery for your webapp
ranjibd
2
240
Featured
See All Featured
For a Future-Friendly Web
brad_frost
183
10k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
550
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
240
Paper Plane
katiecoart
PRO
4
53k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
290
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
940
Designing Powerful Visuals for Engaging Learning
tmiket
1
570
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
400
30 Presentation Tips
portentint
PRO
1
400
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Ruling the World: When Life Gets Gamed
codingconduct
0
340
Transcript
Automated Infrastructure Testing Ranjib Dey System Administrator, ThoughtWorks
Part 1 What we are building?
What you already know?
To Code (develop functionalities) To Test (ensure if its working
fine)
To Code (develop functionalities) To Test (ensure if its working
fine) Automate
Enter DevOps/CD
To Code (develop functionalities) To Test (ensure if its working
fine) To Deploy (ensure if it can be released)
To Code (develop functionalities) To Test (ensure if its working
fine) To Deploy (ensure if it can be released) Automate
To Code (develop functionalities) To Test (ensure if its working
fine) To Deploy (ensure if it can be released) Automate Automate
To Code To Test To Deploy Automate Automate CI
To Code To Test To Deploy Automate Automate CI CD
Part 2 How it is different?
Tested code Deployed code Automate
Tested code Deployed code Automate Infrastructure
Tested code Deployed code Automate Infrastructure Operations
Tested code Deployed code Automate Infrastructure Operations Data
Tested code Deployed code Automate Infrastructure Operations Data Compliance
Tested code Deployed code Automate Infrastructure Operations Data Compliance End
users
Tested code Deployed code Automate Infrastructure Operations Data Compliance End
users Integrations
On infrastructure
To Code To Test To Deploy Automate Automate
To Code To Test To Deploy Automate Automate Build infrastructure
To Code To Test To Deploy Automate Automate Build infrastructure
Production Infrastructure
Part 3 On testing
Tested code Deployed code Automate
Tested code Deployed code Automate Infrastructure as Code
Tested code Deployed code Automate Infrastructure as Code Code
None
Tested code Deployed code Automate Infrastructure as Code Code Test
Tested code Deployed code Automate Infrastructure as Code Code Test
Unit Testing
None
Tested code Deployed code Automate Infrastructure as Code Code Test
Unit Testing
Tested code Deployed code Automate Infrastructure as Code Code Test
Unit Testing Functional Testing
Scenario: Nginx is running as a daemon When I run
"ps aux | grep nginx" Then I should see “nginx:master" in the output
Tested code Deployed code Automate Infrastructure as Code Code Test
Unit Testing Functional Testing
Tested code Deployed code Automate Infrastructure as Code Code Test
Unit Testing Functional Testing Integration Testing
describe_recipe 'nginx:configuration' do it 'installs version 1.0.15' do node[:nginx][:version].should ==
'1.0.15' file("/etc/nginx/nginx.conf").must_have(:mode, "644") package("nginx").must_be_installed service("nginx").must_be_running end end
Tested code Deployed code Automate Infrastructure as Code Code Test
Unit Testing Functional Testing Integration Testing Monitoring
• Monitoring
Tested code Deployed code Automate Infrastructure as Code Monitoring Tests
Mocks
Tested code Deployed code Automate Infrastructure as Code Monitoring Tests
Mocks Analytics
Part 4 Cloud cometh
Cloud
None
I see more code
I see more code I need more tests
Cloud AWS
Cloud AWS Rackspace GCE HP Joyent
Oh yeah We love cross browser testing?
Part 5 Lessons learned
Health of infrastructure
Health of infrastructure Battle tested code
Health of infrastructure Battle tested code Thorough Monitoring
• Remember to build feedback system . – Test harness
should publish metrics in the same system where ops and project metrics are kept. – Have analytics or trending system on top of the metrics.
Collaborate more with Ops.
Some advice • Remember MIME types? • World wont be
fully automatic ever. Always automate the most time consuming task first. • No easy way out. The function domain requires you to understand man pages, rfps etc. • Choose a text editor rather than an Window manager based IDE.
References • Infra-automation: http://www.opscode.com/chef/ • Monitoring: http://www.nagios.org/ • Lint tool:
http://acrmp.github.com/foodcritic/ • Unit testing: https://github.com/acrmp/chefspec • Functional testing: http://www.cucumber-chef.org/ • Integration testing: https://github.com/calavera/minitest-chef-handler
@RanjibDey http://ranjib.posterous.com http://www.dzone.com/users/ranjibd
[email protected]