CODE
INFRASTRUCTURE AS
Why Infrastructure as Code
matters: a short story
“the Enterprise”
Business Engineering Operations
Project A Project B
Project C
Ping!
Value Stream
“Enterprise Projects”
Business Engineering Operations
Project A Project B
Project C
Ping!
Value Stream
Let’s create a
new product
Business Engineering Operations
Project A Project B
Project C
Ping!
Value Stream
We’re going
agile!
CI, TDD
2 weeks
Business Engineering Operations
Project A Project B
Project C
Ping!
Value Stream
Oh crap!
Business Engineering Operations
Project A Project B
Project C
Ping!
Value Stream
Application is working
fine on Test environment
Business Engineering Operations
Project A Project B
Project C
Ping!
Value Stream
We’re ready to go
live!
Business Engineering Operations
Project A Project B
Project C
Ping!
Value Stream
YaY!
Business Engineering Operations
Project A Project B
Project C
Ping!
Value Stream
Oh crap!
Business Engineering Operations
Project A Project B
Project C
Ping!
Value Stream
We need a staging and
production environment
Business Engineering Operations
Project A Project B
Project C
Ping!
Value Stream
Sure but…
Business Engineering Operations
Project A Project B
Project C
Ping!
Value Stream
We need to prepare
those environments
Business Engineering Operations
Project A Project B
Project C
Ping!
Value Stream
It will take 2 weeks
Business Engineering Operations
Project A Project B
Project C
Ping!
Value Stream
Oh crap!Oh crap!
Eventually the environments
are available and ready
but there is a Configuration
mismatch b/w Test, Staging
and Production
Houston, we have a problem!
Business Engineering Operations
Project A Project B
Project C
Ping!
Value Stream
Oh crap!Oh crap! Oh crap!
an additional 2 days to
figure out the configuration
issues
and finally they manage to
deploy the new application
in production
instead of 2 weeks
Final outcome…
4 weeks & 2 days to
production!
Final outcome…
The problem isn’t operations
The problem is lack of
automation
The problem is that they’re
configuring and provisioning
infrastructure manually
a better alternative:
Infrastructure as Code
In this talk, we’ll go through
a real-world example:
We’ll deploy a loadbalancer and 2 droplet
instances on DigitalOcean
with Terraform as our Infrastructure as Code
tool
• I’m Prasant Kumar
• Senior DevOps Architect @
Want a free 10$ credit on
DigitalOcean? Tweet:
#iacwithdoIaC rocks
Slides and Code from this talk:
github.com/prasantk/iac
slideshare.net/prasantk82
Outline
• Infrastructure as Code Introduction
• It’s requirements
• Demo
• Q & A
Infrastructure as Code(IaC) is
about treating infrastructure
as a software system
IaC is the concept of managing
your operations environment
in the same way you do
applications or other code for
general release
IaC itself is not sufficient
IaC needs a
Dynamic Infrastructure Platform
Dynamic Infrastructure Platform
A system that provides computing
resources, particularly servers, storage,
and networking, in a way that they can
be programmatically allocated and
managed.
Characteristics of dynamic infrastructure platform
Programmable:
• a programming API
• good support for
scripting languages
Programmable:
Simple Terraform script that uses the DigitalOcean API
Characteristics of dynamic infrastructure platform
On-Demand:
• allows resources to be
created and destroyed
immediately
• fulfil provisioning
requests within minutes
Characteristics of dynamic infrastructure platform
Self-Service:
• ability to tailor and
customize resources
specific to the needs
• ease of use and flexibility
Characteristics of dynamic infrastructure platform
It’s Demo time!
• Reuse
• Automation
• Version Control
• Testing
• Documentation
• Enable collaboration
IaC Benefits
Business Engineering Operations
Project A Project B
Project C
Ping!
Value Stream
nirvana!nirvana! nirvana!
Q & A

Infrastructure as Code