Learn how to deploy a scalable, highly available and infra-as-code managed 3-tier web application on AWS.
In this post, I'll be using Crystalnix’s Omaha Server as an example web application but it should equally apply to any other web app you wish to deploy onto AWS.
What is Omaha Server?
An open-source implementation of Google’s Omaha update protocol, which for example powers Chrome’s automatic update mechanism. Omaha server is used by organizations large and small for products that require sophisticated update logic and advanced usage statistics.
Amazon ElastiCache (redis)
Amazon RDS (postgres)
Amazon ECS with EC2 launch type
Here's the high-level architecture diagram of what we'll be working on.
$ git clone https://github.com/tuladhar/omaha-server-on-aws
$ export AWS_PROFILE=REPLACE_ME $ export AWS_REGION=us-east-1 $ export ENV_LABEL=omaha $ export ENV_TYPE=nonprod
$ export SECOND_OCTET=254 $ make -C 01_NETWORK/01_VPC create-stack
$ make -C 01_NETWORK/02_ALB create-stack
$ make -C 02_DATABASE/01_REDIS create-stack
$ make -C 02_DATABASE/02_RDS create-stack
$ make -C 03_S3 create-stack
$ make -C 04_COMPUTE/01_ECS/01_CLUSTER create-stack
$ make -C 04_COMPUTE/01_ECS/02_SERVICE create-stack
And that’s it. I hope you've enjoyed reading and learned something new.
Use SSM to store RDS credentials and avoid hard-coding in CloudFormation template.
Separate out the VPC subnets for stateless and stateful resources. Read about it in this blog post.