SlideShare une entreprise Scribd logo
1  sur  12
Cucumber-Chef
Test Lab Architecture
1
Zachary Patten
March 1st, 2013
Cucumber-Chef: Test Lab Architecture
2
• Programming for 30 years
• Major Accomplishments:
• Developed the first generation of commercial software for recovering
stolen computers
• Contributed to the development of the first generation of Intrusion
Detection Prevention systems
• Leading development on the first generation of Infrastructure Integration
Testing frameworks
• Recent Experience:
• Rearden Commerce – DevOps Senior Software Engineer
• Insight Card Services – Core Team Lead Software Engineer
• Interests:
• Gaming / Snowboarding / Hacking / Programming
About Me
Cucumber-Chef: Test Lab Architecture
3
• Background
• Supported Providers
• Test Lab Components
• Labfile
• Lifecycles
• Provision a Test Lab
• Execute Tests
• The Future
• Q&A
Overview
Cucumber-Chef: Test Lab Architecture
4
• Test-Driven Infrastructure with Chef
• Stephen Nelson-Smith
Background
Cucumber-Chef: Test Lab Architecture
5
• Amazon AWS EC2
• Expensive
• Not end user friendly
• Geared more for corporations
• Vagrant
• Free
• End user friendly
• Community favorite by far
Supported Providers
Cucumber-Chef: Test Lab Architecture
6
Test Lab Components
Chef-Repo
Labfile Cucumber-Chef RubyGem
Test Lab Class
Provider Proxy Class
Test Lab (Ubuntu Precise Instance)
Chef-
Server
LXC bind
bridge-
utils
isc-dhcpd iptables ntpd
Cucumber
RubyGem
Hooks
Containers
S
S
H
S
S
H
Cucumber-Chef: Test Lab Architecture
7
ecosystem "mockup-app-1" do
container "nginx-lb-test-1" do # or apache-lb-test-1
distro "ubuntu"
release "lucid"
persist true
ip "192.168.32.100"
mac "00:00:5e:d1:fa:08"
chef_client ({ :environment => "test",
:run_list => [ "role[base]", "role[nginx_lb_server]" ] })
end
container "nginx-unicorn-test-1" do # or apache-passenger-test-1
distro "ubuntu"
release "lucid"
persist true
ip "192.168.32.200"
mac "00:00:5e:eb:8d:d3"
chef_client ({ :environment => "test",
:run_list => [ "role[base]", "role[nginx_unicorn_server]" ] })
end
…
end
Labfile
Cucumber-Chef: Test Lab Architecture
8
• Provision the Test Lab
• Execute Tests
• Cucumber hooks fire up Cucumber-Chef
• Cucumber-Chef purges any existing containers
• Cucumber-Chef provisions ecosystem off the Labfile contents
• Cucumber-Chef downloads specified artifacts
• Cucumber executes features
• Supplied step helpers facilitate testing the containers
• Destroy the Test Lab
Lifecycles Provision Test Destroy
Provision
TestDestroy
Cucumber-Chef: Test Lab Architecture
9
$ cucumber-chef setup
cucumber-chef v3.0.0.rc.0
Creating VAGRANT instance completed in 53.2361 seconds.
Bootstrapping VAGRANT instance completed in 757.4014 seconds.
Waiting for the chef-server completed in 0.1007 seconds.
Waiting for the chef-server-webui completed in 0.1007 seconds.
Downloading chef-server credentials completed in 1.2088 seconds.
Uploading 'cucumber-chef' cookbooks completed in 6.8571 seconds.
Uploading 'cucumber-chef' roles completed in 5.5413 seconds.
Performing chef-client run completed in 45.9874 seconds.
Downloading proxy SSH credentials completed in 0.3013 seconds.
Rebooting the test lab completed in 21.2672 seconds.
Waiting for the chef-server completed in 0.1008 seconds.
Waiting for the chef-server-webui completed in 0.1009 seconds.
If you are using AWS, be sure to log into the chef-server webui and change the default admin password at least.
Your test lab has now been provisioned! Enjoy!
+-------------------------------------------------------------------+
| PROVIDER: Cucumber::Chef::Provider::Vagrant |
| ID: default |
| STATE: running |
| USERNAME: vagrant |
| IP ADDRESS: 127.0.0.1 |
| PORT: 2222 |
| CHEF-SERVER API: http://127.0.0.1:4000 |
| CHEF-SERVER WEBUI: http://127.0.0.1:4040 |
| CHEF-SERVER DEFAULT USER: admin |
| CHEF-SERVER DEFAULT PASSWORD: p@ssw0rd1 |
+-------------------------------------------------------------------+
Provision a Test Lab
Cucumber-Chef: Test Lab Architecture
10
$ time SETUP=YES cucumber
Using the default profile...
Code:
* features/support/env.rb
* features/support/cc-hooks.rb
>>> cucumber-chef v3.0.0.rc.0
>>> Pushing chef-repo environments to the test lab completed in 5.5749 seconds.
>>> Pushing chef-repo cookbooks to the test lab completed in 20.9644 seconds.
>>> Pushing chef-repo roles to the test lab completed in 6.9508 seconds.
>>> Pushing chef-repo data bag '[REDACTED]' to the test lab completed in 9.8805 seconds.
>>> Pushing chef-repo data bag '[REDACTED]' to the test lab completed in 10.0798 seconds.
>>> Pushing chef-repo data bag '[REDACTED]' to the test lab completed in 12.9025 seconds.
>>> Creating container '[REDACTED]' completed in 1.4148 seconds.
>>> Creating container '[REDACTED]' completed in 0.2018 seconds.
>>> Creating container '[REDACTED]' completed in 0.2038 seconds.
>>> Creating container '[REDACTED]' completed in 0.2014 seconds.
>>> Provisioning container '[REDACTED]' completed in 12.5704 seconds.
>>> Provisioning container '[REDACTED]' completed in 70.6792 seconds.
>>> Provisioning container '[REDACTED]' completed in 12.7062 seconds.
>>> Provisioning container '[REDACTED]' completed in 12.9026 seconds.
…
15 scenarios (15 passed)
74 steps (74 passed)
0m9.314s
real 3m12.219s
user 0m50.133s
sys 0m5.989s
Execute Tests
Cucumber-Chef: Test Lab Architecture
11
• Speed Optimizations (WE NEED MOAR SPEED SCOTTY!)
• Bare Metal Provider
• “rspec-chef”
• De-couple the Test Lab
• The Pipe Dream:
• Enterprise “in-a-box”; complex multi-ecosystem testing
• Support fully configurable network topologies
• Support intermediate “devices” for connecting networks and
ecosystems to simulate routing
The Future
Q&A
Cucumber-Chef: Test Lab Architecture
12

