SlideShare a Scribd company logo
1 of 19
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
Test Driven
Infrastructure with
Ansible
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
DevOpsGuys accelerate & transform the
way organisations deliversoftware
3
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
The plan…
• The history of Automated Testing for Infrastructure
• What is Test Driven Development?
• Test Kitchen
• Ansible
• The result…
4
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
What is Automated Testing for Infrastucture?
5
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
Systems Administration (a brief history)
6
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
Hudson, Puppet, Cucumbers and Tramps
● Julian Simpson & Patrick Debois circa 2010 @ UKUUG
– Hudson hit my Puppet with a Cucumber - http://bit.ly/1YaGvDw
● Cucumber-libvirt
– https://github.com/proffalken/cucumber-libvirt/
● Vagrant
– https://vagrantup.com
7
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
...but there must be a better way...
● Configuration Management is improving by 2012
– Puppet
– Chef
– CFEngine 3
● Tests are added retrospectively to manifests/recipes/promises
● Basic bash scripts or Nagios checks are still the norm
8
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
Because we're still doing this...
9
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
Test Driven Development!
10
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
Write your tests first
● Code to your acceptance criteria
● Test for what shouldn't be there, not just what you're adding
● If using Cucumber, educate the business to write your stories in
Gherkin Syntax (Given/When/Then)
● DON'T WRITE YOUR OWN TEST FRAMEWORK! USE SOMEONE
ELSES!!!
11
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
What can you use?
● ServerSpec
– Ruby
– Rspec-based
– The “Unit Tests”
● Cucumber Nagios
– Ruby
– Cucumber-based
– Given/When/Then
– The “Functional Tests”
● Nagios
– What ever language you want
– Exit code dictates test result
● 0 – Works
● 1 – Warning
● 2 – Failed
● 3 – Unknown
– Tests move with you into production
monitoring
– The “Integration Tests”
12
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
How do I run them?
13
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
What is it?
● A test runner…
– YAML-based configuration
– Ruby (again!)
– Comes from Chef
– Works with Puppet and Ansible!
● Web: kitchen.ci
14
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
How do I use it?
● Create a .kitchen.yml in your role's top level directory
● Run kitchen test
● Wait for the results
15
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
Ansible
● Written in Python
● Uses YAML
● Easy to get started
16
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
Ansible Concepts
● Tasks
– Take action “x” against server “y”
● Roles
– Collection of related tasks
● Plays
– A collection of roles that can create a
complete server/cluster
17
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
What does it look like?
18
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
Questions?
www.devopsguys.com
Phone: 0800 368 7378 | e-mail: team@devopsguys.com
Thankyou
@devopsguys
www.devopsguys.com
@proffalken
doics.co

More Related Content

What's hot

Sharing the pain using Protractor
Sharing the pain using ProtractorSharing the pain using Protractor
Sharing the pain using ProtractorAnand Bagmar
 
Build, Launch, Fail, Learn, Refactor, Repeat
Build, Launch, Fail, Learn, Refactor, RepeatBuild, Launch, Fail, Learn, Refactor, Repeat
Build, Launch, Fail, Learn, Refactor, RepeatOutSystems
 
How to measure the business impact of web performance
How to measure the business impact of web performanceHow to measure the business impact of web performance
How to measure the business impact of web performanceSOASTA
 
Improve the deployment process step by step
Improve the deployment process step by stepImprove the deployment process step by step
Improve the deployment process step by stepDaniel Fahlke
 
Delivering @ Warp Speed
Delivering @ Warp SpeedDelivering @ Warp Speed
Delivering @ Warp Speedandremadeira
 
Telling Tales and Solving Crimes with New Relic
Telling Tales and Solving Crimes with New RelicTelling Tales and Solving Crimes with New Relic
Telling Tales and Solving Crimes with New RelicJames Ford
 
Coolblue Behind the Scenes | Niels Abels - Continuous Delivery.
Coolblue Behind the Scenes | Niels Abels - Continuous Delivery.Coolblue Behind the Scenes | Niels Abels - Continuous Delivery.
Coolblue Behind the Scenes | Niels Abels - Continuous Delivery.Coolblue
 
