Your SlideShare is downloading. ×
  • Like
Test-Driven Infrastructure with CloudFormation and Cucumber.
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Test-Driven Infrastructure with CloudFormation and Cucumber.

  • 1,157 views
Published

Test-Driven Infrastructure with CloudFormation and Cucumber.

Test-Driven Infrastructure with CloudFormation and Cucumber.

Published in Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,157
On SlideShare
0
From Embeds
0
Number of Embeds
4

Actions

Shares
Downloads
18
Comments
0
Likes
4

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Test-Driven Infrastructure w/ CloudFormation and Cucumber Paul Duvall, Stelligent CTO Author of Continuous Integration and DevOps in the Cloud Tuesday, July 24, 2012 Stelligent Monthly Cloud Delivery Webinar Series COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 2. Introduction Next August 28th: Scripted Deployment with Capistrano Webinar http://stelligent.com/cap with Brian Jakovich Powerpoint and other resources will be emailed to Materials attendees and available in Linkedin group Linkedin Continuous Delivery in the Cloud: http://linkd.in/Pfbf1h Stelligent Cloud Delivery: Migration, Training and Operations June Recording of last month’s webinar: Webinar http://www.stelligent.com/aws-webinar/ COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 3. About Me COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 4. Continuous Deliveryhttp://bit.ly/cdwebinar1 COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 5. Continuous Delivery COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 6. COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 7. 5 Steps to Continuous Delivery Document Document to automate Test Write an automated test to verify behavior Script Automate to a single command Version Version all scripts Continuous Run headless with every change COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 8. Business Value of Test-Driven Infrastructure•  Learn of problems earlier by integrating CI with infrastructure - Infrastructure changes integrated with rest of software system•  Scripted Infrastructure becomes Documentation•  Remove Gatekeepers•  Isolate Destructive Changes•  Canonical System•  Quickly get back to earlier version of Infrastructure•  Infrastructure as Code: Apply rigorous practices similar to writing application code COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 9. Test-Driven Infrastructure within Delivery Pipeline •  Manually Configure and Document Environment •  Write Acceptance Test •  Script the Environment provisioning •  Version the infrastructure automation (Checkin the Script(s)) •  Run as part of a Continuous Process •  Make “pre-baked” environments available to team members and CD system COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 10. Sidebar: Continuous Integration Process DBA Polling Develo Create Target per Environments Environment Instances Version- CI Server Tests Control Repository Build DeployOperations Tester COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 11. Test-Driven Infrastructure: Success Jenkins Environment Job Environment Email SSH Deployment Email Working App COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 12. Test-Driven Infrastructure: Failure •  Notified soon after infrastructure script is committed to version-control repository •  Since all infrastructure scripts and config are versioned, can simply revert to previous known-good version •  Failure is identified, scripts are changed and committed back to version-control system •  Infrastructure changes are integrated with rest of software system COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 13. Non-Automated Test Scenario •  Environment is manually created by running through a series of steps to install/configure OS, networking, servers, etc. •  In some cases, these steps are documented. Often, the documentation is not regularly updated •  New environments – based on the “initial environment” – are created by going through similar manual steps •  No canonical state of environments – each environment is unique •  Software is deployed to environments (Dev, QA, Stage, etc.). Deployments fail. Root cause is unclear. •  Troubleshooting and patch work ensue. State remains dubious. Team members apply superstition to root cause. COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 14. Sidebar: Test-Driven Development with JUnit COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 15. Scripted Infrastructure (Code)•  Walkthrough of production.template CloudFormation template COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 16. Cucumber BDD Basics•  Philosophy •  Executable Specifications •  Continuous Traceability•  Cucumber Components (1) •  Business Facing •  Features •  Scenarios •  Steps •  Technology Facing •  Step Definitions •  Support Code •  Automation Library •  Syntax Rules: GherkinFrom “The Cucumber Book” (Wynne and Hellesoy; Pragmatic Bookshelf, 2012) COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 17. TDI BDD Components CloudFormation Cucumber Jenkins Step Definitions COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 18. TDI Cucumber Examples•  Walkthrough of production.feature Cucumber feature COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 19. Other TDI Tools•  Cucumber Nagios: http://auxesis.github.com/cucumber-nagios/•  Cucumber Chef: http://www.cucumber-chef.org/ COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 20. Question and Answer Blog http://www.stelligent.com/blog/ Social @stelligent @paulduvall facebook.com/Stelligent CD Video http://bit.ly/cdwebinar1 Solutions http://www.stelligent.com/solutions/ August http://www.stelligent.com/cap/ Webinar Training http://www.stelligent.com/cd-training/ COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 21. Infrastructure Components CloudFormation Template Elastic IP Route 53 IAM S3 EC2 SimpleDB Linux OS Config Security Group Apache Tomcat Jenkins Version-Control Repo Cucumber Amazon Simple HTTPD Notification Service (SNS) COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.