SlideShare a Scribd company logo
1
End to End Immutable
Infrastructure Testing
January 2020
© 2019 Nebulaworks, Inc.
2
So there I was...
3
HI, MY NAME IS DREW
4
OVERVIEW
Tell & Show:
- why: testing
- what: is/are we testing
- how: demo
- questions
ASSUMPTIONS
Good at:
- config mgmt
- deployment via code
- Packer
- git
Know some about:
- Continuous Integration
- Terraform
- Vagrant
- Azure
- Immutable Infrastructure
5
WHY TESTING? (engineer version)
Code change
Developers change
Dependencies change
Testing is about taking back control
6
WHY TESTING? ( manager version)
deployment confidence -> reduced stress
short-lived development environments
documents your infrastructure
ease of refactoring
Testing is about reducing risk
7
ALTERNATE PRESENTATION NAMES
Technically coping with change: a memoir
How I sleep at night (as a infra. eng.)
Cowboy deploy to tried and tested
8
4 KINDS OF TESTS
●
●
●
●
9
PARTICIPATION AWARD
YOU
CONGRATULATIONS <YOUR NAME>!
10
4 KINDS OF INFRASTRUCTURE TESTS
1. Eyeballing it
2. Linting
3. Unit Testing
4. Integration Testing
you, a scientist,
eyeballing it
BEFORE your code merges
BEFORE your code runs
AFTER your code runs
1. Eyeballing it
11
OVERVIEW
feedback
loop
Local CI
Post
Deployment
12
TOOLS
Goss (no cool logo) Terratest (no cool logo)
RSpec
(not a cool logo)
Inspec
“The Specs”
IN
SPEC
FACTS
Ruby Gem Developed by
Chef
Native integrations with:
- Packer
- Ansible Molecule
- Chef Suite
Cloud Resource Testing!
13
PROFILE a distinct module of inspec code
CONTROL a single or grouping of distinct tests
RESOURCE the inspec resource with properties to verify
MATCHER used to compare resource values to expectations
TARGETS native connection / auth methods to launch tests
INSPEC PRIMER
control ‘tmp’ do
title ’Verify /tmp exists’
desc 'A detailed description'
describe file('/tmp') do
it { should be_directory }
end
end
control ‘home’ do
title ’Verify /home exists’
...
Profile
inspec exec my-azure-profile -t azure://<subscription_id>
inspec exec my-vm-ssh-profile -t ssh://user@ip:port
14
DEMO TIME!
SHUT UP!
15
RETROSPECTIVE
16
WHAT NEXT?
1. Use your eyeballing tests
2. Write a test for every configuration change you make. Every one
3. Think and talk about it with your team and write more tests
4. Write tests for things that you miss
5. Seek guidance from compliance and security teams, partner with them (do at your own peril)
6. Rely upon external profiles and open-source yours
https://github.com/dev-sec/linux-baseline/releases
Start writing tests!
Important: Don’t merge code without tests
17
THANK YOU!
QUESTIONS?
email: drew@nebulaworks.com
code & slides: https://github.com/drewmullen/infra-testing-demo

More Related Content

PDF
Cypress - Best Practices
PPTX
Cypress Automation
PPTX
Introduction to Integration Testing With Cypress
PDF
Cypress e2e automation testing - day1 intor by: Hassan Hameed
PPTX
Automated Infrastructure Testing
PDF
[English][Test Girls] Zero to Hero: Start Test automation with Cypress
PPTX
Cypress for Testing
PDF
e2e testing with cypress
Cypress - Best Practices
Cypress Automation
Introduction to Integration Testing With Cypress
Cypress e2e automation testing - day1 intor by: Hassan Hameed
Automated Infrastructure Testing
[English][Test Girls] Zero to Hero: Start Test automation with Cypress
Cypress for Testing
e2e testing with cypress

What's hot (20)

