Skip to content

DigitalSlideArchive/histomics_aws_deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Histomics AWS deployment scripts

This repository contains infrastructure-as-code for reproducible Histomics deployments on AWS using highly managed, scalable services, including

  • Elastic Container Service for the web application
  • EC2 instances for celery worker nodes
  • DocumentDB as the mongo-compatible database
  • Amazon MQ as the celery queue
  • CloudWatch for log persistence
  • Sentry integration (optional)

Prerequisites

  1. Obtain a domain name via AWS Route53, and set the domain_name terraform variable to its value.
  2. Create an SSH keypair and set the public key as the ssh_public_key terraform variable. This is the key that will be authorized on the worker EC2 instance(s).
  3. Set AWS credentials in your shell environment.
  4. In your target MongoDB Atlas organization, create a new API key and set the public and private key in your local environment in the variables MONGODB_ATLAS_PUBLIC_KEY and MONGODB_ATLAS_PRIVATE_KEY.
  5. Set the target MongoDB Atlas organization ID as the mongodbatlas_org_id terraform variable.

Building the worker AMI

  1. cd packer
  2. packer build worker.pkr.hcl
  3. Use the resulting AMI ID as the worker_ami_id terraform variable.

Deploying

  1. DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build -t zachmullen/histomics-load-test -f histomicsui.Dockerfile .
  2. docker push zachmullen/histomics-load-test
  3. Copy the SHA from the docker push command and paste it into main.tf
  4. From the terraform directory, run terraform apply -var-file=.tfvars

About

Infrastructure-as-code scripts for deploying high-availability, scalable Histomics on AWS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published