The Creative Network Session 9 — Deployment with Terraform and Docker

Previous sessions

Stephens Xu
Fullstack Network

--

  1. Introduction session
  2. Setting up redux
  3. Home Page with React
  4. Setting up GraphQL
  5. GraphQL schema V1
  6. Integrating GraphQL in React with Lokka
  7. Building photo upload with AWS Lambda and S3
  8. Serverless architecture, Lambda and Gateways

We realized that participation in our streaming have not been great in the past few sessions, so as part of an attempt to fix this problem we will be publishing the exact streaming schedule for the next TWO sessions. We will try to schedule at LEAST two sessions ahead of time and stick with these schedules. Here is schedule for next TWO sessions:

Session 10: Thursday, May 18th 9:00pm PST

Session 11: Tuesday, May 23rd 9:00pm PST

You can join us in streaming here.

Video of last night’s session:

Last night we used Terraform and Docker to continue building our photo upload feature following the architecture here:

As you can see, there are a few components here and they are essentially cloud resources on Amazon AWS platform. We can either manually use the AWS console to create the resources, or using code to manage them. Terraform proved to be an ideal tool for managing cloud resources. In short, Terraform is a platform that allows you to Create and manage infrastructure as code. For example, this is the infrastructure we created last night:

provider "aws" {
region = "us-west-2"
}

resource "aws_s3_bucket" "images" {
bucket = "creative-network-images"

versioning {
enabled = false
}

tags {
Name = "creative-network-images"
Environment = "dev"
}
}

resource "aws_s3_bucket" "lambda_functions" {
bucket = "creative-network-lambda"

versioning {
enabled = false
}

tags {
Name = "creative-network-lambda"
Environment = "dev"
}
}

resource "aws_api_gateway_rest_api" "resizer" {
name = "image-resizer"
description = "Creative network image resizer"
}

If you’re familiar with AWS at all, these code will essentially automate the process of synchronizing what’s existing on the AWS platform and create the resources.

In our next session, we will work on creating a Docker container compatible with Amazon Linux, NodeJS and compiling Sharp(the Node library we use for photo processing) with native extension. Join us at 05/18 9:00pm PST if it interest you!

--

--