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

How to Get Your Website Into the Cloud

How to Get Your Website Into the Cloud

In this presentation, I explain how to use the GitHub API, AWS, and Terraform to deploy a website to the cloud in less than an hour.

This version of the talk was given at the 2023 Edition of Open Source 101 as part of the "Developer" track.

Kerim Satirli

March 23, 2023
Tweet

More Decks by Kerim Satirli

Other Decks in Technology

Transcript

  1. resource "compute_instance" "os101_website" { count = 10 image = "rhel-7.0"

    type = "small" has_public_ip = true region = "us-east-nc" } Infrastructure as Code server.tf
  2. resource "compute_instance" "os101_website" { count = 10 image = var.image

    type = var.type has_public_ip = var.has_public_ip region = var.region } Infrastructure as Code server.tf
  3. your code is executable documentation versioned code supports collaboration workflows

    become safer and more predictable code is text and can be versioned Recap
  4. A Website needs a place to put HTML, CSS, JS,

    images, etc. needs TLS certificate optionally: needs a CDN to handle all of the traffic needs a domain, DNS Zone, and DNS records
  5. git clone [email protected]:ksatirli/get-your-website-into-the-cloud.git Clone the Repository Terminal Cloning into 'get-your-website-into-the-cloud'...

    remote: Enumerating objects: 36, done. remote: Counting objects: 100% (36/36), done. remote: Compressing objects: 100% (31/31), done. remote: Total 36 (delta 4), reused 29 (delta 2), pack-reused 0 Receiving objects: 100% (36/36), 19.55 KiB | 2.79 MiB/s, done. Resolving deltas: 100% (4/4), done.
  6. Inspect the Code tree . . ├── LICENSE ├── README.md

    ├── dns.tf ├── github.tf ├── outputs.tf ├── providers.tf ├── templates ├── terraform.tf ├── terraform.tfvars.sample ├── variables.tf └── website.tf Terminal
  7. Initialize Terraform terraform init Terminal Initializing the backend... Initializing modules...

    Initializing provider plugins... - Installed go-gandi/gandi v2.2.3 (self-signed) - Installed integrations/github v5.18.3 (signed by a HashiCorp partner) - Installed hashicorp/local v2.4.0 (signed by HashiCorp) - Installed hashicorp/random v3.4.3 (signed by HashiCorp) - Installed hashicorp/aws v4.59.0 (signed by HashiCorp) Terraform has been successfully initialized!