Test Kitchen and Infrastructure as Code
-
Upload
cybera-inc -
Category
Technology
-
view
216 -
download
0
description
Transcript of Test Kitchen and Infrastructure as Code
Test Kitchen and
Infrastructure as CodeCyber Summit 2014 September 25, 2014
Fletcher Nichol @fnichol
http://hw-ops.com
1. Infrastructure as Code 2. Test Kitchen
Agenda
I am a software developer
Preface
What isInfrastructure?
Physical and virtual resources: compute (servers, vms), networking, storage, etc.
Infrastructure
What isInfrastructure Automation?
Code
Software
What isInfrastructure
As Code?
“Enable the reconstruction of the business from nothing but a source code repository, an application data backup, and bare metal resources”
Infrastructure as Code
- Adam Jacob, Web Operations
If we can model infrastructure as code
If we can model infrastructure as code
can we apply code process and practices?
In other words…
Can we apply
Can we applySoftware Engineering
to infrastrcuture?
Yep.
What processes and practices apply to software?
Testing
Test Kitchen“Your infrastructure deserves tests too”
An infrastructure testing tool
Test Kitchen
Used in development
Test Kitchen
Used in CI/CD pipeline
Test Kitchen
Describes your testing setup on a single server
Test Kitchen
.kitchen.yml
Test Kitchen Code
--- driver: name: vagrant !
provisioner: name: chef_solo !
platforms: - name: ubuntu-14.04 - name: centos-6.5 !
suites: - name: client run_list: - recipe[postgresql::client] - name: server run_list: - recipe[postgresql::server]
Code
--- driver: name: vagrant !
provisioner: name: chef_solo !
platforms: - name: ubuntu-14.04 - name: centos-6.5 !
suites: - name: client run_list: - recipe[postgresql::client] - name: server run_list: - recipe[postgresql::server]
Code
--- driver: name: vagrant !
provisioner: name: chef_solo !
platforms: - name: ubuntu-14.04 - name: centos-6.5 !
suites: - name: client run_list: - recipe[postgresql::client] - name: server run_list: - recipe[postgresql::server]
Code
--- driver: name: vagrant !
provisioner: name: chef_solo !
platforms: - name: ubuntu-14.04 - name: centos-6.5 !
suites: - name: client run_list: - recipe[postgresql::client] - name: server run_list: - recipe[postgresql::server]
Code
--- driver: name: vagrant !
provisioner: name: chef_solo !
platforms: - name: ubuntu-14.04 - name: centos-6.5 !
suites: - name: client run_list: - recipe[postgresql::client] - name: server run_list: - recipe[postgresql::server]
Code
Runs multiple testing setups in isolation
Test Kitchen
Plugin system to support automation tools, cloud providers,
& testing frameworks
Test Kitchen
Amazon EC2, Rackspace, Digital Ocean, OpenStack, LXC, Vagrant, CloudStack,
Joyent, VMware vSphere, Google Compute Engine, Microsoft Azure, Docker, etc.
Test KitchenDrivers
Chef (Solo, Client), Simple Shell, Puppet (Apply), Salt, Ansible, etc.
Test KitchenProvisioners
Simple bash, bats, MiniTest, shUnit2, Aruba, Serverspec,
RSpec, shpec, Cucumber, etc.
Test KitchenTesting Frameworks
http://kitchen.ci/docs/getting-started/
Test KitchenGetting Started
“In short, software is eating the world.”
It’s All Software
- Marc Andreessen, 2011
Infrastructure Automation is
Real
Infrastructure Automation is
Real Hard™
Infrastructure Automation is
Real …but
Infrastructure Automation is
Real Possible™
Thanks!Cyber Summit 2014 September 25, 2014
Fletcher Nichol @fnichol
Photo Creditshttps://flic.kr/p/fD2CXV https://flic.kr/p/i3NECz https://flic.kr/p/9urXjF