Terraform 101
What’s Infrastructure as Code?
A true story
You are developing a new API
Need an EC2 instance
Easy work - 7 steps
‧ ‧ ‧
humm, time to googling...
Terraform 101: What's infrastructure as code?
Terraform 101: What's infrastructure as code?
After 2 hours of googling...
Terraform 101: What's infrastructure as code?
Need an ELB
Terraform 101: What's infrastructure as code?
Eventually you will get everything work
2 month later
You are releasing the new API to production
‧‧‧‧‧
Agenda
● What is Infrastructure as Code? (IaC)
● History of IaC
● Why IaC?
What is Infrastructure as Code
The process of managing and provisioning computer data centers through
machine-readable definition files.
Rather than physical hardware configuration or interactive configuration tools.
What is Infrastructure as Code - blueprint
What is Infrastructure as Code - 3D printer
History of IaC - the idea
In 2006 specifically, new challenges were brought to the forefront that shook the
technology industry.
The launch of AWS EC2 and the 1.0 version of Ruby on Rails just months before.
With new tools emerging to handle this ever growing field, the idea of Infrastructure
as Code was born.
History of IaC - Continuous Configuration Automation (CCA)
● CFEngine (1993)
● Puppet (2005)
● Chef (2009)
● SaltStack (2011)
● Ansible (2012)
● Otter (2016?)
History of IaC - timeline
● 2011-02-25: Initial release of CloudFormation (AWS)
● 2014-07-28: Initial release of Terraform (HashiCorp)
Why IaC? - value
● Cost (reduction)
● Speed (faster execution)
● Risk (remove errors and security violations)
Why IaC? - cost & speed
● Reduce time costs
○ Change it rapidly
○ Rollback
○ Repeatable (modulize)
● Readability
○ Code as documentation
○ Graph
Why IaC? - risk
● Reduce human error
○ Code review
○ Version control
○ Plan (dry run)
Why IaC? - use cases
● Create different stages
○ test
○ stag
○ prod
● Create similar resources
○ API: EC2 instance group with ELB
○ Thirdparty S3 bucket
○ CloudFront
○ IAM Users
Why IaC - create different stage
● $ ENV=test terraform apply
● $ ENV=stag terraform apply
● $ ENV=prod terraform apply
Why IaC - create infra in different region
● $ AWS_REGION=us-east-1 ENV=prod terraform apply
● $ AWS_REGION=ap-northeast-1 ENV=prod terraform apply
Why IaC - create similar resources
module "kktv-drm" {
source = "./modules/ec2_asg"
name = "kktv-test-drm"
env = "test"
ami = "ami-xxxxxxxx"
instance_type = "t2.medium"
}
Why IaC - create similar resources
module "iam_user_maniacchou" {
source = "./modules/user"
name = "maniacchou"
}
Why IaC - diff
Why not IaC
● Learning curve
○ You need best practice
● It’s not panacea (帕那刻亞)
○ Resource not supported yet
○ Resource cannot be managed
Conclusion
● Agile
● Reduce human error
● Verison control
Live demo?
QA

More Related Content

PDF
Terraform 101
PPTX
Transforming Infrastructure into Code - Importing existing cloud resources u...
PDF
Scaling i/o bound Microservices
PDF
DockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaS
PDF
The 2nd half. Scaling to the next^2
PDF
Container Days Boston - Kubernetes in production
PPTX
TIAD 2016 : Migrating 100% of your production services to containers
PDF
Homer - Workshop at Kamailio World 2017
Terraform 101
Transforming Infrastructure into Code - Importing existing cloud resources u...
Scaling i/o bound Microservices
DockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaS
The 2nd half. Scaling to the next^2
Container Days Boston - Kubernetes in production
TIAD 2016 : Migrating 100% of your production services to containers
Homer - Workshop at Kamailio World 2017

What's hot (20)

