This document is a summary of a webinar about infrastructure as code. It introduces the speaker, Srirajan, and discusses how automation tools like Chef, Puppet, Ansible and others can be used to define infrastructure in code. Key benefits of infrastructure as code include automation, repeatability, and disaster recovery. The webinar also discusses testing infrastructure code and version controlling code changes.
2. About
Me
SRI
RAJAN
PRINCIPLE ENGINEER
• From India. Live in UK
• 10+ years in IT
• 6+ years Racker
• Specialties:
- Architecting solutions
- Cloud
- Automation
- Linux
linkedin.com/in/rajansriram
@sriramrajan
12. INFRASTRUCTURE AS CODE
knife rackspace server create
--server-name web01
--image image-id
--flavor performance1-1
--rackspace-region lon
-r 'role[base],role[app]’
13. INFRASTRUCTURE AS CODE
knife rackspace server create
--server-name web01
--image image-id
--flavor performance1-1
--rackspace-region lon
-r 'role[base],role[app]’
Base
• Configure the firewall
• Installed a base set of packages
• Created the necessary users and sudo
privileges
• Configure SSH service
• Configure logging
• Tweak other system(sysctl) settings
App
• Install the Apache web server
• Deployed a sample website
• Install Jboss application server
• Deployed Java applications
15. The Main Players
Puppet Chef Ansible Salt DSC
• 2005
• 2009
• 2012
• Ruby based
• Ruby based
• YAML
• A pioneer
• Written in
python
• 2011
• YAML
• Written in
Python
• 2013
• Powershell
module
• Microsoft
Environments
20. INFRASTRUCTURE AS CODE
git log
074462d sri May 27 16:00:43 updating monitors for lamp servers
7405929 zach May 21 14:34:18 adding user for qa group
dad4fe1 sri May 19 15:06:24 updating acls on www dir
a936c64 sri May 19 14:43:14 adding postfix to all lamp servers
25. TESTING
Follow
development
best
pracHces
- ValidaHon
of
data
- Logging
- Debug
data
Use
replica
environments
-‐
dev,
stage,
prod
+
user
defined
test
plans
26. TOOLS
FoodCriHc/Rubocop
–
Validate
coding
standards
Test
Kitchen(kitchen.ci)
–
IntegraHon
tesHng
Cucumber
–
Test
driven
development
27. TOOLS
Vagrant
-‐
Portable
&
lighweight
environments
ChefSpec
-‐
Unit
tesHng
with
Chef
ServerSpec
–
TesHng
actual
state
on
the
servers
39. MORE DEVOPS WEBINARS
Replay
available
IntroducHon
to
DevOps
24th
July
DevOps
Toolbox:
Infrastructure
as
Code
7th
August
DevOps
Toolbox:
ApplicaHon
Insights
&
Monitoring
22nd
August
DevOps
Toolbox:
Automated
test
&
deployment
11th
September
What
a
cloud-‐enabled
business
looks
like