Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.

```
Expand All @@ -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
Expand All @@ -63,7 +63,7 @@ export TF_VAR_ip_address_for_ssh=<ip_addres>/32

We are now ready to deploy the stack:
```
cd ./infrustructure
cd ./infrastructure
terraform init
terraform apply
```
Expand Down
4 changes: 2 additions & 2 deletions bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ../
Expand All @@ -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
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.