Skip to content

Instantly share code, notes, and snippets.

@josh-padnick
Last active April 15, 2017 06:25
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save josh-padnick/c0221542271ef59ec1e3796bd76fddcf to your computer and use it in GitHub Desktop.
Healthline Gist

HealthLine Temp AWS Infrastructure Instructions

We setup a limited version of the infrastructure needed by HealthLine in AWS using Terraform.

Environments

This infrastructure has two environments:

  • mgmt: Contains a Bastion Host where you SSH to get access to everything else
  • stage: Contains an ECS Cluster running the gruntwork-sample-app

The code

We've given you access to the code in the following repos:

  • infrastructure-modules: The Terraform modules that define the entire infrastructure.
  • infrastructure-live: The live, deployed infrastructure, using the versioned modules from infrastructure-modules.
  • gruntwork-sample-app: A sample Node.js app that is packaged as a Docker container and shows how to load config files, decrypt secrets in the config files, apply database migrations, and so on.

Check out the temp branch of the first two repos to see the code that's been deployed.

Things To Try

Run the sample app in localdev

  1. Download Docker for Mac or Docker for Windows to your local environment.
  2. git clone https://github.com/healthline/gruntwork-sample-app.git
  3. cd gruntwork-sample-app
  4. docker-compose up.
  5. Visit http://localhost:3000 with your web browser. Also try:

Checkout this same Docker image in ECS

  1. Go to http://stage-alb-public-2068811070.us-west-2.elb.amazonaws.com/
  2. Click around the AWS Console and visit the ECS Console to see the ECS Service deployed.

Note that normally, we would setup a CI system for automatically building Docker images and deploying them, but we haven't done that in this case. Instead, we manually did a docker build and manually pushed this image to the ECR Repo in AWS.

Next Steps

Please play around with this infrastructure and use it however you want. When we start the official project, we'll destroy everything here and rebuild everything from scratch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment