From d9898bde067d09335d03bae89e5e561c6c3714c2 Mon Sep 17 00:00:00 2001 From: Austin Carter Date: Fri, 18 Oct 2019 10:37:49 -0700 Subject: [PATCH 1/3] fix infrastructure spelling --- README.md | 2 +- {infrustructure => infrastructure}/main.tf | 0 {infrustructure => infrastructure}/modules/alb/main.tf | 0 {infrustructure => infrastructure}/modules/alb/outputs.tf | 0 {infrustructure => infrastructure}/modules/alb/vars.tf | 0 {infrustructure => infrastructure}/modules/ecs-cluster/main.tf | 0 .../modules/ecs-cluster/outputs.tf | 0 {infrustructure => infrastructure}/modules/ecs-cluster/vars.tf | 0 {infrustructure => infrastructure}/modules/ecs-service/main.tf | 0 .../modules/ecs-service/outputs.tf | 0 {infrustructure => infrastructure}/modules/ecs-service/vars.tf | 0 {infrustructure => infrastructure}/modules/rds/main.tf | 0 {infrustructure => infrastructure}/modules/rds/outputs.tf | 0 {infrustructure => infrastructure}/modules/rds/vars.tf | 0 {infrustructure => infrastructure}/modules/s3/main.tf | 0 {infrustructure => infrastructure}/modules/s3/vars.tf | 0 {infrustructure => infrastructure}/modules/vpc/main.tf | 0 {infrustructure => infrastructure}/modules/vpc/outputs.tf | 0 {infrustructure => infrastructure}/modules/vpc/vars.tf | 0 {infrustructure => infrastructure}/outputs.tf | 0 {infrustructure => infrastructure}/vars.tf | 0 21 files changed, 1 insertion(+), 1 deletion(-) rename {infrustructure => infrastructure}/main.tf (100%) rename {infrustructure => infrastructure}/modules/alb/main.tf (100%) rename {infrustructure => infrastructure}/modules/alb/outputs.tf (100%) rename {infrustructure => infrastructure}/modules/alb/vars.tf (100%) rename {infrustructure => infrastructure}/modules/ecs-cluster/main.tf (100%) rename {infrustructure => infrastructure}/modules/ecs-cluster/outputs.tf (100%) rename {infrustructure => infrastructure}/modules/ecs-cluster/vars.tf (100%) rename {infrustructure => infrastructure}/modules/ecs-service/main.tf (100%) rename {infrustructure => infrastructure}/modules/ecs-service/outputs.tf (100%) rename {infrustructure => infrastructure}/modules/ecs-service/vars.tf (100%) rename {infrustructure => infrastructure}/modules/rds/main.tf (100%) rename {infrustructure => infrastructure}/modules/rds/outputs.tf (100%) rename {infrustructure => infrastructure}/modules/rds/vars.tf (100%) rename {infrustructure => infrastructure}/modules/s3/main.tf (100%) rename {infrustructure => infrastructure}/modules/s3/vars.tf (100%) rename {infrustructure => infrastructure}/modules/vpc/main.tf (100%) rename {infrustructure => infrastructure}/modules/vpc/outputs.tf (100%) rename {infrustructure => infrastructure}/modules/vpc/vars.tf (100%) rename {infrustructure => infrastructure}/outputs.tf (100%) rename {infrustructure => infrastructure}/vars.tf (100%) diff --git a/README.md b/README.md index 01d8567..9a84c7d 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This repository creates a production-ready [Node.js](https://nodejs.org/en/about In under 15 minutes, you can deploy an AWS stack using: - [Docker](https://www.docker.com/) to make development and deployment easier. -- [Terraform](https://www.terraform.io/) to automate infrustucture management. +- [Terraform](https://www.terraform.io/) to automate infrastucture management. - [Amazon RDS](https://aws.amazon.com/rds/) to manage a Postgres database. - [Auto Scaling](https://aws.amazon.com/autoscaling/) to scale your application as your traffic grows. - [Elastic Container Service](https://aws.amazon.com/ecs/) to deploy a cluster of Docker containers across multiple availability zones. diff --git a/infrustructure/main.tf b/infrastructure/main.tf similarity index 100% rename from infrustructure/main.tf rename to infrastructure/main.tf diff --git a/infrustructure/modules/alb/main.tf b/infrastructure/modules/alb/main.tf similarity index 100% rename from infrustructure/modules/alb/main.tf rename to infrastructure/modules/alb/main.tf diff --git a/infrustructure/modules/alb/outputs.tf b/infrastructure/modules/alb/outputs.tf similarity index 100% rename from infrustructure/modules/alb/outputs.tf rename to infrastructure/modules/alb/outputs.tf diff --git a/infrustructure/modules/alb/vars.tf b/infrastructure/modules/alb/vars.tf similarity index 100% rename from infrustructure/modules/alb/vars.tf rename to infrastructure/modules/alb/vars.tf diff --git a/infrustructure/modules/ecs-cluster/main.tf b/infrastructure/modules/ecs-cluster/main.tf similarity index 100% rename from infrustructure/modules/ecs-cluster/main.tf rename to infrastructure/modules/ecs-cluster/main.tf diff --git a/infrustructure/modules/ecs-cluster/outputs.tf b/infrastructure/modules/ecs-cluster/outputs.tf similarity index 100% rename from infrustructure/modules/ecs-cluster/outputs.tf rename to infrastructure/modules/ecs-cluster/outputs.tf diff --git a/infrustructure/modules/ecs-cluster/vars.tf b/infrastructure/modules/ecs-cluster/vars.tf similarity index 100% rename from infrustructure/modules/ecs-cluster/vars.tf rename to infrastructure/modules/ecs-cluster/vars.tf diff --git a/infrustructure/modules/ecs-service/main.tf b/infrastructure/modules/ecs-service/main.tf similarity index 100% rename from infrustructure/modules/ecs-service/main.tf rename to infrastructure/modules/ecs-service/main.tf diff --git a/infrustructure/modules/ecs-service/outputs.tf b/infrastructure/modules/ecs-service/outputs.tf similarity index 100% rename from infrustructure/modules/ecs-service/outputs.tf rename to infrastructure/modules/ecs-service/outputs.tf diff --git a/infrustructure/modules/ecs-service/vars.tf b/infrastructure/modules/ecs-service/vars.tf similarity index 100% rename from infrustructure/modules/ecs-service/vars.tf rename to infrastructure/modules/ecs-service/vars.tf diff --git a/infrustructure/modules/rds/main.tf b/infrastructure/modules/rds/main.tf similarity index 100% rename from infrustructure/modules/rds/main.tf rename to infrastructure/modules/rds/main.tf diff --git a/infrustructure/modules/rds/outputs.tf b/infrastructure/modules/rds/outputs.tf similarity index 100% rename from infrustructure/modules/rds/outputs.tf rename to infrastructure/modules/rds/outputs.tf diff --git a/infrustructure/modules/rds/vars.tf b/infrastructure/modules/rds/vars.tf similarity index 100% rename from infrustructure/modules/rds/vars.tf rename to infrastructure/modules/rds/vars.tf diff --git a/infrustructure/modules/s3/main.tf b/infrastructure/modules/s3/main.tf similarity index 100% rename from infrustructure/modules/s3/main.tf rename to infrastructure/modules/s3/main.tf diff --git a/infrustructure/modules/s3/vars.tf b/infrastructure/modules/s3/vars.tf similarity index 100% rename from infrustructure/modules/s3/vars.tf rename to infrastructure/modules/s3/vars.tf diff --git a/infrustructure/modules/vpc/main.tf b/infrastructure/modules/vpc/main.tf similarity index 100% rename from infrustructure/modules/vpc/main.tf rename to infrastructure/modules/vpc/main.tf diff --git a/infrustructure/modules/vpc/outputs.tf b/infrastructure/modules/vpc/outputs.tf similarity index 100% rename from infrustructure/modules/vpc/outputs.tf rename to infrastructure/modules/vpc/outputs.tf diff --git a/infrustructure/modules/vpc/vars.tf b/infrastructure/modules/vpc/vars.tf similarity index 100% rename from infrustructure/modules/vpc/vars.tf rename to infrastructure/modules/vpc/vars.tf diff --git a/infrustructure/outputs.tf b/infrastructure/outputs.tf similarity index 100% rename from infrustructure/outputs.tf rename to infrastructure/outputs.tf diff --git a/infrustructure/vars.tf b/infrastructure/vars.tf similarity index 100% rename from infrustructure/vars.tf rename to infrastructure/vars.tf From e943a7f4c93c5b1526280f5b6e8e5f11aa4dba78 Mon Sep 17 00:00:00 2001 From: Austin Carter Date: Fri, 18 Oct 2019 11:23:00 -0700 Subject: [PATCH 2/3] a couple more edits --- README.md | 6 +++--- bin/release.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 01d8567..526c9e2 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ In under 15 minutes, you can deploy an AWS stack using: ##### Create an AWS account - Go to [AWS](https://aws.amazon.com) and create an account -##### Create an AWS credentials for development +##### Create AWS credentials for development When you log in to AWS with the email / password used to set up the account, you are signed in as a root user. AWS [strongly recommends](https://docs.aws.amazon.com/general/latest/gr/aws_tasks-that-require-root.html) to do normal user and administrative tasks as a non-root user. ``` @@ -43,7 +43,7 @@ aws iam add-user-to-group --user-name mcgradyc --group-name Admins aws configure --profile personal-website-mcgradyc # [ACTION] Enter mcgradyc credentials and us-west-2 as region # Create a key pair called charliemcgrady-key-pair (to use a custom name, -# update the key_pair_name variable in `./infrustructure/vars.tf`). Make sure +# update the key_pair_name variable in `./infrastructure/vars.tf`). Make sure # to save this key pair somewhere safe - it will be used to SSH into hosts. aws ec2 create-key-pair --key-name charliemcgrady-key-pair --query 'KeyMaterial' --output text > charliemcgrady-key-pair.pem chmod 400 charliemcgrady-key-pair.pem @@ -63,7 +63,7 @@ export TF_VAR_ip_address_for_ssh=/32 We are now ready to deploy the stack: ``` -cd ./infrustructure +cd ./infrastructure terraform init terraform apply ``` diff --git a/bin/release.sh b/bin/release.sh index 207717e..92b8d87 100755 --- a/bin/release.sh +++ b/bin/release.sh @@ -11,7 +11,7 @@ $(aws ecr get-login --no-include-email --region us-west-2) RELEASE_UUID=$(uuidgen) # Determine the url for the ECR repository and the target cluster name -cd ./infrustructure +cd ./infrastructure ECR_REPOSITORY_URL=$(terraform output ecr_repository_url) ECS_CLUSTER_NAME=$(terraform output ecs_cluster_name) cd ../ @@ -25,7 +25,7 @@ docker tag node-server:latest "${ECR_REPOSITORY_URL}:${RELEASE_UUID}" docker push "${ECR_REPOSITORY_URL}:${RELEASE_UUID}" # Create a new ECS Task Definition which tells containers in the cluster to run the latest image -cd ./infrustructure +cd ./infrastructure terraform apply -var="node_server_image_version=${RELEASE_UUID}" # Force a deployment so containers in the cluster run the latest image From 7ddce80cfeaf1a947c882169c424d6c9d8ca0bf1 Mon Sep 17 00:00:00 2001 From: Austin Carter Date: Fri, 18 Oct 2019 11:23:00 -0700 Subject: [PATCH 3/3] a couple more edits --- README.md | 6 +++--- bin/release.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9a84c7d..3956cec 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ In under 15 minutes, you can deploy an AWS stack using: ##### Create an AWS account - Go to [AWS](https://aws.amazon.com) and create an account -##### Create an AWS credentials for development +##### Create AWS credentials for development When you log in to AWS with the email / password used to set up the account, you are signed in as a root user. AWS [strongly recommends](https://docs.aws.amazon.com/general/latest/gr/aws_tasks-that-require-root.html) to do normal user and administrative tasks as a non-root user. ``` @@ -43,7 +43,7 @@ aws iam add-user-to-group --user-name mcgradyc --group-name Admins aws configure --profile personal-website-mcgradyc # [ACTION] Enter mcgradyc credentials and us-west-2 as region # Create a key pair called charliemcgrady-key-pair (to use a custom name, -# update the key_pair_name variable in `./infrustructure/vars.tf`). Make sure +# update the key_pair_name variable in `./infrastructure/vars.tf`). Make sure # to save this key pair somewhere safe - it will be used to SSH into hosts. aws ec2 create-key-pair --key-name charliemcgrady-key-pair --query 'KeyMaterial' --output text > charliemcgrady-key-pair.pem chmod 400 charliemcgrady-key-pair.pem @@ -63,7 +63,7 @@ export TF_VAR_ip_address_for_ssh=/32 We are now ready to deploy the stack: ``` -cd ./infrustructure +cd ./infrastructure terraform init terraform apply ``` diff --git a/bin/release.sh b/bin/release.sh index 207717e..92b8d87 100755 --- a/bin/release.sh +++ b/bin/release.sh @@ -11,7 +11,7 @@ $(aws ecr get-login --no-include-email --region us-west-2) RELEASE_UUID=$(uuidgen) # Determine the url for the ECR repository and the target cluster name -cd ./infrustructure +cd ./infrastructure ECR_REPOSITORY_URL=$(terraform output ecr_repository_url) ECS_CLUSTER_NAME=$(terraform output ecs_cluster_name) cd ../ @@ -25,7 +25,7 @@ docker tag node-server:latest "${ECR_REPOSITORY_URL}:${RELEASE_UUID}" docker push "${ECR_REPOSITORY_URL}:${RELEASE_UUID}" # Create a new ECS Task Definition which tells containers in the cluster to run the latest image -cd ./infrustructure +cd ./infrastructure terraform apply -var="node_server_image_version=${RELEASE_UUID}" # Force a deployment so containers in the cluster run the latest image