SlideShare a Scribd company logo
Immutable
Infrastructure with
Terraform
- Prashant Kalkar & Rahul Baphana
(Expert Talk - Pune - 9 June 2017)
1.
DevOps Journey
Limited hardware, manually managed.
On Premise Hardware
» Limited hardware
» Configured generally once.
» Long running.
» Servers might not look identical.
» Change propagation requires changes in all the
server instances.
» Manageable with small no of servers.
On-Prem Hardware
» Client Server Architecture
» Easy to propagate
configuration changes.
» Instances mostly look
identical.
» Long running server.
» Can face issues of
Configuration drift.
Configuration Management Tools
1.1
Rise of Clouds
» Elastic
» Disposable resources.
» On-demand
» Cost effective
Cloud properties
» Infrastructure Provisioning.
» Configuration of new
instances.
» Delays at server runtime for
server configuration.
» Possible failure of server
configuration at runtime.
Challenges in the Cloud
2
Immutable Infrastructure
Machine Image /
Container
Ubuntu
Chef / Puppet
client
Manages
EC2 Instances
Configuration
Management Tool
App artifact
Java
Tomcat
Logstash client
Mutable Infrastructure
Machine Image /
Container
Ubuntu
Server Templating Tools App artifact
Java
Tomcat
Logstash client
EC2 Instances
Chef / Puppet
client
Manages
EC2 Instances
Configuration
Management Tool
App artifact
Java
Tomcat
Logstash client
Immutable Infrastructure
3
Terraform
» Declarative style for infrastructure as code
» Supports multiple cloud providers
» Easier to adopt for new teams
» Open source
» Under active development
Why Terraform
3.1
Terraform Demo
» Sample web app on EC2 instance
» AMI for spring-boot-app
Demo
» No client-server
» Terraform tfstate (show command)
» Resource dependency & Parallel Execution
» Terraform failures
» Incremental changes
» Non-managed infrastructure is invisible to Terraform
How Terraform is working?
» Remote state
» State locking
» Practices :
⋄ Use centralise server to apply Infrastructure changes
⋄ Always apply Terraform on a pushed code base
⋄ Branches or no branches?
Using Terraform in a team
» Rolling deployments
» Output variables
Demo
Launch
Config-1
Rolling
Deployment
Launch
Config-1
Launch
Config-2
Rolling
Deployment
Launch
Config-2
Rolling
Deployment
» Supporting multiple environments
⋄ Per environment tfstate (recommended)
⋄ Keep state as minimum as possible
⋄ Read only state
⋄ Use profiles
Demo
» Using modules to dry out Terraform code
⋄ Relative modules
⋄ Terraform Variables
⋄ Modules with versions
Demo
THANKS!
Any questions?

More Related Content

PPTX
AWS ECS workshop
PPTX
Training And Serving ML Model Using Kubeflow by Jayesh Sharma
PDF
Kubernetes Helm (Boulder Kubernetes Meetup, June 2016)
PDF
Containerised ASP.NET Core apps with Kubernetes
PPTX
Setup Kubernetes Cluster On AWS Using KOPS
PPTX
Autoscaling with Kubernetes
PPTX
Container management with docker & kubernetes
PDF
Helm chart-introduction
AWS ECS workshop
Training And Serving ML Model Using Kubeflow by Jayesh Sharma
Kubernetes Helm (Boulder Kubernetes Meetup, June 2016)
Containerised ASP.NET Core apps with Kubernetes
Setup Kubernetes Cluster On AWS Using KOPS
Autoscaling with Kubernetes
Container management with docker & kubernetes
Helm chart-introduction

What's hot (18)

PPTX
Autoscaling on Kubernetes
PDF
LocalSocial, Dial2Do and the Cloud
PDF
Azure kubernetes service (aks) part 3
PDF
1. CNCF kubernetes meetup - Ondrej Sika
PPTX
Serverless on Kubernetes
PDF
Using Serverless Architectures to build and provision modern infrastructures​
PPTX
Spark with kubernates
PPTX
CNCF Rajkot group- Know the magic of kubernetes with AWS EKS
PDF
KubeCon 2018 - Running VM Workloads Side by Side with Container Workloads
PDF
Continuous Delivery for Kubernetes Apps with Helm and ChartMuseum
PDF
Helm summit 2019_handling large number of charts_sept 10
PPTX
kubernates and micro-services
PDF
Navigating in the sea of containers in azure when to choose which service and...
PDF
Kubernets Helm - Okay so my cluster's up, how do I manage all the sh*t to run...
PPTX
How we Auto Scale applications based on CPU with Kubernetes at M6Web?
PPTX
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress
PDF
Kubeflow control plane
PDF
AWS Connect 2017 - Container (feat. AWS)
Autoscaling on Kubernetes
LocalSocial, Dial2Do and the Cloud
Azure kubernetes service (aks) part 3
1. CNCF kubernetes meetup - Ondrej Sika
Serverless on Kubernetes
Using Serverless Architectures to build and provision modern infrastructures​
Spark with kubernates
CNCF Rajkot group- Know the magic of kubernetes with AWS EKS
KubeCon 2018 - Running VM Workloads Side by Side with Container Workloads
Continuous Delivery for Kubernetes Apps with Helm and ChartMuseum
Helm summit 2019_handling large number of charts_sept 10
kubernates and micro-services
Navigating in the sea of containers in azure when to choose which service and...
Kubernets Helm - Okay so my cluster's up, how do I manage all the sh*t to run...
How we Auto Scale applications based on CPU with Kubernetes at M6Web?
Surati Tech Talks 2022 / Build reliable Svelte applications using Cypress
Kubeflow control plane
AWS Connect 2017 - Container (feat. AWS)
Ad