Contenu connexe

Tendances

Effective Testing with Ansible and InSpec
Effective Testing with Ansible and InSpecEffective Testing with Ansible and InSpec
Effective Testing with Ansible and InSpecNathen Harvey
 
OSDC2014: Testing Server Infrastructure with #serverspec
OSDC2014: Testing Server Infrastructure with #serverspecOSDC2014: Testing Server Infrastructure with #serverspec
OSDC2014: Testing Server Infrastructure with #serverspecAndreas Schmidt
 
Compliance Automation with Inspec Part 2
Compliance Automation with Inspec Part 2Compliance Automation with Inspec Part 2
Compliance Automation with Inspec Part 2Chef
 
Chef Hack Day Denver
Chef Hack Day Denver Chef Hack Day Denver
Chef Hack Day Denver Chef
 
Compliance Automation with Inspec Part 4
Compliance Automation with Inspec Part 4Compliance Automation with Inspec Part 4
Compliance Automation with Inspec Part 4Chef
 
Azure handsonlab
Azure handsonlabAzure handsonlab
Azure handsonlabChef
 
London Community Summit - Chef at SkyBet
London Community Summit - Chef at SkyBetLondon Community Summit - Chef at SkyBet
London Community Summit - Chef at SkyBetChef
 
Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAkshaya Mahapatra
 
Nike pop up habitat
Nike pop up   habitatNike pop up   habitat
Nike pop up habitatChef
 
Michelin Starred Cooking with Chef
Michelin Starred Cooking with ChefMichelin Starred Cooking with Chef
Michelin Starred Cooking with ChefJon Cowie
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chefkevsmith
 
Nike popup compliance workshop
Nike popup compliance workshopNike popup compliance workshop
Nike popup compliance workshopChef
 