PDF
Automated-Testing-inside-containers
PPTX
Why you should switch to Cypress for modern web testing?
PDF
How to write a Dockerfile
PPTX
Cypress first impressions
PPTX
Be flexible with zalenium, a dockerized selenium grid infrastructure
PPTX
Django strategy-test
PDF
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
PDF
Comment améliorer le quotidien des Développeurs PHP ?
PDF
Automated testing with Cypress
PDF
Achieving Continuous Delivery with Puppet
PDF
Jenkins & Selenium
PPTX
SKILLWISE_SELENIUM
PPTX
Zend Server - OSI Days
PDF
Oscon 2014 def core review
PDF
Aikau testing tech talk live 83 20150204
PDF
Test Driven Development with OSGi - Balázs Zsoldos
KEY
Testing with Jenkins, Selenium and Continuous Deployment
PDF
Automation Testing
PPTX
Introduction to cypress in Angular (Chinese)
PPTX
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
Automated-Testing-inside-containers
Why you should switch to Cypress for modern web testing?
How to write a Dockerfile
Cypress first impressions
Be flexible with zalenium, a dockerized selenium grid infrastructure
Django strategy-test
Make Your Selenium Suite Faster and Reliable: Test Setup with REST APIs - SQA...
Comment améliorer le quotidien des Développeurs PHP ?
Automated testing with Cypress
Achieving Continuous Delivery with Puppet
Jenkins & Selenium
SKILLWISE_SELENIUM
Zend Server - OSI Days
Oscon 2014 def core review
Aikau testing tech talk live 83 20150204
Test Driven Development with OSGi - Balázs Zsoldos
Testing with Jenkins, Selenium and Continuous Deployment
Automation Testing
Introduction to cypress in Angular (Chinese)
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
Ad

Similar to End to End immutable infrastructure testing (20)

PPTX
Anatomy of a Build Pipeline
PPT
Software Design for Testability
PDF
Head in the Clouds: Testing Infra as Code - Config Management 2020
PDF
Stop Being Lazy and Test Your Software
PDF
Containerised Testing at Demonware : PyCon Ireland 2016
PPT
Testing_with_TestComplete
PDF
Testing distributed systems in production
PDF
Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S...
PPTX
Splunk: Forward me the REST of those shells
PPTX
Coldbox developer training – session 4
PPTX
AppSec California 2016 - Making Security Agile
PDF
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
ODP
Writing useful automated tests for the single page applications you build
PDF
Product! - The road to production deployment
PDF
Automating Security Testing with the OWTF
DOC
Vikash_Kr_Singh_CV
PPTX
A Fabric/Puppet Build/Deploy System
PPTX
From One Test To Test Framework With Rapise
PDF
Combined Project
PDF
Scala, Functional Programming and Team Productivity
Anatomy of a Build Pipeline
Software Design for Testability
Head in the Clouds: Testing Infra as Code - Config Management 2020
Stop Being Lazy and Test Your Software
Containerised Testing at Demonware : PyCon Ireland 2016
Testing_with_TestComplete
Testing distributed systems in production
Tips to achieve continuous integration/delivery using HP ALM, Jenkins, and S...
Splunk: Forward me the REST of those shells
Coldbox developer training – session 4
AppSec California 2016 - Making Security Agile
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
Writing useful automated tests for the single page applications you build
Product! - The road to production deployment
Automating Security Testing with the OWTF
Vikash_Kr_Singh_CV
A Fabric/Puppet Build/Deploy System
From One Test To Test Framework With Rapise
Combined Project
Scala, Functional Programming and Team Productivity
Ad

More from Nebulaworks (19)