Best practices for JavaScript RIAs
Best practices for JavaScript RIAsBest practices for JavaScript RIAs
Best practices for JavaScript RIAsCarlos Ble
 
testmon for Python
testmon for Pythontestmon for Python
testmon for Pythontib0r
 
[DevDay 2017] ReactJS Hands on - Speaker: Binh Phan - Developer at mgm techno...
[DevDay 2017] ReactJS Hands on - Speaker: Binh Phan - Developer at mgm techno...[DevDay 2017] ReactJS Hands on - Speaker: Binh Phan - Developer at mgm techno...
[DevDay 2017] ReactJS Hands on - Speaker: Binh Phan - Developer at mgm techno...DevDay.org
 
[DevDay 2017] Serverless Architecture - Speaker: Trung Huynh - Software Engin...
[DevDay 2017] Serverless Architecture - Speaker: Trung Huynh - Software Engin...[DevDay 2017] Serverless Architecture - Speaker: Trung Huynh - Software Engin...
[DevDay 2017] Serverless Architecture - Speaker: Trung Huynh - Software Engin...DevDay.org
 
Benchmarking: You're Doing It Wrong (StrangeLoop 2014)
Benchmarking: You're Doing It Wrong (StrangeLoop 2014)Benchmarking: You're Doing It Wrong (StrangeLoop 2014)
Benchmarking: You're Doing It Wrong (StrangeLoop 2014)Aysylu Greenberg
 
[Webinar] Getting started with server-side testing - presented by WiderFunnel...
[Webinar] Getting started with server-side testing - presented by WiderFunnel...[Webinar] Getting started with server-side testing - presented by WiderFunnel...
[Webinar] Getting started with server-side testing - presented by WiderFunnel...Chris Goward
 
Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants.
Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants.Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants.
Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants.Coolblue
 
Coolblue Behind the Scenes | Jeffrey Simons - The UX nerd and you.
Coolblue Behind the Scenes | Jeffrey Simons - The UX nerd and you.Coolblue Behind the Scenes | Jeffrey Simons - The UX nerd and you.
Coolblue Behind the Scenes | Jeffrey Simons - The UX nerd and you.Coolblue
 
Practical Methods for Adopting DevOps - Michael Stahnke
Practical Methods for Adopting DevOps - Michael StahnkePractical Methods for Adopting DevOps - Michael Stahnke
Practical Methods for Adopting DevOps - Michael StahnkePuppet
 

What's hot (17)

Performance with Selenium2
Performance with Selenium2Performance with Selenium2
Performance with Selenium2
 
Sharing the pain using Protractor
Sharing the pain using ProtractorSharing the pain using Protractor
Sharing the pain using Protractor
 
Build, Launch, Fail, Learn, Refactor, Repeat
Build, Launch, Fail, Learn, Refactor, RepeatBuild, Launch, Fail, Learn, Refactor, Repeat
Build, Launch, Fail, Learn, Refactor, Repeat
 
How to measure the business impact of web performance
How to measure the business impact of web performanceHow to measure the business impact of web performance
How to measure the business impact of web performance
 
Improve the deployment process step by step
Improve the deployment process step by stepImprove the deployment process step by step
Improve the deployment process step by step
 
Delivering @ Warp Speed
Delivering @ Warp SpeedDelivering @ Warp Speed
Delivering @ Warp Speed
 
Telling Tales and Solving Crimes with New Relic
Telling Tales and Solving Crimes with New RelicTelling Tales and Solving Crimes with New Relic
Telling Tales and Solving Crimes with New Relic
 
Coolblue Behind the Scenes | Niels Abels - Continuous Delivery.
Coolblue Behind the Scenes | Niels Abels - Continuous Delivery.Coolblue Behind the Scenes | Niels Abels - Continuous Delivery.
Coolblue Behind the Scenes | Niels Abels - Continuous Delivery.
 
Best practices for JavaScript RIAs
Best practices for JavaScript RIAsBest practices for JavaScript RIAs
Best practices for JavaScript RIAs
 
testmon for Python
testmon for Pythontestmon for Python
testmon for Python
 