Effective Testing with Ansible and InSpec
Effective Testing with Ansible and InSpecEffective Testing with Ansible and InSpec
Effective Testing with Ansible and InSpecNathen Harvey
 
Integration testing for salt states using aws ec2 container service
Integration testing for salt states using aws ec2 container serviceIntegration testing for salt states using aws ec2 container service
Integration testing for salt states using aws ec2 container serviceSaltStack
 
Introduction to Test Kitchen and InSpec
Introduction to Test Kitchen and InSpecIntroduction to Test Kitchen and InSpec
Introduction to Test Kitchen and InSpecNathen Harvey
 
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpecTest-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpecMartin Etmajer
 
Compliance as Code
Compliance as CodeCompliance as Code
Compliance as CodeMatt Ray
 
London Community Summit - Habitat 2016
London Community Summit - Habitat 2016London Community Summit - Habitat 2016
London Community Summit - Habitat 2016Sarah Richards
 
Using Nagios with Chef
Using Nagios with ChefUsing Nagios with Chef
Using Nagios with ChefBryan McLellan
 
Baking docker using chef
Baking docker using chefBaking docker using chef
Baking docker using chefMukta Aphale
 

Tendances (20)

Effective Testing with Ansible and InSpec
Effective Testing with Ansible and InSpecEffective Testing with Ansible and InSpec
Effective Testing with Ansible and InSpec
 
OSDC2014: Testing Server Infrastructure with #serverspec
OSDC2014: Testing Server Infrastructure with #serverspecOSDC2014: Testing Server Infrastructure with #serverspec
OSDC2014: Testing Server Infrastructure with #serverspec
 
Compliance Automation with Inspec Part 2
Compliance Automation with Inspec Part 2Compliance Automation with Inspec Part 2
Compliance Automation with Inspec Part 2
 
Chef Hack Day Denver
Chef Hack Day Denver Chef Hack Day Denver
Chef Hack Day Denver
 
Compliance Automation with Inspec Part 4
Compliance Automation with Inspec Part 4Compliance Automation with Inspec Part 4
Compliance Automation with Inspec Part 4
 
Azure handsonlab
Azure handsonlabAzure handsonlab
Azure handsonlab
 
London Community Summit - Chef at SkyBet
London Community Summit - Chef at SkyBetLondon Community Summit - Chef at SkyBet
London Community Summit - Chef at SkyBet
 
Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps Approach
 
Nike pop up habitat
Nike pop up   habitatNike pop up   habitat
Nike pop up habitat
 
Michelin Starred Cooking with Chef
Michelin Starred Cooking with ChefMichelin Starred Cooking with Chef
Michelin Starred Cooking with Chef
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
Nike popup compliance workshop
Nike popup compliance workshopNike popup compliance workshop
Nike popup compliance workshop
 
Effective Testing with Ansible and InSpec
Effective Testing with Ansible and InSpecEffective Testing with Ansible and InSpec
Effective Testing with Ansible and InSpec
 
Integration testing for salt states using aws ec2 container service
Integration testing for salt states using aws ec2 container serviceIntegration testing for salt states using aws ec2 container service
Integration testing for salt states using aws ec2 container service
 
Introduction to Test Kitchen and InSpec
Introduction to Test Kitchen and InSpecIntroduction to Test Kitchen and InSpec
Introduction to Test Kitchen and InSpec
 
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpecTest-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Puppet, Test Kitchen, Serverspec and RSpec
 
Compliance as Code
Compliance as CodeCompliance as Code
Compliance as Code
 
London Community Summit - Habitat 2016
London Community Summit - Habitat 2016London Community Summit - Habitat 2016
London Community Summit - Habitat 2016
 
Using Nagios with Chef
Using Nagios with ChefUsing Nagios with Chef
Using Nagios with Chef
 
Baking docker using chef
Baking docker using chefBaking docker using chef
Baking docker using chef
 

Similaire à Lookout-Cucumber-Chef

Testable Infrastructure with Chef, Test Kitchen, and Docker
Testable Infrastructure with Chef, Test Kitchen, and DockerTestable Infrastructure with Chef, Test Kitchen, and Docker
Testable Infrastructure with Chef, Test Kitchen, and DockerMandi Walls
 
