- Install AWS CDK
- Install dependencies
npm i
- Store the Github token as secure string in the SSM parameter store with path github-token
This stack would create the devops CI/CD pipelines for microservices,
- Code pipelines(including CodeBuild projects) automatically trigger building, and publishing microservice projects when code change is submitted to Github repo
- ECR repositories will be created per microservices
cdk deploy eCommenceDevopsStack
This stack would create an ECS cluster for eCommence application powered by serverless container fargate, which depends on the docker image created by Devops pipeline
.
- Microservice management / orchestration -- ECS
- Service Registration / Service Discovery -- Cloud Map
- Microservice observability
- Metrics -- Cloudwatch container insights
- Logs -- Cloudwatch logs and logs insights
- Tracing -- X-Ray
- Canary Deployment / Service Mesh -- App Mesh
- CI/CD/Devops -- CodeBuild, CodePipeline, AWS CDK, CloudFormation
cdk deploy eCommenceClusterStack
Or deploy the cluster with custom domain if the parent domain is a public hosted zone in Route 53,
cdk deploy eCommenceClusterStack -c DomainName=<your domain>
This stack would monitor the ECR repositories of microservices, then deploy the latest version of microservices to ECS cluster.
cdk deploy eCommenceDeploymentStack
This stack would monitor the code commit of source branch bugfix
, then trigger code deployment pipeline as canary deployment(only works for product service).
cdk deploy eCommenceProductCanaryDeploymentStack