[DevDay 2017] ReactJS Hands on - Speaker: Binh Phan - Developer at mgm techno...
[DevDay 2017] ReactJS Hands on - Speaker: Binh Phan - Developer at mgm techno...[DevDay 2017] ReactJS Hands on - Speaker: Binh Phan - Developer at mgm techno...
[DevDay 2017] ReactJS Hands on - Speaker: Binh Phan - Developer at mgm techno...
 
[DevDay 2017] Serverless Architecture - Speaker: Trung Huynh - Software Engin...
[DevDay 2017] Serverless Architecture - Speaker: Trung Huynh - Software Engin...[DevDay 2017] Serverless Architecture - Speaker: Trung Huynh - Software Engin...
[DevDay 2017] Serverless Architecture - Speaker: Trung Huynh - Software Engin...
 
Benchmarking: You're Doing It Wrong (StrangeLoop 2014)
Benchmarking: You're Doing It Wrong (StrangeLoop 2014)Benchmarking: You're Doing It Wrong (StrangeLoop 2014)
Benchmarking: You're Doing It Wrong (StrangeLoop 2014)
 
[Webinar] Getting started with server-side testing - presented by WiderFunnel...
[Webinar] Getting started with server-side testing - presented by WiderFunnel...[Webinar] Getting started with server-side testing - presented by WiderFunnel...
[Webinar] Getting started with server-side testing - presented by WiderFunnel...
 
Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants.
Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants.Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants.
Coolblue Behind the Scenes | Pat Hermens - On the shoulders of giants.
 
Coolblue Behind the Scenes | Jeffrey Simons - The UX nerd and you.
Coolblue Behind the Scenes | Jeffrey Simons - The UX nerd and you.Coolblue Behind the Scenes | Jeffrey Simons - The UX nerd and you.
Coolblue Behind the Scenes | Jeffrey Simons - The UX nerd and you.
 
Practical Methods for Adopting DevOps - Michael Stahnke
Practical Methods for Adopting DevOps - Michael StahnkePractical Methods for Adopting DevOps - Michael Stahnke
Practical Methods for Adopting DevOps - Michael Stahnke
 

Similar to Test driven development with ansible

DOES14 - David Ashman - Blackboard Learn - Keep Your Head in the Clouds
DOES14 - David Ashman - Blackboard Learn - Keep Your Head in the CloudsDOES14 - David Ashman - Blackboard Learn - Keep Your Head in the Clouds
DOES14 - David Ashman - Blackboard Learn - Keep Your Head in the CloudsGene Kim
 
DOES14 - David Ashman, Blackboard Learn - Keep Your Head in the Clouds Tuesda...
DOES14 - David Ashman, Blackboard Learn - Keep Your Head in the Clouds Tuesda...DOES14 - David Ashman, Blackboard Learn - Keep Your Head in the Clouds Tuesda...
DOES14 - David Ashman, Blackboard Learn - Keep Your Head in the Clouds Tuesda...DevOps Enterprise Summmit
 
20160913 cookpad ios_en
20160913 cookpad ios_en20160913 cookpad ios_en
20160913 cookpad ios_enKazuaki Matsuo
 
improving the performance of Rails web Applications
improving the performance of Rails web Applicationsimproving the performance of Rails web Applications
improving the performance of Rails web ApplicationsJohn McCaffrey
 
5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test AutomationSauce Labs
 
Bugday bkk-2014 nitisak-auto_perf
Bugday bkk-2014 nitisak-auto_perfBugday bkk-2014 nitisak-auto_perf
Bugday bkk-2014 nitisak-auto_perfNitisak Mooltreesri
 
Automated Testing Environments With Kubernetes & GitLab
Automated Testing Environments With Kubernetes & GitLabAutomated Testing Environments With Kubernetes & GitLab
Automated Testing Environments With Kubernetes & GitLabVladislav Supalov
 
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...Roberto Pérez Alcolea
 
Continuous Intelligence Workshop
Continuous Intelligence WorkshopContinuous Intelligence Workshop
Continuous Intelligence WorkshopDavid Tan
 
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflowMay 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflowAdam Doyle
 
Automate Everything! (No stress development/Tallinn)
Automate Everything! (No stress development/Tallinn)Automate Everything! (No stress development/Tallinn)
Automate Everything! (No stress development/Tallinn)Arto Santala
 
Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comAviran Mordo
 