Heavenly hell – automated tests at scale wojciech seliga
Heavenly hell – automated tests at scale   wojciech seligaHeavenly hell – automated tests at scale   wojciech seliga
Heavenly hell – automated tests at scale wojciech seligaAtlassian
 
Introduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefAll Things Open
 
Testing Your Automation Code (Vagrant Version)
Testing Your Automation Code (Vagrant Version)Testing Your Automation Code (Vagrant Version)
Testing Your Automation Code (Vagrant Version)Mischa Taylor
 
PowerShell DevOps Summit 2017 - TDD with Chef, DSC and Pester
PowerShell DevOps Summit 2017 - TDD with Chef, DSC and PesterPowerShell DevOps Summit 2017 - TDD with Chef, DSC and Pester
PowerShell DevOps Summit 2017 - TDD with Chef, DSC and PesterRobb Schiefer Jr
 
Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Jennifer Davis
 
Containerising bootiful microservices javaeeconf
Containerising bootiful microservices javaeeconfContainerising bootiful microservices javaeeconf
Containerising bootiful microservices javaeeconfIvan Vasyliev
 
What is Test Kitchen
What is Test KitchenWhat is Test Kitchen
What is Test KitchenBenoit Caron
 
TDD with Chef, DSC and Pester - 2.0.26
TDD with Chef, DSC and Pester - 2.0.26TDD with Chef, DSC and Pester - 2.0.26
TDD with Chef, DSC and Pester - 2.0.26Robb Schiefer Jr
 
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpecTest-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpecMartin Etmajer
 
Docker–Grid (A On demand and Scalable dockerized selenium grid architecture)
Docker–Grid (A On demand and Scalable dockerized selenium grid architecture)Docker–Grid (A On demand and Scalable dockerized selenium grid architecture)
Docker–Grid (A On demand and Scalable dockerized selenium grid architecture)STePINForum
 
Lessons from Etsy: Avoiding Kitchen Nightmares - #ChefConf 2012
Lessons from Etsy: Avoiding Kitchen Nightmares - #ChefConf 2012Lessons from Etsy: Avoiding Kitchen Nightmares - #ChefConf 2012
Lessons from Etsy: Avoiding Kitchen Nightmares - #ChefConf 2012Patrick McDonnell
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationGiacomo Vacca
 
Introduction To Continuous Compliance & Remediation
Introduction To Continuous Compliance & RemediationIntroduction To Continuous Compliance & Remediation
Introduction To Continuous Compliance & RemediationNicole Johnson
 
Automated testing on steroids – Trick for managing test data using Docker sna...
Automated testing on steroids – Trick for managing test data using Docker sna...Automated testing on steroids – Trick for managing test data using Docker sna...
Automated testing on steroids – Trick for managing test data using Docker sna...Lucas Jellema
 
Session 3 - CloudStack Test Automation and CI
Session 3 - CloudStack Test Automation and CISession 3 - CloudStack Test Automation and CI
Session 3 - CloudStack Test Automation and CItcloudcomputing-tw
 
Continuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECSContinuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECSAmazon Web Services
 
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2Chef
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionPeng Xiao
 

Similaire à Lookout-Cucumber-Chef (20)

Testable Infrastructure with Chef, Test Kitchen, and Docker
Testable Infrastructure with Chef, Test Kitchen, and DockerTestable Infrastructure with Chef, Test Kitchen, and Docker
Testable Infrastructure with Chef, Test Kitchen, and Docker
 
Heavenly hell – automated tests at scale wojciech seliga
Heavenly hell – automated tests at scale   wojciech seligaHeavenly hell – automated tests at scale   wojciech seliga
Heavenly hell – automated tests at scale wojciech seliga
 
Introduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to Chef
 
Chef Cookbook Workflow
Chef Cookbook WorkflowChef Cookbook Workflow
Chef Cookbook Workflow
 
Testing Your Automation Code (Vagrant Version)
Testing Your Automation Code (Vagrant Version)Testing Your Automation Code (Vagrant Version)
Testing Your Automation Code (Vagrant Version)
 
PowerShell DevOps Summit 2017 - TDD with Chef, DSC and Pester
PowerShell DevOps Summit 2017 - TDD with Chef, DSC and PesterPowerShell DevOps Summit 2017 - TDD with Chef, DSC and Pester
PowerShell DevOps Summit 2017 - TDD with Chef, DSC and Pester
 
Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015
 
