You are on page 1of 18

TERRAFORM

A U T O M A T I O N O N A W S
CHAPTER #1
Infrastructure as Code
(IaC)
INTRODUCTION
INFRASTRUCTURE AS CODE

the need
The amount of servers used by almost any project is
growing rapidly mostly due to increasing adoption of
cloud technologies. As a result, traditional ways of
managing IT infrastructure become less and less
relevant.

The manual approach is not going to work any more,


specially when we're talking about hundreds of
servers. Doing anything by hand is definitely not going
to play out well.
INTRODUCTION
INFRASTRUCTURE AS CODE

the need
And not only servers, of course. Every cloud provider
gives extra services on top, be it a virtual networking
service, object storage, or a monitoring solution,
which you don't need to maintain yourself. These
services function that a Software as a Service (SaaS).

Companies of any size, from small start-ups to huge


enterprises, are adopting new techniques and tools to
manage and automate their infrastructures. These
techniques eventually got a new name: Infrastructure
as Code (IaC).
INTRODUCTION
INFRASTRUCTURE AS CODE

the need
Dated something 2009, the Infrastructure as Code
term is all about approaching your IT infrastructure
tasks the same way you develop software. This
includes the things similar to the following:

#1 Heavy use of source control to store all


infrastructure related code

#2 Collaboration on this code in the same fashion as


applications are developed
INTRODUCTION
INFRASTRUCTURE AS CODE

the need
#3 Using unit and integration testing and even
applying Test-driven development to infrastructure
code

#4 Introducing continuous integration and continuous


delivery to test and release infrastructure code
INTRODUCTION
INFRASTRUCTURE AS CODE

the need
Infrastructure as Code is a foundation for DevOps
culture because both operations and developers
approach their work in the same way, and by following
the principles laid outbefore, they already have some
common ground.

Introduction of Infrastructure as Code requires new


kinds of tools.
Infrastructure as Code
in Cloud
IaC in cloud
Servers are only one part of infrastructure. With cloud
platforms such as Amazon Web Services (AWS), Google
Cloud Platform, and OpenStack advancing more and
more, there is an increased need for automating and
streamlining the way people work with the services
these platforms provide.

When uou rely heavily on at least one cloud provider


for major parts of your project, you will start meeting
challenges in applying consistent patterns of their
usage.
IaC in cloud
There are strong chances that you would want these
patterns to be written once & then applied
automatically. Even more, you need to be able to
reproduce every action and test the result of it,
following the Infrastructure as Code principles.

Else, working with cloud providers will either end up in


so-called ClickOps, where you work with infrastructure
primarily by clicking buttons in the web interface of a
cloud provider, or you will script all the processes by
using APIs of this provider directly. Even if scripting
APIs sounds like a big step towards true Infrastructure
as Code, you can achieve much more using existing
tools for this exact task.
IaC in cloud
There is a certain need for a configuration tool that
operates one level higher than a setup of a single
server; a tool that would allow writing a blueprint that
would define all of the high level pieces at once:
servers, cloud services, and even external SaaS
products.

A tool like thisis called given a different name:


infrastructure orchestrator, infrastructure provisioner,
infrastructure templating, and so on. No matter what
you call it, at some point in time, your infrastructure
will really need it.
IaC in cloud
TERRAFORM
OVERVIEW
TERRAFORM

Terraform is an open source


utility, created by the HashiCorp
company, the same company
that created Vagrant, Packer,
Consul, and other popular
infrastructure tools.

It was initially released in July


2014, and since then, has come a
long way to become one of the
most important tools for
infrastructure provisioning and
management.
FEATURES
TERRAFORM

30 hcl agnostic
SUPPORTS SPECIAL ALLOWS
30 DIFFERENT CONFIGURATION YOU TO USE MULTIPLE
PROVIDERS LANGUAGE TO PROVIDERS IN A
INCL. AWS, GOOGLE, DECLARE SINGLE TEMPLATE
AZURE ETC INFRASTRUCTURE
IN SIMPLE TEXT FILES
- HASHICORP
CONFIGURATION
LANGUAAGE
FEATURES
TERRAFORM

delta plugins graph


KEEPS TRACK OF THE EASILY EXTENDABLE IMPLEMENTS A
CURRENT STATE OF WITH PLUGINS, COMPLEX GRAPH
THE INFRASTRUCTURE WHICH SHOULD BE LOGIC, WHICH
IT CREATED AND WRITTEN IN THE GO ALLOWS YOU TO
APPLIES DELTA PROGRAMMING RESOLVE
CHANGES WHEN LANGUAGE DEPENDENCIES,
SOMETHING NEEDS TO INTELLIGIBILITY AND
BE UPDATED, ADDED, RELIABILITY
OR DELETED
QUESTIONS

You might also like