Pay pal paypal continuous performance as a self-service with fully-automated...
Pay pal  paypal continuous performance as a self-service with fully-automated...Pay pal  paypal continuous performance as a self-service with fully-automated...
Pay pal paypal continuous performance as a self-service with fully-automated...Dynatrace
 
Advanced automated visual testing - DrupalCon seattle 2019
Advanced automated visual testing - DrupalCon seattle 2019Advanced automated visual testing - DrupalCon seattle 2019
Advanced automated visual testing - DrupalCon seattle 2019Shweta Sharma
 
Octopus Deploy Tech Fest 2014
Octopus Deploy Tech Fest 2014Octopus Deploy Tech Fest 2014
Octopus Deploy Tech Fest 2014adriantwright
 
Advanced automated visual testing at DrupalCon Europe 2020
Advanced automated visual testing at DrupalCon Europe 2020Advanced automated visual testing at DrupalCon Europe 2020
Advanced automated visual testing at DrupalCon Europe 2020Shweta Sharma
 
XPages Blast - Ideas, Tips and More
XPages Blast - Ideas, Tips and MoreXPages Blast - Ideas, Tips and More
XPages Blast - Ideas, Tips and MoreTeamstudio
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAppDynamics
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGroup
 

Similar to Test driven development with ansible (20)

DOES14 - David Ashman - Blackboard Learn - Keep Your Head in the Clouds
DOES14 - David Ashman - Blackboard Learn - Keep Your Head in the CloudsDOES14 - David Ashman - Blackboard Learn - Keep Your Head in the Clouds
DOES14 - David Ashman - Blackboard Learn - Keep Your Head in the Clouds
 
DOES14 - David Ashman, Blackboard Learn - Keep Your Head in the Clouds Tuesda...
DOES14 - David Ashman, Blackboard Learn - Keep Your Head in the Clouds Tuesda...DOES14 - David Ashman, Blackboard Learn - Keep Your Head in the Clouds Tuesda...
DOES14 - David Ashman, Blackboard Learn - Keep Your Head in the Clouds Tuesda...
 
20160913 cookpad ios_en
20160913 cookpad ios_en20160913 cookpad ios_en
20160913 cookpad ios_en
 
improving the performance of Rails web Applications
improving the performance of Rails web Applicationsimproving the performance of Rails web Applications
improving the performance of Rails web Applications
 
5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation5 Steps to Jump Start Your Test Automation
5 Steps to Jump Start Your Test Automation
 
Bugday bkk-2014 nitisak-auto_perf
Bugday bkk-2014 nitisak-auto_perfBugday bkk-2014 nitisak-auto_perf
Bugday bkk-2014 nitisak-auto_perf
 
Automated Testing Environments With Kubernetes & GitLab
Automated Testing Environments With Kubernetes & GitLabAutomated Testing Environments With Kubernetes & GitLab
Automated Testing Environments With Kubernetes & GitLab
 
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
 
Continuous Intelligence Workshop
Continuous Intelligence WorkshopContinuous Intelligence Workshop
Continuous Intelligence Workshop
 
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflowMay 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
 
Automate Everything! (No stress development/Tallinn)
Automate Everything! (No stress development/Tallinn)Automate Everything! (No stress development/Tallinn)
Automate Everything! (No stress development/Tallinn)
 
Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.com
 
Pay pal paypal continuous performance as a self-service with fully-automated...
Pay pal  paypal continuous performance as a self-service with fully-automated...Pay pal  paypal continuous performance as a self-service with fully-automated...
Pay pal paypal continuous performance as a self-service with fully-automated...
 
Advanced automated visual testing - DrupalCon seattle 2019
Advanced automated visual testing - DrupalCon seattle 2019Advanced automated visual testing - DrupalCon seattle 2019
Advanced automated visual testing - DrupalCon seattle 2019
 
Octopus Deploy Tech Fest 2014
Octopus Deploy Tech Fest 2014Octopus Deploy Tech Fest 2014
Octopus Deploy Tech Fest 2014
 
