Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 2.2 KB

File metadata and controls

37 lines (23 loc) · 2.2 KB

Deployment

The infrastructure is deployed through AWS CodePipeline.

Environments

There are 3 AWS environments that run this service. Each one in a separate AWS account:

  1. Development
  2. Pre-production
  3. Production

The environments are deployed from a Shared Services AWS account by assuming a pre-defined IAM role into the target account.

The source code for the pipeline is available on Github.

Each deploy is immutable and installs the dependencies from scratch in a new build container.

Continuous integration

Trunk based development and pull requests are currently used to add new features or updates to the service. Feature branches should be short lived and merged into the master branch frequently. CodePipeline picks up any new commits on the master branch and runs them against the various environments automatically. Depending on the changes that are made, deployments should be applied with zero downtime. This can be established by applying the change on your local environment before committing it to master.

architecture

Deployment manifest file

The entire release process is defined in the buildspec.yml file, which is a concept in CodePipeline for CodeBuild. It allows you to define your deployments as code and gives you full control of the steps taken.

The buildspec.yml file currently goes through the following steps to do a deployment:

  1. Set static environment variables for Terraform and bash scripts
  2. Set environment variables with values pulled from SSM Parameter Store
  3. Install Terraform
  4. Initialize Terraform for target AWS account
  5. Run Terraform to create the infrastructure
  6. Publish Terraform outputs to SSM Parameter store