Testing infra automation
-
Upload
sreedevi-vedula -
Category
Software
-
view
62 -
download
0
Transcript of Testing infra automation
TESTING INFRASTRUCTURE AUTOMATION
ABOUT ME
•http://testreflections.wordpress.com/
•@suryasreevedula
2
AGENDA
•What is “Infrastructure As Code”
•Why test Infrastructure Code?
•How to test Infrastructure Code?
•Test First Infrastructure Using Chef
3
WHAT IS “INFRASTRUCTURE
AS CODE”
4
WHAT IS “INFRASTRUCTURE”?
•App Servers
•DB Servers
•Config Servers
5
TRADITIONAL AUTOMATION
•Not Re-usable
•Changes not usually tracked
•Config Values are not usually externalized
•Not usually / frequently tested
•Not easily accessible to the developer teams
6
INFRASTRUCTURE AS “CODE”
•Reusable, Maintainable, Extensible and Testable infrastructure.
•Modularize Building Blocks of Infrastructure
•Apply Dev Principles like Inheritance and Composition
•Make Testable
•Version Control Changes like patches, upgrades
•Share modules across the community
7
BUILDING BLOCKS
8
Resources
Modules / Cookbooks
Nodes
Environments
IAC FRAMEWORKS
9
WHY TEST “INFRASTRUCTURE
CODE”
10
WHY TEST?
•To avoid errors in setting up environments
•To ensure platform coverage
•To ensure different possible system configurations for each platform
11
HOW TO TEST “INFRASTRUCTURE
CODE”
12
Ubuntu 10.0.4
System Tests
Unit Tests
Ubuntu 12.0.4
Unit Tests
System Tests
CentOS 6.4
Unit Tests
System Tests
TEST FIRST INFRASTRUCTURE
DEVELOPMENT
14
15
CHEF TESTING ECO-SYSTEM
•Unit Tests - ChefSpec
•System Tests - ServerSpec
•Platform Tests - Test Kitchen
16
CHEF TESTING ECO-SYSTEM
•Unit Tests - ChefSpec
•System Tests - ServerSpec
•Platform Tests - Test Kitchen
17
DEMO STAGES
18
Setup Platform
s
Write Server Tests
Add Infra Code
Add Unit Tests
Deploy on
Nodes
RESOURCES
•<Github Link>
•<Blog Post Links>
19
Reach me at: !
@suryasreevedula
THANK YOU