PDF
Docker Basics & Alfresco Content Services
PDF
Delivering Go.CD with Terraform and Docker
PDF
Terraform 101
PDF
jbang: Unleash the power of Java for shell scripting
PDF
DockerCon EU 2015: Trading Bitcoin with Docker
PDF
TIAD 2016 : Using and abusing container metadata
PPTX
Docker Security workshop slides
PDF
Building kubectl plugins with Quarkus | DevNation Tech Talk
PDF
The Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
PDF
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
ODP
devops@cineca
PDF
CI / CD / CS - Continuous Security in Kubernetes
PDF
Discovering Docker Volume Plugins and Apps using VirtualBox
PPTX
Tectonic Summit 2016: The Origins of Kubernetes
PDF
Online Meetup: Why should container system / platform builders care about con...
PPTX
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
PDF
Whats all the FaaS About
PDF
Case Study: Using Terraform and Packer to deploy go applications to AWS
PDF
Kubernetes 101 and Fun
PPTX
Docker for PHP Developers - ZendCon 2016
Docker Basics & Alfresco Content Services
Delivering Go.CD with Terraform and Docker
Terraform 101
jbang: Unleash the power of Java for shell scripting
DockerCon EU 2015: Trading Bitcoin with Docker
TIAD 2016 : Using and abusing container metadata
Docker Security workshop slides
Building kubectl plugins with Quarkus | DevNation Tech Talk
The Golden Ticket: Docker and High Security Microservices by Aaron Grattafiori
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
devops@cineca
CI / CD / CS - Continuous Security in Kubernetes
Discovering Docker Volume Plugins and Apps using VirtualBox
Tectonic Summit 2016: The Origins of Kubernetes
Online Meetup: Why should container system / platform builders care about con...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Whats all the FaaS About
Case Study: Using Terraform and Packer to deploy go applications to AWS
Kubernetes 101 and Fun
Docker for PHP Developers - ZendCon 2016

Similar to Terraform 101: What's infrastructure as code? (20)

PDF
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
PDF
LCU14 310- Cisco ODP v2
PDF
Latency, Throughput & Fault Tolerance: Designing the Arroyo Streaming Engine ...
PDF
CDK Meetup: Rule the World through IaC
PDF
Making Service Deployments to AWS a breeze with Nova
PDF
Building a Data Pipeline using Apache Airflow (on AWS / GCP)
PDF
Unifying Frontend and Backend Development with Scala - ScalaCon 2021
PDF
Introducing TiDB Operator [Cologne, Germany]
PPT
KSCOPE 2013: Exadata Consolidation Success Story
PDF
Bandwidth: Use Cases for Elastic Cloud on Kubernetes
PDF
Intro to creating kubernetes operators
PPTX
AMIS Oracle OpenWorld 2015 Review – part 4- PaaS Application Development, Jav...
PDF
Déploiement dynamique d'applications OSGi sur le Cloud
PDF
Red Hat Java Update and Quarkus Introduction
PDF
Apache Spark Streaming in K8s with ArgoCD & Spark Operator
PDF
Benchx: An XQuery benchmarking web application
PPTX
Profiling & Testing with Spark
PDF
Google Cloud Dataflow
PDF
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
PDF
Functional APIs with Absinthe GraphQL
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
LCU14 310- Cisco ODP v2
Latency, Throughput & Fault Tolerance: Designing the Arroyo Streaming Engine ...
CDK Meetup: Rule the World through IaC
Making Service Deployments to AWS a breeze with Nova
Building a Data Pipeline using Apache Airflow (on AWS / GCP)
Unifying Frontend and Backend Development with Scala - ScalaCon 2021
Introducing TiDB Operator [Cologne, Germany]
KSCOPE 2013: Exadata Consolidation Success Story
Bandwidth: Use Cases for Elastic Cloud on Kubernetes
Intro to creating kubernetes operators
AMIS Oracle OpenWorld 2015 Review – part 4- PaaS Application Development, Jav...
Déploiement dynamique d'applications OSGi sur le Cloud
Red Hat Java Update and Quarkus Introduction
Apache Spark Streaming in K8s with ArgoCD & Spark Operator
Benchx: An XQuery benchmarking web application
Profiling & Testing with Spark
Google Cloud Dataflow
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
Functional APIs with Absinthe GraphQL

Recently uploaded (20)