Containerising bootiful microservices javaeeconf
Containerising bootiful microservices javaeeconfContainerising bootiful microservices javaeeconf
Containerising bootiful microservices javaeeconf
 
What is Test Kitchen
What is Test KitchenWhat is Test Kitchen
What is Test Kitchen
 
TDD with Chef, DSC and Pester - 2.0.26
TDD with Chef, DSC and Pester - 2.0.26TDD with Chef, DSC and Pester - 2.0.26
TDD with Chef, DSC and Pester - 2.0.26
 
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpecTest-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
Test-Driven Infrastructure with Ansible, Test Kitchen, Serverspec and RSpec
 
Docker–Grid (A On demand and Scalable dockerized selenium grid architecture)
Docker–Grid (A On demand and Scalable dockerized selenium grid architecture)Docker–Grid (A On demand and Scalable dockerized selenium grid architecture)
Docker–Grid (A On demand and Scalable dockerized selenium grid architecture)
 
Lessons from Etsy: Avoiding Kitchen Nightmares - #ChefConf 2012
Lessons from Etsy: Avoiding Kitchen Nightmares - #ChefConf 2012Lessons from Etsy: Avoiding Kitchen Nightmares - #ChefConf 2012
Lessons from Etsy: Avoiding Kitchen Nightmares - #ChefConf 2012
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
 
Introduction To Continuous Compliance & Remediation
Introduction To Continuous Compliance & RemediationIntroduction To Continuous Compliance & Remediation
Introduction To Continuous Compliance & Remediation
 
Automated testing on steroids – Trick for managing test data using Docker sna...
Automated testing on steroids – Trick for managing test data using Docker sna...Automated testing on steroids – Trick for managing test data using Docker sna...
Automated testing on steroids – Trick for managing test data using Docker sna...
 
Session 3 - CloudStack Test Automation and CI
Session 3 - CloudStack Test Automation and CISession 3 - CloudStack Test Automation and CI
Session 3 - CloudStack Test Automation and CI
 
Continuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECSContinuous Delivery with Docker and Amazon ECS
Continuous Delivery with Docker and Amazon ECS
 
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 

