The document discusses test driven infrastructure using tools like Serverspec, Terraform, and Kitchen CI. It begins with an introduction to infrastructure as code and test driven development. It then explains the importance of infrastructure testing and outlines goals like automating configuration, enabling version control, and ensuring solutions work in production. The talk demonstrates how to set up Serverspec test suites to validate expectations for resources and integrate testing with Jenkins. The overall message is that testing infrastructure in a consistent, repeatable manner helps catch bugs early and ensures confidence in automation.
7. Our Talk today
• Infrastructure as Code
• Test Driven Development
• Test Driven Infrastructure
• TDI Tools
• Getting Started with Serverspec &
Kitchen-CI
• Creating Test Suites in Serverspec
• Integrating Serverspec with Jenkins
9. ● Understand the importance of Infrastructure Testing
● Run or Use Serverspec from the command line
● Setup serverspec test suites for different resources
14. Infrastructure as Code (IaC) is an approach to
infrastructure automation based on practices from
software development, it emphasize consistent,
repeatable, routines for provisioning and changing
systems and their configurations
Kief Morris
Infrastructure as Code Book 2016
17. Problem Solution
Manual Setups In Server Automate Configuration across
board
No Version Control, Unable to
track changes
Version Control enable us to track
changes
Non resuable code Code is totally resuable
It works on my Local Machine but
not in Production
It works Everywhere
19. ● Changes to the system are routine thereby avoiding fear and uncertainty
● Eliminates long boring repetitive tasks
● Easily Define, Provision and manage resources needed
● Gives room for Continuous Improvement
● Solutions to problems are proven through implementing, testing, and measuring rather than
long meetings and random guesses
● Continuous Delivery
○ Code is Repeatable
○ Code is Shareable
○ Code is TestAble
Goals of IaC
44. ● https://kitchen.ci/docs/
● Test Orchestrator
● Originated from the Chef Community
● Very Pluggable on all level
● Your Infrastructure deserves test too
About Kitchen-CI
52. “with TDD, you express your
intentions twice: once as a test
and once as a production code, if
the two approaches don’t match,
your test fails, and you have
caught a bug”
Martin EtMajer
Founder | GetCloudNative
53. “Test the Outcome not the
implementation”
Martin EtMajer
Founder | GetCloudNative
54. “First do it right, then do it better”
Martin EtMajer
Founder | GetCloudNative