Skip to content

thestackshack/services-stack-cicd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Services CI/CD Stack

Create an ECS Microservices stack with built-in CI/CD for the Infrastructure (IaC) and Code.

With every code push your Infrastructure will be updates.

With every code push a new version of your Service will be built, tested, and deployed (optional).

There are two environments sandbox and prod. This makes it easy to test Infrastructure and Code changes before pushing to prod.

  • sandbox -> development Git branch
  • prod -> master Git branch

Sandbox builds are pushed live automatically.

Production builds are pushed manually by updating the Infrastructure.

Build notifications and Deployment notifications are sent either as an email, sms message, and/or Slack message.

Architecture

CI/CD CodePipelines

Notifications

Setup

  1. Fork and clone this repo.
  2. Fork and clone the service1-stack-cicd
  3. Install CIM (CloudFormation Utility)
  4. Install the kms stack.
  5. Create an EC2 keypair.
  6. Install the bootstrap.stack.yml stack.

Encrypt Secrets

In order to protect your configuration secrets like your GitHub token we need to create a KMS key first.

You can use the CloudFormation script in kms or just create it via the console.

EC2 Keypair

Use the console to create an EC2 keypair for all your EC2 instances.

Stack Up

Create the bootstrap.stack.yml stack.

First update _cim.yml with your GitHub information and your EC2 keypair.

Also take a look at the vpc parameters. You might need to change the AvailabilityZones.

This stack will build 2 pipelines:

  1. Prod (master branch)
  2. Sandbox (develop branch)

Each pipeline will execute the following steps every time you commit changes to this repo:

The stacks/service1.stack.yml stack creates a pipeline that updates the infrastructure and code found in this repo: service1-stack-cicd

About

ECS microservices stack with built-in CI/CD

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages