Successfully reported this slideshow.
Your SlideShare is downloading. ×

Introduce to Terraform

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
Terraform introduction
Terraform introduction
Loading in …3
×

Check these out next

1 of 69 Ad

More Related Content

Slideshows for you (20)

Similar to Introduce to Terraform (20)

Advertisement

Recently uploaded (20)

Introduce to Terraform

  1. 1. Introduction to Terraform: IaC Jay Kim Nov 28, 2019 class 101 101.1 What is Terraform? 101.2 Key Features of Terraform 101.3 Pros and Cons 101.4 Providers 101.5 Basic of Infrastructure 101.6 Getting Started
  2. 2. Samsung Electronics, Staff Engineer Global Service Reliability Engineer Jay Kim class 101
  3. 3. class 101 101.1 What is Terraform?
  4. 4. class 101 101.1 What is Terraform? Use Infrastructure as Code(IaC) to provision and manage any cloud, infrastructure, or service
  5. 5. class 101 101.1 What is Terraform? Terraform Infrastructure creation DEV STG Prod Use Infrastructure as Code(IaC) to provision and manage any cloud, infrastructure, or service
  6. 6. class 101 101.1 What is Terraform? Use Infrastructure as Code(IaC) to provision and manage any cloud, infrastructure, or service
  7. 7. class 101 101.1 What is Terraform? HCL (Hashicorp Configuration Language (HCL)) Use Infrastructure as Code(IaC) to provision and manage any cloud, infrastructure, or service
  8. 8. class 101 101.1 What is Terraform?
  9. 9. class 101 101.1 What is Terraform?
  10. 10. class 101 101.1 What is Terraform?
  11. 11. class 101 101.1 What is Terraform?
  12. 12. class 101 101.1 What is Terraform?
  13. 13. class 101 101.1 What is Terraform?
  14. 14. class 101 101.1 What is Terraform? Armon Dadgar(24) co-founder and CTO Mitchell Hashimoto(26) co-founder and CEO
  15. 15. class 101 101.1 What is Terraform? Armon Dadgar(24) co-founder and CTO Mitchell Hashimoto(26) co-founder and CEO
  16. 16. class 101 101.1 What is Terraform? Armon Dadgar(24) co-founder and CTO http://mitchellh.com/automation-obsessed Mitchell Hashimoto(26) co-founder and CEO
  17. 17. class 101 101.1 What is Terraform? Mitchell Hashimoto(26) co-founder and CEO http://mitchellh.com/automation-obsessed
  18. 18. class 101 101.1 What is Terraform? Terraform is, the result of “Engineering Thinking” Do Coding For Everything (Automation) Summary
  19. 19. class 101 101.2 Key Features of Terraform
  20. 20. class 101 101.2 Key Features of Terraform
  21. 21. class 101 101.2 Key Features of Terraform
  22. 22. class 101 101.2 Key Features of Terraform
  23. 23. class 101 101.2 Key Features of Terraform
  24. 24. class 101 101.2 Key Features of Terraform
  25. 25. class 101 101.2 Key Features of Terraform These features are very similar with
  26. 26. class 101 101.2 Key Features of Terraform These features are very similar with React
  27. 27. class 101 101.2 Key Features of Terraform Terraform is an infrastructure provisioning tool but the concepts aren’t only for SysOps Engineer.
  28. 28. class 101 101.2 Key Features of Terraform *.examples of declarative
  29. 29. class 101 101.2 Key Features of Terraform
  30. 30. class 101 101.2 Key Features of Terraform
  31. 31. class 101 101.2 Key Features of Terraform
  32. 32. class 101 101.2 Key Features of Terraform
  33. 33. class 101 101.2 Key Features of Terraform
  34. 34. class 101 101.2 Key Features of Terraform
  35. 35. class 101 101.2 Key Features of Terraform These features are very similar with
  36. 36. class 101 101.2 Key Features of Terraform These features are very similar with React
  37. 37. class 101 101.2 Key Features of Terraform Terraform is an infrastructure provisioning tool but the concepts aren’t only for SysOps Engineer. Summary
  38. 38. class 101 101.2 Key Features of Terraform *.examples of declarative
  39. 39. class 101 101.3 Pros and Cons
  40. 40. class 101 101.3 Pros and Cons Pros Cons Problem Solving w/Engineer’s way Reusable Resources Productivity High Entry Barrier (Especially, non-coder) Reduce Human Error Everyone Should do Terraform Difficult to train Difficult to design
  41. 41. class 101 101.4 Providers
  42. 42. class 101 major cloud 101.4 Providers
  43. 43. class 101 major cloud Infrastructure Software VCS Monitoring & System Management 101.4 Providers
  44. 44. class 101 Community 101.4 Providers
  45. 45. class 101 101.4 Providers Summary Code For Everything Not only for the infrastructure
  46. 46. class 101 101.5 Basic Infrastructure
  47. 47. class 101 101.5 Basic of Infrastructure Customer Mobile App Web Browser WebServer Backend LB LB LB DB VPC
  48. 48. class 101 101.5 Basic of Infrastructure Customer Mobile App Web Browser DB WebServer Backend LB LB LB Public Subnet Private Subnet DB Subnet VPC
  49. 49. class 101 101.5 Basic of Infrastructure Customer Mobile App Web Browser DB WebServer Backend LB LB LB Public Subnet Private Subnet DB Subnet IGW NAT Internet VPC
  50. 50. class 101 101.6 Getting Started
  51. 51. class 101 101.6 Getting Started DEMO Public Subnet Private Subnet DB Subnet IGW NAT Internet VPC
  52. 52. class 101 101.6 Getting Started Terraform Install https://www.terraform.io/downloads.html After download the package, $ mv terraform terraform_v0.12.0 $ mv terraform_v0.12.0 /usr/local/bin/terraform_v0.12.0 $ ln -s /usr/local/bin/terraform_v0.12.0 /usr/local/bin/tf
  53. 53. class 101 101.6 Getting Started HCL(Hashicorp Configuration Language) 1. Providers 2. Resources 3. Input Variables. (TBD) 4. Output Values. (TBD) 5. Local Values 6. Modules. (TBD) 7. Data Sources (TBD) 8. Functions(Interpolation). (TBD) 9. State (TBD) 10.Backend (TBD) Commands 1. Init 2. plan (w/target) 3. apply 4. destroy
  54. 54. class 101 101.6 Getting Started DEMO Public Subnet Private Subnet DB Subnet IGW NAT Internet VPC
  55. 55. class 101 101.6 Getting Started 2. AWS Profile Setup 1. AWS Programmable Key Creation AWS Admin Console -> User -> Security Credentials -> Access Keys -> Create access key $ vi ~/.aws/credentials [dev] aws_access_key_id={{ access_key }} aws_secret_access_key={{ secret_access_key }} DEMO
  56. 56. class 101 101.6 Getting Started 3. TF Demo Folder Creation 4. aws.tf file creation 5. Search “terraform was provider” in Google DEMO
  57. 57. class 101 101.6 Getting Started 6. Copy & Paste 7. Add profile = “dev" DEMO
  58. 58. class 101 101.6 Getting Started 8. “tf init” DEMO
  59. 59. class 101 101.6 Getting Started 9. Search “terraform aws vpc” in google DEMO
  60. 60. class 101 101.6 Getting Started 9. Search “terraform aws vpc” in google DEMO
  61. 61. class 101 101.6 Getting Started 9. Search “terraform aws vpc” in google DEMO
  62. 62. class 101 101.6 Getting Started 10. create “vpc.tf” file DEMO
  63. 63. class 101 101.6 Getting Started 11. Execute “tf plan” DEMO
  64. 64. class 101 101.6 Getting Started DEMO 11. Execute “tf apply” 12. Checking “VPC Creation” in AWS Console
  65. 65. class 101 101.6 Getting Started 13. Change “Name” Tag Value & “tf plan” & “tf apply” 14. Checking the “VPC Name Change” on AWS Console 15. Add “local” variable DEMO
  66. 66. class 101 101.6 Getting Started 16. Search “terraform aws subnet” DEMO 17.Add “aws_subnet” “private”, “public”, “db” with cidrs
  67. 67. class 101 101.6 Getting Started DEMO 17.Add “aws_subnet” “private”, “public”, “db” with cidrs * Interpolation Warning ${aws_vpc.main.id} Terraform Version < 0.12.x aws_vpc.main.id Terraform Version > 0.12.x 18.plan / apply
  68. 68. class 101 101.6 Getting Started DEMO 19. igw, route table, nat, nat_eip
  69. 69. class 101 101.6 Getting Started DEMO 19. igw, route table, nat, nat_eip

×