Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Terraform - Overview

Seth Vargo
January 21, 2015

Terraform - Overview

This talk is a very high-level overview of the making and purpose of Terraform by HashiCorp.

Seth Vargo

January 21, 2015
Tweet

More Decks by Seth Vargo

Other Decks in Technology

Transcript

  1. How  do  I  provision  resources?          

       compute?              storage?              network?
  2. RISING DATACENTER COMPLEXITY DC VM VM VM VM VM VM

    VM VM VM VM VM VM VM VM VM VM C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C
  3. RISING DATACENTER COMPLEXITY DC-01 DC-02 VM VM VM VM VM

    VM VM VM C C C C C C C C C C C C C C C C C C C C C C C C
  4. h-ps:/ / d250n10lsq5j8r.cloudfront.n et/assets/atlas/runAme-­‐ develop-­‐icon-­‐color-­‐ ebf4ccf5f2ca3513e495bccb e9320d45.png Consistent Shareable Readily

    Available High production 
 parity h-ps:/ / d250n10lsq5j8r.cloudfront.n et/assets/atlas/runAme-­‐ deploy-­‐icon-­‐ color-­‐1c39f618b3b5ead204 dda4646bb2410e.png Start and configure servers / services Deploy and run application Update servers or applications Reconfigure, feature flag Monitor health Orchestrate complex changes DEVELOP DEPLOY MAINTAIN
  5. h-ps:/ / d250n10lsq5j8r.cloudfront.n et/assets/atlas/runAme-­‐ develop-­‐icon-­‐color-­‐ ebf4ccf5f2ca3513e495bccb e9320d45.png h-ps:/ / d250n10lsq5j8r.cloudfront.n

    et/assets/atlas/runAme-­‐ deploy-­‐icon-­‐ color-­‐1c39f618b3b5ead204 dda4646bb2410e.png DEVELOP DEPLOY MAINTAIN
  6. DIGITAL OCEAN DROPLET WITH DNS USING DNS SIMPLE resource "digitalocean_droplet"

    "web" { name = "tf-web" size = "512mb" image = "centos-5-8-x32" region = "sfo1" } resource "dnsimple_record" "hello" { domain = "example.com" name = "test" value = "${digitalocean_droplet.web.ipv4_address}" type = "A" }
  7. DIGITAL OCEAN DROPLET WITH DNS USING DNS SIMPLE resource "digitalocean_droplet"

    "web" { name = "tf-web" size = "512mb" image = "centos-5-8-x32" region = "sfo1" } resource "dnsimple_record" "hello" { domain = "example.com" name = "test" value = "${digitalocean_droplet.web.ipv4_address}" type = "A" }
  8. DIGITAL OCEAN DROPLET WITH DNS USING DNS SIMPLE resource "digitalocean_droplet"

    "web" { name = "tf-web" size = "512mb" image = "centos-5-8-x32" region = "sfo1" } resource "dnsimple_record" "hello" { domain = "example.com" name = "test" value = "${digitalocean_droplet.web.ipv4_address}" type = "A" }
  9. DIGITAL OCEAN DROPLET WITH DNS USING DNS SIMPLE resource "digitalocean_droplet"

    "web" { name = "tf-web" size = "512mb" image = "centos-5-8-x32" region = "sfo1" } resource "dnsimple_record" "hello" { domain = "example.com" name = "test" value = "${digitalocean_droplet.web.ipv4_address}" type = "A" }
  10. C C C C C C VM VM VM IAAS

    (OpenStack, etc) PHYSICAL "LAYER CAKE" PROVIDER PER LAYER UNIFIED CONFIGURATION
  11. $ terraform plan + digitalocean_droplet.web backups: "" => "<computed>" image:

    "" => "centos-5-8-x32" ipv4_address: "" => "<computed>" ipv4_address_private: "" => "<computed>" name: "" => "tf-web" private_networking: "" => "<computed>" region: "" => "sfo1" size: "" => "512mb" status: "" => "<computed>" + dnsimple_record.hello domain: "" => "example.com" domain_id: "" => "<computed>" hostname: "" => "<computed>" name: "" => "test" priority: "" => "<computed>"
  12. $ terraform plan + digitalocean_droplet.web backups: "" => "<computed>" image:

    "" => "centos-5-8-x32" ipv4_address: "" => "<computed>" ipv4_address_private: "" => "<computed>" name: "" => "tf-web" private_networking: "" => "<computed>" region: "" => "sfo1" size: "" => "512mb" status: "" => "<computed>" + dnsimple_record.hello domain: "" => "example.com" domain_id: "" => "<computed>" hostname: "" => "<computed>" name: "" => "test" priority: "" => "<computed>"
  13. $ terraform plan + digitalocean_droplet.web backups: "" => "<computed>" image:

    "" => "centos-5-8-x32" ipv4_address: "" => "<computed>" ipv4_address_private: "" => "<computed>" name: "" => "tf-web" private_networking: "" => "<computed>" region: "" => "sfo1" size: "" => "512mb" status: "" => "<computed>" + dnsimple_record.hello domain: "" => "example.com" domain_id: "" => "<computed>" hostname: "" => "<computed>" name: "" => "test" priority: "" => "<computed>"
  14. $ terraform plan + digitalocean_droplet.web backups: "" => "<computed>" image:

    "" => "centos-5-8-x32" ipv4_address: "" => "<computed>" ipv4_address_private: "" => "<computed>" name: "" => "tf-web" private_networking: "" => "<computed>" region: "" => "sfo1" size: "" => "512mb" status: "" => "<computed>" + dnsimple_record.hello domain: "" => "example.com" domain_id: "" => "<computed>" hostname: "" => "<computed>" name: "" => "test" priority: "" => "<computed>"
  15. backups: "" => "<computed>" image: "" => "centos-5-8-x32" ipv4_address: ""

    => "<computed>" ipv4_address_private: "" => "<computed>" name: "" => "tf-web" private_networking: "" => "<computed>" region: "" => "sfo1" size: "" => "512mb" status: "" => "<computed>" + dnsimple_record.hello domain: "" => "example.com" domain_id: "" => "<computed>" hostname: "" => "<computed>" name: "" => "test" priority: "" => "<computed>" ttl: "" => "<computed>" type: "" => "A" value: "" => "${digitalocean_droplet.web.ipv4_address}"
  16. backups: "" => "<computed>" image: "" => "centos-5-8-x32" ipv4_address: ""

    => "<computed>" ipv4_address_private: "" => "<computed>" name: "" => "tf-web" private_networking: "" => "<computed>" region: "" => "sfo1" size: "" => "512mb" status: "" => "<computed>" + dnsimple_record.hello domain: "" => "example.com" domain_id: "" => "<computed>" hostname: "" => "<computed>" name: "" => "test" priority: "" => "<computed>" ttl: "" => "<computed>" type: "" => "A" value: "" => "${digitalocean_droplet.web.ipv4_address}"
  17. C C C C C C VM VM VM IAAS

    (OpenStack, etc) PHYSICAL DECOMPOSE DELEGATE DEPLOY DEV OPS
  18. TERRAFORM MODULE module "consul" { source = "github.com/hashicorp/consul/terraform/aws" servers =

    5 version = "0.4.0" } resource "dnsimple_record" "consul" { domain = "example.com" name = "consul" value = "${module.consul.ip_address}" type = "A" }