Advanced automated visual testing at DrupalCon Europe 2020
Advanced automated visual testing at DrupalCon Europe 2020Advanced automated visual testing at DrupalCon Europe 2020
Advanced automated visual testing at DrupalCon Europe 2020
 
Wso2con test-automation
Wso2con test-automationWso2con test-automation
Wso2con test-automation
 
XPages Blast - Ideas, Tips and More
XPages Blast - Ideas, Tips and MoreXPages Blast - Ideas, Tips and More
XPages Blast - Ideas, Tips and More
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
 

Recently uploaded

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Recently uploaded (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

Test driven development with ansible

  • 1. www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com Test Driven Infrastructure with Ansible
  • 2. www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com DevOpsGuys accelerate & transform the way organisations deliversoftware
  • 3. 3 www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com The plan… • The history of Automated Testing for Infrastructure • What is Test Driven Development? • Test Kitchen • Ansible • The result…
  • 4. 4 www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com What is Automated Testing for Infrastucture?
  • 5. 5 www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com Systems Administration (a brief history)
  • 6. 6 www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com Hudson, Puppet, Cucumbers and Tramps ● Julian Simpson & Patrick Debois circa 2010 @ UKUUG – Hudson hit my Puppet with a Cucumber - http://bit.ly/1YaGvDw ● Cucumber-libvirt – https://github.com/proffalken/cucumber-libvirt/ ● Vagrant – https://vagrantup.com
  • 7. 7 www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com ...but there must be a better way... ● Configuration Management is improving by 2012 – Puppet – Chef – CFEngine 3 ● Tests are added retrospectively to manifests/recipes/promises ● Basic bash scripts or Nagios checks are still the norm
  • 8. 8 www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com Because we're still doing this...
  • 9. 9 www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com Test Driven Development!
  • 10. 10 www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com Write your tests first ● Code to your acceptance criteria ● Test for what shouldn't be there, not just what you're adding ● If using Cucumber, educate the business to write your stories in Gherkin Syntax (Given/When/Then) ● DON'T WRITE YOUR OWN TEST FRAMEWORK! USE SOMEONE ELSES!!!
  • 11. 11 www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com What can you use? ● ServerSpec – Ruby – Rspec-based – The “Unit Tests” ● Cucumber Nagios – Ruby – Cucumber-based – Given/When/Then – The “Functional Tests” ● Nagios – What ever language you want – Exit code dictates test result ● 0 – Works ● 1 – Warning ● 2 – Failed ● 3 – Unknown – Tests move with you into production monitoring – The “Integration Tests”
  • 12. 12 www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com How do I run them?
  • 13. 13 www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com What is it? ● A test runner… – YAML-based configuration – Ruby (again!) – Comes from Chef – Works with Puppet and Ansible! ● Web: kitchen.ci
  • 14. 14 www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com How do I use it? ● Create a .kitchen.yml in your role's top level directory ● Run kitchen test ● Wait for the results
  • 15. 15 www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com Ansible ● Written in Python ● Uses YAML ● Easy to get started
  • 16. 16 www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com Ansible Concepts ● Tasks – Take action “x” against server “y” ● Roles – Collection of related tasks ● Plays – A collection of roles that can create a complete server/cluster
  • 17. 17 www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com What does it look like?
  • 18. 18 www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com Questions?
  • 19. www.devopsguys.com Phone: 0800 368 7378 | e-mail: team@devopsguys.com Thankyou @devopsguys www.devopsguys.com @proffalken doics.co

Editor's Notes

  1. Welcome & short intro to me <number>
  2. About DOG
  3. Hopefully time for a demo at the end!
  4. Devs have had testing for years, SysAdmins have been a lot slower on the uptake but we are learning! Why should we test? (NEXT SLIDE!!!!)
  5. Previously – build by hand, install, don't bother checking it Then – Build by script - “The script works”, right? Don't bother checking it Next - “Works on my machine”, run the script, don't bother checking prod
  6. The movement starts - “all the devs are doing it, so why can't we?”
  7. Eventually – Monitoring works, it's good to go...
  8. “Dev is similar to stage, stage is similar to prod, therefore what works in dev will work in prod”… WRONG!!!So what is the answer?
  9. <number>