Create an ECS Microservices stack with built-in CI/CD for the Infrastructure (IaC) and Code.
- Fork and clone this repo.
- Fork and clone the service1-stack-cicd
- Install CIM (CloudFormation Utility)
- Install the kms stack.
- Create an EC2 keypair.
- Install the bootstrap.stack.yml stack.
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.
Use the console to create an EC2 keypair for all your EC2 instances.
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:
- Prod (master branch)
- Sandbox (develop branch)
Each pipeline will execute the following steps every time you commit changes to this repo:
- Create/Update the stacks/vpc.stack.json stack.
- Create/Update the stacks/ecs.stack.yml stack.
- Create/Update the stacks/service1.bootstrap.stack.yml stack.
The stacks/service1.bootstrap.stack.yml stack creates a pipeline that