0
Automated Infrastructure Testing                                Ranjib Dey       System Administrator, ThoughtWorks
Part 1What we are building?
What you already know?
To Code (develop functionalities)To Test (ensure if its working fine)
To Code (develop functionalities)  AutomateTo Test (ensure if its working fine)
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)AutomateTo Deploy (ensure if it can be released)
To Code (develop functionalities)AutomateTo Test (ensure if its working fine)AutomateTo Deploy (ensure if it can be releas...
To CodeAutomate            CITo TestAutomateTo Deploy
To CodeAutomate            CITo Test          CDAutomateTo Deploy
Part 2How it is different?
Tested codeAutomateDeployed code
InfrastructureTested codeAutomateDeployed code
InfrastructureTested code     OperationsAutomateDeployed code
InfrastructureTested code     OperationsAutomate                DataDeployed code
InfrastructureTested code     OperationsAutomate                DataDeployed code   Compliance
InfrastructureTested code     OperationsAutomate                DataDeployed code   Compliance                End users
InfrastructureTested code     OperationsAutomate                DataDeployed code   Compliance                End users   ...
On infrastructure
To CodeAutomateTo TestAutomateTo Deploy
To Code                       AutomateBuild infrastructure                       To Test                       Automate   ...
To Code                       AutomateBuild infrastructure                       To Test                       AutomatePro...
Part 3On testing
Tested codeAutomateDeployed code
Tested code  Automate                Infrastructure as CodeDeployed code
Tested code  Automate                Infrastructure as CodeDeployed codeCode
Tested code  Automate                  Infrastructure as CodeDeployed codeCode                Test
Tested code  Automate                       Infrastructure as CodeDeployed code                             Unit TestingCo...
Tested code  Automate                       Infrastructure as CodeDeployed code                               Unit Testing...
Tested code  Automate                       Infrastructure as CodeDeployed code                               Unit 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  Automate                       Infrastructure as CodeDeployed code                               Unit Testing...
Tested code  Automate                       Infrastructure as CodeDeployed code                               Unit Testing...
describe_recipe nginx:configuration do it installs version 1.0.15 do   node[:nginx][:version].should == 1.0.15   file("/et...
Tested code  Automate                       Infrastructure as CodeDeployed code                           Unit TestingCode...
• Monitoring
Tested code  Automate                 Infrastructure as CodeDeployed code                                  Monitoring    T...
Tested code  Automate                 Infrastructure as CodeDeployed code    Tests       Mocks                            ...
Part 4Cloud cometh
Cloud
I see more code
I see more codeI need more tests
Cloud  AWS
Cloud   AWSRackspace            GCE                  HP                       Joyent
Oh yeahWe love cross browser testing?
Part 5Lessons learned
Health of infrastructure
Health of infrastructureBattle tested code
Health of infrastructureBattle tested code                     Thorough Monitoring
• Remember to build feedback system .  – Test harness should publish metrics in the same    system where ops and project m...
Collaborate more withOps.
Some advice• Remember MIME types?• World wont be fully automatic ever. Always  automate the most time consuming task first...
References•   Infra-automation: http://www.opscode.com/chef/•   Monitoring: http://www.nagios.org/•   Lint tool: http://ac...
@RanjibDey         http://ranjib.posterous.comhttp://www.dzone.com/users/ranjibd               dey.ranjib@gmail.com
Automated infrastructure testing - by Ranjib Dey
Automated infrastructure testing - by Ranjib Dey
Automated infrastructure testing - by Ranjib Dey
Upcoming SlideShare
Loading in...5
×

Automated infrastructure testing - by Ranjib Dey

683

Published on

This was a full length talk presented by Ranjib Dey in vodQA-10 : Going Beyond the Usual held in ThoughtWorks, Pune on the 13th,October,2012

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
683
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
17
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Automated infrastructure testing - by Ranjib Dey"

  1. 1. Automated Infrastructure Testing Ranjib Dey System Administrator, ThoughtWorks
  2. 2. Part 1What we are building?
  3. 3. What you already know?
  4. 4. To Code (develop functionalities)To Test (ensure if its working fine)
  5. 5. To Code (develop functionalities) AutomateTo Test (ensure if its working fine)
  6. 6. Enter DevOps/CD
  7. 7. To Code (develop functionalities)To Test (ensure if its working fine)To Deploy (ensure if it can be released)
  8. 8. To Code (develop functionalities)To Test (ensure if its working fine)AutomateTo Deploy (ensure if it can be released)
  9. 9. To Code (develop functionalities)AutomateTo Test (ensure if its working fine)AutomateTo Deploy (ensure if it can be released)
  10. 10. To CodeAutomate CITo TestAutomateTo Deploy
  11. 11. To CodeAutomate CITo Test CDAutomateTo Deploy
  12. 12. Part 2How it is different?
  13. 13. Tested codeAutomateDeployed code
  14. 14. InfrastructureTested codeAutomateDeployed code
  15. 15. InfrastructureTested code OperationsAutomateDeployed code
  16. 16. InfrastructureTested code OperationsAutomate DataDeployed code
  17. 17. InfrastructureTested code OperationsAutomate DataDeployed code Compliance
  18. 18. InfrastructureTested code OperationsAutomate DataDeployed code Compliance End users
  19. 19. InfrastructureTested code OperationsAutomate DataDeployed code Compliance End users Integrations
  20. 20. On infrastructure
  21. 21. To CodeAutomateTo TestAutomateTo Deploy
  22. 22. To Code AutomateBuild infrastructure To Test Automate To Deploy
  23. 23. To Code AutomateBuild infrastructure To Test AutomateProduction To DeployInfrastructure
  24. 24. Part 3On testing
  25. 25. Tested codeAutomateDeployed code
  26. 26. Tested code Automate Infrastructure as CodeDeployed code
  27. 27. Tested code Automate Infrastructure as CodeDeployed codeCode
  28. 28. Tested code Automate Infrastructure as CodeDeployed codeCode Test
  29. 29. Tested code Automate Infrastructure as CodeDeployed code Unit TestingCode Test
  30. 30. Tested code Automate Infrastructure as CodeDeployed code Unit TestingCode Test
  31. 31. Tested code Automate Infrastructure as CodeDeployed code Unit TestingCode Test Functional Testing
  32. 32. Scenario: Nginx is running as a daemon When I run "ps aux | grep nginx" Then I should see “nginx:master" in the output
  33. 33. Tested code Automate Infrastructure as CodeDeployed code Unit TestingCode Test Functional Testing
  34. 34. Tested code Automate Infrastructure as CodeDeployed code Unit TestingCode Test Functional Testing Integration Testing
  35. 35. 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 endend
  36. 36. Tested code Automate Infrastructure as CodeDeployed code Unit TestingCode Test Functional Testing Monitoring Integration Testing
  37. 37. • Monitoring
  38. 38. Tested code Automate Infrastructure as CodeDeployed code Monitoring Tests Mocks
  39. 39. Tested code Automate Infrastructure as CodeDeployed code Tests Mocks Monitoring Analytics
  40. 40. Part 4Cloud cometh
  41. 41. Cloud
  42. 42. I see more code
  43. 43. I see more codeI need more tests
  44. 44. Cloud AWS
  45. 45. Cloud AWSRackspace GCE HP Joyent
  46. 46. Oh yeahWe love cross browser testing?
  47. 47. Part 5Lessons learned
  48. 48. Health of infrastructure
  49. 49. Health of infrastructureBattle tested code
  50. 50. Health of infrastructureBattle tested code Thorough Monitoring
  51. 51. • 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.
  52. 52. Collaborate more withOps.
  53. 53. 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.
  54. 54. 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
  55. 55. @RanjibDey http://ranjib.posterous.comhttp://www.dzone.com/users/ranjibd dey.ranjib@gmail.com
  1. A particular slide catching your eye?

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

×