[AWS] Cloudformation

Deploys the complete MuShop to Amazon Elastic Kubernetes Service (EKS) in combination with Amazon DocumentDb (with MongoDB compatibility), Amazon Relational Database Service (RDS) and Amazon Managed Streaming for Apache Kafka (MSK).

Prerequisites

AWS account with configured billing.

Note that the charges will be applied since used services are not part of the AWS Free Tier.

Create S3 bucket

Create a new S3 bucket and upload the latest CloudFormation templates to the new bucket. The CloudFormation templates should be uploaded together with its parent directory whose name defines CloudFormation templates version, for example: 3.1.0

Create stack

To start with the AWS Cloudformation, create a new stack using S3 URL of the uploaded mushop-entrypoint.yaml template file.

Mushop stack create

Proceed next to the specify stack details.

Specify stack details

The stack contains lot of configuration options for AWS services. Majority of the options are already preconfigured however there are few options that needs to be configured manually:

  • Availability Zones - List of Availability Zones in the region the stack is going to be deployed into. It is recommended to select at least 3 AZs.
  • VPC network configuration - Insert the number of selected availability zones.
  • SSH key name - select existing or create new ec2 keypair. This keypair is used to access the bastion host.

Mushop stack configure

Once you have provided the values, proceed next to the stack options.

Stack options

Configure here the Cloudformation stack options. Generally you can skip this page and proceed to the Stack Review page.

Mushop stack options

Review

On this page review the configuration options and check all requested capabilities. Then hit Create stack button.

Mushop stack review

Note that if you do not check all required capabilities the stack won’t be completely created.

Deployment

The stack itself consist from several sub-stacks:

  • EKSStack - stack deploys EKS and VNC, deployment time ~40 minutes
  • DocumentDB - stack deploys AWS DocumentDb, deployment time ~10 minutes
  • MSKStack - stack deploys the AWS MSK, deployment time ~40-60minutes
  • RDSStack - stack deploys the AWS RDS with MySQL engine, deployment time ~10minutes
  • MushopUtilitiesStack - stack deploys helper Lambda functions, deployment time ~5 minutes
  • MuShop - stack creates configuration options in the AWS Secret Manager, AWS Parameter Store and uses MuShop Helm chart to deploy the MuShop application to the EKS.

The deployment of the complete stack takes around ~60-90 minutes. Once finished the Outputs tab will contain the url of the application as well as the IP of bastion host (if requested to create).