Test-Driven Infrastructure with CloudFormation and Cucumber.
Upcoming SlideShare
Loading in...5
×
 

Test-Driven Infrastructure with CloudFormation and Cucumber.

on

  • 1,087 views

Test-Driven Infrastructure with CloudFormation and Cucumber.

Test-Driven Infrastructure with CloudFormation and Cucumber.

Statistics

Views

Total Views
1,087
Views on SlideShare
1,071
Embed Views
16

Actions

Likes
2
Downloads
10
Comments
0

3 Embeds 16

http://www.linkedin.com 12
http://www.docshut.com 3
http://www.slashdocs.com 1

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Test-Driven Infrastructure with CloudFormation and Cucumber. Test-Driven Infrastructure with CloudFormation and Cucumber. Presentation Transcript

  • 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.
  • 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.
  • About Me COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • Continuous Deliveryhttp://bit.ly/cdwebinar1 COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • Continuous Delivery COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 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.
  • 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.
  • 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.
  • 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.
  • Test-Driven Infrastructure: Success Jenkins Environment Job Environment Email SSH Deployment Email Working App COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 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.
  • 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.
  • Sidebar: Test-Driven Development with JUnit COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • Scripted Infrastructure (Code)•  Walkthrough of production.template CloudFormation template COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 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.
  • TDI BDD Components CloudFormation Cucumber Jenkins Step Definitions COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • TDI Cucumber Examples•  Walkthrough of production.feature Cucumber feature COPYRIGHT © 2012 Stelligent Systems LLC Unauthorized duplication is not permitted.
  • 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.
  • 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.
  • 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.