Lookout-Cucumber-Chef

  • 2. Cucumber-Chef: Test Lab Architecture 2 • Programming for 30 years • Major Accomplishments: • Developed the first generation of commercial software for recovering stolen computers • Contributed to the development of the first generation of Intrusion Detection Prevention systems • Leading development on the first generation of Infrastructure Integration Testing frameworks • Recent Experience: • Rearden Commerce – DevOps Senior Software Engineer • Insight Card Services – Core Team Lead Software Engineer • Interests: • Gaming / Snowboarding / Hacking / Programming About Me
  • 3. Cucumber-Chef: Test Lab Architecture 3 • Background • Supported Providers • Test Lab Components • Labfile • Lifecycles • Provision a Test Lab • Execute Tests • The Future • Q&A Overview
  • 4. Cucumber-Chef: Test Lab Architecture 4 • Test-Driven Infrastructure with Chef • Stephen Nelson-Smith Background
  • 5. Cucumber-Chef: Test Lab Architecture 5 • Amazon AWS EC2 • Expensive • Not end user friendly • Geared more for corporations • Vagrant • Free • End user friendly • Community favorite by far Supported Providers
  • 6. Cucumber-Chef: Test Lab Architecture 6 Test Lab Components Chef-Repo Labfile Cucumber-Chef RubyGem Test Lab Class Provider Proxy Class Test Lab (Ubuntu Precise Instance) Chef- Server LXC bind bridge- utils isc-dhcpd iptables ntpd Cucumber RubyGem Hooks Containers S S H S S H
  • 7. Cucumber-Chef: Test Lab Architecture 7 ecosystem "mockup-app-1" do container "nginx-lb-test-1" do # or apache-lb-test-1 distro "ubuntu" release "lucid" persist true ip "192.168.32.100" mac "00:00:5e:d1:fa:08" chef_client ({ :environment => "test", :run_list => [ "role[base]", "role[nginx_lb_server]" ] }) end container "nginx-unicorn-test-1" do # or apache-passenger-test-1 distro "ubuntu" release "lucid" persist true ip "192.168.32.200" mac "00:00:5e:eb:8d:d3" chef_client ({ :environment => "test", :run_list => [ "role[base]", "role[nginx_unicorn_server]" ] }) end … end Labfile
  • 8. Cucumber-Chef: Test Lab Architecture 8 • Provision the Test Lab • Execute Tests • Cucumber hooks fire up Cucumber-Chef • Cucumber-Chef purges any existing containers • Cucumber-Chef provisions ecosystem off the Labfile contents • Cucumber-Chef downloads specified artifacts • Cucumber executes features • Supplied step helpers facilitate testing the containers • Destroy the Test Lab Lifecycles Provision Test Destroy Provision TestDestroy
  • 9. Cucumber-Chef: Test Lab Architecture 9 $ cucumber-chef setup cucumber-chef v3.0.0.rc.0 Creating VAGRANT instance completed in 53.2361 seconds. Bootstrapping VAGRANT instance completed in 757.4014 seconds. Waiting for the chef-server completed in 0.1007 seconds. Waiting for the chef-server-webui completed in 0.1007 seconds. Downloading chef-server credentials completed in 1.2088 seconds. Uploading 'cucumber-chef' cookbooks completed in 6.8571 seconds. Uploading 'cucumber-chef' roles completed in 5.5413 seconds. Performing chef-client run completed in 45.9874 seconds. Downloading proxy SSH credentials completed in 0.3013 seconds. Rebooting the test lab completed in 21.2672 seconds. Waiting for the chef-server completed in 0.1008 seconds. Waiting for the chef-server-webui completed in 0.1009 seconds. If you are using AWS, be sure to log into the chef-server webui and change the default admin password at least. Your test lab has now been provisioned! Enjoy! +-------------------------------------------------------------------+ | PROVIDER: Cucumber::Chef::Provider::Vagrant | | ID: default | | STATE: running | | USERNAME: vagrant | | IP ADDRESS: 127.0.0.1 | | PORT: 2222 | | CHEF-SERVER API: http://127.0.0.1:4000 | | CHEF-SERVER WEBUI: http://127.0.0.1:4040 | | CHEF-SERVER DEFAULT USER: admin | | CHEF-SERVER DEFAULT PASSWORD: p@ssw0rd1 | +-------------------------------------------------------------------+ Provision a Test Lab
  • 10. Cucumber-Chef: Test Lab Architecture 10 $ time SETUP=YES cucumber Using the default profile... Code: * features/support/env.rb * features/support/cc-hooks.rb >>> cucumber-chef v3.0.0.rc.0 >>> Pushing chef-repo environments to the test lab completed in 5.5749 seconds. >>> Pushing chef-repo cookbooks to the test lab completed in 20.9644 seconds. >>> Pushing chef-repo roles to the test lab completed in 6.9508 seconds. >>> Pushing chef-repo data bag '[REDACTED]' to the test lab completed in 9.8805 seconds. >>> Pushing chef-repo data bag '[REDACTED]' to the test lab completed in 10.0798 seconds. >>> Pushing chef-repo data bag '[REDACTED]' to the test lab completed in 12.9025 seconds. >>> Creating container '[REDACTED]' completed in 1.4148 seconds. >>> Creating container '[REDACTED]' completed in 0.2018 seconds. >>> Creating container '[REDACTED]' completed in 0.2038 seconds. >>> Creating container '[REDACTED]' completed in 0.2014 seconds. >>> Provisioning container '[REDACTED]' completed in 12.5704 seconds. >>> Provisioning container '[REDACTED]' completed in 70.6792 seconds. >>> Provisioning container '[REDACTED]' completed in 12.7062 seconds. >>> Provisioning container '[REDACTED]' completed in 12.9026 seconds. … 15 scenarios (15 passed) 74 steps (74 passed) 0m9.314s real 3m12.219s user 0m50.133s sys 0m5.989s Execute Tests
  • 11. Cucumber-Chef: Test Lab Architecture 11 • Speed Optimizations (WE NEED MOAR SPEED SCOTTY!) • Bare Metal Provider • “rspec-chef” • De-couple the Test Lab • The Pipe Dream: • Enterprise “in-a-box”; complex multi-ecosystem testing • Support fully configurable network topologies • Support intermediate “devices” for connecting networks and ecosystems to simulate routing The Future
  • 12. Q&A Cucumber-Chef: Test Lab Architecture 12