Similar to Immutable infrastructure with Terraform (20)

PPTX
To Build My Own Cloud with Blackjack…
PDF
seven-ways-to-run-flink-on-aws.pdf
PPTX
Tech4Africa 2014
PPTX
Containerization - The DevOps Revolution
PDF
Managing Infrastructure as Code
PDF
Designing Stateful Apps for Cloud and Kubernetes
PPTX
Effective terraform
PPTX
Azure basics
PDF
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing Environment
PPTX
Infrastructure as Code - Getting Started, Concepts & Tools
PPTX
Scaling a MeteorJS SaaS app on AWS
PPTX
London Hashicorp Meetup #22 - Congruent infrastructure @zopa by Ben Coughlan
PPTX
Cloud computing 3702
PDF
Know More About Rational Performance - Snehamoy K
PDF
3 know more_about_rational_performance_tester_8-1-snehamoy_k
 
PPT
XPages Performance
PPTX
Cluj.DevOps Meetup - Code your Infrastructure
PDF
Puppet devops wdec
PPTX
Infrastructure Automation with Chef & Ansible
PDF
Phoenix for Rubyists
To Build My Own Cloud with Blackjack…
seven-ways-to-run-flink-on-aws.pdf
Tech4Africa 2014
Containerization - The DevOps Revolution
Managing Infrastructure as Code
Designing Stateful Apps for Cloud and Kubernetes
Effective terraform
Azure basics
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing Environment
Infrastructure as Code - Getting Started, Concepts & Tools
Scaling a MeteorJS SaaS app on AWS
London Hashicorp Meetup #22 - Congruent infrastructure @zopa by Ben Coughlan
Cloud computing 3702
Know More About Rational Performance - Snehamoy K
3 know more_about_rational_performance_tester_8-1-snehamoy_k
 
XPages Performance
Cluj.DevOps Meetup - Code your Infrastructure
Puppet devops wdec
Infrastructure Automation with Chef & Ansible
Phoenix for Rubyists
Ad

More from Prashant Kalkar (9)

PPTX
Best practices for Highly available apps on k8s.pptx
PPTX
Design principles to modularise a monolith codebase.pptx
PDF
GDCR 2022.pptx.pdf
PPTX
Exploring the flow of network traffic through kubernetes cluster.pptx
PPTX
Uncover the mysteries of infrastructure as code (iac)!
PPTX
Microservices testing consumer driven contracts using pact
PPTX
Hibernate
PPTX
Functional programming
PDF
Functional programming ii
Best practices for Highly available apps on k8s.pptx
Design principles to modularise a monolith codebase.pptx
GDCR 2022.pptx.pdf
Exploring the flow of network traffic through kubernetes cluster.pptx
Uncover the mysteries of infrastructure as code (iac)!
Microservices testing consumer driven contracts using pact
Hibernate
Functional programming
Functional programming ii

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPT
Teaching material agriculture food technology
PPTX
Cloud computing and distributed systems.
PDF
KodekX | Application Modernization Development
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Approach and Philosophy of On baking technology
Unlocking AI with Model Context Protocol (MCP)
NewMind AI Weekly Chronicles - August'25 Week I
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
“AI and Expert System Decision Support & Business Intelligence Systems”
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Teaching material agriculture food technology
Cloud computing and distributed systems.
KodekX | Application Modernization Development
The AUB Centre for AI in Media Proposal.docx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Diabetes mellitus diagnosis method based random forest with bat algorithm
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
MYSQL Presentation for SQL database connectivity
Empathic Computing: Creating Shared Understanding
Understanding_Digital_Forensics_Presentation.pptx
Approach and Philosophy of On baking technology

Immutable infrastructure with Terraform

Editor's Notes

  • #4: Limited hardware They are generally configured once with required applications. Once created test to use them for long period of time. Long running servers - Need to keep them running. Instances might not look identical.
  • #16: Simple instance without name Add name incrementally Add security group
  • #17: Failures : Availability zone failure in demo 03
  • #19: Environments
  • #23: Demo for variables Environment tfstate
  • #24: Modules in Environments