PPT
Basics Of Pump types, Details, and working principles.
PPTX
CC PPTS unit-I PPT Notes of Cloud Computing
PPTX
non conventional energy resorses material unit-1
PDF
ITEC 1010 - Information and Organizations Database System and Big data
PPTX
22ME926Introduction to Business Intelligence and Analytics, Advanced Integrat...
PPT
Module_1_Lecture_1_Introduction_To_Automation_In_Production_Systems2023.ppt
PDF
1.-fincantieri-investor-presentation2.pdf
PPTX
quantum theory on the next future in.pptx
PPTX
240409 Data Center Training Programs by Uptime Institute (Drafting).pptx
PPTX
MODULE 02 - CLOUD COMPUTING-Virtual Machines and Virtualization of Clusters a...
PDF
B461227.pdf American Journal of Multidisciplinary Research and Review
PDF
BBC NW_Tech Facilities_30 Odd Yrs Ago [J].pdf
PPTX
module 2 renewable energy power plant.pptx
PDF
Traditional Programming vs Machine learning and Models in Machine Learning
PPTX
highway-150803160405-lva1-app6891 (1).pptx
PDF
Application of smart robotics in the supply chain
DOCX
web lab manual for fifth semester BE course fifth semester vtu belgaum
PPTX
Cloud Security and Privacy-Module-2a.pptx
PDF
CBCN cam bien cong nghiep bach khoa da năng
PPTX
Research Writing, Mechanical Engineering
Basics Of Pump types, Details, and working principles.
CC PPTS unit-I PPT Notes of Cloud Computing
non conventional energy resorses material unit-1
ITEC 1010 - Information and Organizations Database System and Big data
22ME926Introduction to Business Intelligence and Analytics, Advanced Integrat...
Module_1_Lecture_1_Introduction_To_Automation_In_Production_Systems2023.ppt
1.-fincantieri-investor-presentation2.pdf
quantum theory on the next future in.pptx
240409 Data Center Training Programs by Uptime Institute (Drafting).pptx
MODULE 02 - CLOUD COMPUTING-Virtual Machines and Virtualization of Clusters a...
B461227.pdf American Journal of Multidisciplinary Research and Review
BBC NW_Tech Facilities_30 Odd Yrs Ago [J].pdf
module 2 renewable energy power plant.pptx
Traditional Programming vs Machine learning and Models in Machine Learning
highway-150803160405-lva1-app6891 (1).pptx
Application of smart robotics in the supply chain
web lab manual for fifth semester BE course fifth semester vtu belgaum
Cloud Security and Privacy-Module-2a.pptx
CBCN cam bien cong nghiep bach khoa da năng
Research Writing, Mechanical Engineering

Terraform 101: What's infrastructure as code?

  • 3. You are developing a new API
  • 4. Need an EC2 instance
  • 5. Easy work - 7 steps
  • 7. humm, time to googling...
  • 10. After 2 hours of googling...
  • 14. Eventually you will get everything work
  • 16. You are releasing the new API to production
  • 18. Agenda ● What is Infrastructure as Code? (IaC) ● History of IaC ● Why IaC?
  • 19. What is Infrastructure as Code The process of managing and provisioning computer data centers through machine-readable definition files. Rather than physical hardware configuration or interactive configuration tools.
  • 20. What is Infrastructure as Code - blueprint
  • 21. What is Infrastructure as Code - 3D printer
  • 22. History of IaC - the idea In 2006 specifically, new challenges were brought to the forefront that shook the technology industry. The launch of AWS EC2 and the 1.0 version of Ruby on Rails just months before. With new tools emerging to handle this ever growing field, the idea of Infrastructure as Code was born.
  • 23. History of IaC - Continuous Configuration Automation (CCA) ● CFEngine (1993) ● Puppet (2005) ● Chef (2009) ● SaltStack (2011) ● Ansible (2012) ● Otter (2016?)
  • 24. History of IaC - timeline ● 2011-02-25: Initial release of CloudFormation (AWS) ● 2014-07-28: Initial release of Terraform (HashiCorp)
  • 25. Why IaC? - value ● Cost (reduction) ● Speed (faster execution) ● Risk (remove errors and security violations)
  • 26. Why IaC? - cost & speed ● Reduce time costs ○ Change it rapidly ○ Rollback ○ Repeatable (modulize) ● Readability ○ Code as documentation ○ Graph
  • 27. Why IaC? - risk ● Reduce human error ○ Code review ○ Version control ○ Plan (dry run)
  • 28. Why IaC? - use cases ● Create different stages ○ test ○ stag ○ prod ● Create similar resources ○ API: EC2 instance group with ELB ○ Thirdparty S3 bucket ○ CloudFront ○ IAM Users
  • 29. Why IaC - create different stage ● $ ENV=test terraform apply ● $ ENV=stag terraform apply ● $ ENV=prod terraform apply
  • 30. Why IaC - create infra in different region ● $ AWS_REGION=us-east-1 ENV=prod terraform apply ● $ AWS_REGION=ap-northeast-1 ENV=prod terraform apply
  • 31. Why IaC - create similar resources module "kktv-drm" { source = "./modules/ec2_asg" name = "kktv-test-drm" env = "test" ami = "ami-xxxxxxxx" instance_type = "t2.medium" }
  • 32. Why IaC - create similar resources module "iam_user_maniacchou" { source = "./modules/user" name = "maniacchou" }
  • 33. Why IaC - diff
  • 34. Why not IaC ● Learning curve ○ You need best practice ● It’s not panacea (帕那刻亞) ○ Resource not supported yet ○ Resource cannot be managed
  • 35. Conclusion ● Agile ● Reduce human error ● Verison control
  • 37. QA