PDF
Dynamic Policy Enforcement for Microservice Environments
PDF
Overcoming scalability issues in your prometheus ecosystem
PDF
Why we chose Argo Workflow to scale DevOps at InVision
PDF
Methods to stay focused & productive amidst COVID-19!
PDF
Embracing service-level-objectives of your microservices in your Cl/CD
PDF
Embacing service-level-objectives of your microservices in your Cl/CD
PDF
Deploying to Day N Operations of Kubernetes and Containerized Apps
PDF
Trunk based development for Beginners
PDF
Distributed tracing with service meshes and tracing spans across polyglot Mic...
PDF
Managing Terraform Module Versioning and Dependencies
PDF
Kubernetes for Beginners
PDF
Building Modern Teams and Software
PDF
Kuberntes Ingress with Kong
PDF
A Hands-on Introduction on Terraform Best Concepts and Best Practices
PDF
The App Developer's Kubernetes Toolbox
PDF
Building a Container Platform with docker swarm
PDF
Effective Micoservice Design & Containers
PDF
Fast Tracking Dev Teams to Container Adoption
PDF
Nebulaworks | Optimize Your DevOps Game
Dynamic Policy Enforcement for Microservice Environments
Overcoming scalability issues in your prometheus ecosystem
Why we chose Argo Workflow to scale DevOps at InVision
Methods to stay focused & productive amidst COVID-19!
Embracing service-level-objectives of your microservices in your Cl/CD
Embacing service-level-objectives of your microservices in your Cl/CD
Deploying to Day N Operations of Kubernetes and Containerized Apps
Trunk based development for Beginners
Distributed tracing with service meshes and tracing spans across polyglot Mic...
Managing Terraform Module Versioning and Dependencies
Kubernetes for Beginners
Building Modern Teams and Software
Kuberntes Ingress with Kong
A Hands-on Introduction on Terraform Best Concepts and Best Practices
The App Developer's Kubernetes Toolbox
Building a Container Platform with docker swarm
Effective Micoservice Design & Containers
Fast Tracking Dev Teams to Container Adoption
Nebulaworks | Optimize Your DevOps Game

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Cloud computing and distributed systems.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Spectroscopy.pptx food analysis technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPT
Teaching material agriculture food technology
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Per capita expenditure prediction using model stacking based on satellite ima...
Cloud computing and distributed systems.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Building Integrated photovoltaic BIPV_UPV.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
NewMind AI Weekly Chronicles - August'25-Week II
The AUB Centre for AI in Media Proposal.docx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Unlocking AI with Model Context Protocol (MCP)
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectroscopy.pptx food analysis technology
Network Security Unit 5.pdf for BCA BBA.
Digital-Transformation-Roadmap-for-Companies.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Teaching material agriculture food technology
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity
Profit Center Accounting in SAP S/4HANA, S4F28 Col11

End to End immutable infrastructure testing

  • 1. 1 End to End Immutable Infrastructure Testing January 2020 © 2019 Nebulaworks, Inc.
  • 2. 2 So there I was...
  • 3. 3 HI, MY NAME IS DREW
  • 4. 4 OVERVIEW Tell & Show: - why: testing - what: is/are we testing - how: demo - questions ASSUMPTIONS Good at: - config mgmt - deployment via code - Packer - git Know some about: - Continuous Integration - Terraform - Vagrant - Azure - Immutable Infrastructure
  • 5. 5 WHY TESTING? (engineer version) Code change Developers change Dependencies change Testing is about taking back control
  • 6. 6 WHY TESTING? ( manager version) deployment confidence -> reduced stress short-lived development environments documents your infrastructure ease of refactoring Testing is about reducing risk
  • 7. 7 ALTERNATE PRESENTATION NAMES Technically coping with change: a memoir How I sleep at night (as a infra. eng.) Cowboy deploy to tried and tested
  • 8. 8 4 KINDS OF TESTS ● ● ● ●
  • 10. 10 4 KINDS OF INFRASTRUCTURE TESTS 1. Eyeballing it 2. Linting 3. Unit Testing 4. Integration Testing you, a scientist, eyeballing it BEFORE your code merges BEFORE your code runs AFTER your code runs 1. Eyeballing it
  • 12. 12 TOOLS Goss (no cool logo) Terratest (no cool logo) RSpec (not a cool logo) Inspec “The Specs” IN SPEC FACTS Ruby Gem Developed by Chef Native integrations with: - Packer - Ansible Molecule - Chef Suite Cloud Resource Testing!
  • 13. 13 PROFILE a distinct module of inspec code CONTROL a single or grouping of distinct tests RESOURCE the inspec resource with properties to verify MATCHER used to compare resource values to expectations TARGETS native connection / auth methods to launch tests INSPEC PRIMER control ‘tmp’ do title ’Verify /tmp exists’ desc 'A detailed description' describe file('/tmp') do it { should be_directory } end end control ‘home’ do title ’Verify /home exists’ ... Profile inspec exec my-azure-profile -t azure://<subscription_id> inspec exec my-vm-ssh-profile -t ssh://user@ip:port
  • 16. 16 WHAT NEXT? 1. Use your eyeballing tests 2. Write a test for every configuration change you make. Every one 3. Think and talk about it with your team and write more tests 4. Write tests for things that you miss 5. Seek guidance from compliance and security teams, partner with them (do at your own peril) 6. Rely upon external profiles and open-source yours https://github.com/dev-sec/linux-baseline/releases Start writing tests! Important: Don’t merge code without tests
  • 17. 17 THANK YOU! QUESTIONS? email: drew@nebulaworks.com code & slides: https://github.com/drewmullen/infra-testing-demo