ADOT (AWS Distro for OpenTelemetry) Implementation for Simple Golang RESTful API Application (Bookstore)
-
Create Container Image CI/CD CodeBuild, refer to this repository: DevOpsCorner CI/CD CodeBuild
-
Create HelmChart Template Global, go to this section
api
backend
frontend
stateful
secretref
svcrole
-
Deploy HelmChart Template Global to S3
AWS_REGION=us-west-2 helm repo add devopscorner-lab s3://devopscorner-adot-chart/lab
AWS_REGION=us-west-2 helm repo add devopscorner-staging s3://devopscorner-adot-chart/staging
AWS_REGION=us-west-2 helm repo add devopscorner-prod s3://devopscorner-adot-chart/prod
-
Create HelmChart Template for GO App
- Helm template GO App (
_infra/{env}/helm-template.yml
) - Helm value GO App (
_infra/{env}/helm-value.yml
)
- Helm template GO App (
-
Create
Dockerfile
for Container GO App CI/CD -
Create Script CI/CD
ecr-build.sh
ecr-push.sh
ecr-tag.sh
git-clone.sh
Makefile
-
Register Container Image GO App to Amazon ECR (Container Registry)
-
Create script for Building Container Image GO App (
.aws/buildspec-build.yml
) -
Create script for Deployment Container Image GO App to EKS (
.aws/buildspec-deploy.yml
) -
Setup Variable Environment / Using Config Secret with AWS Systems Manager (Parameter Store)
-
Create Pipeline with AWS CodePipeline
- Source: Reference from CodeCommit and/or 3rd Party Repository (GitHub, GitLab, BitBucket, Azure DevOps)
- Build: Building Container GO App
- Golang Unit Test
- Code Quality and Code Security
- Build Container GO App
- Tagging Container GO App
- Push Container GO App to Container Registry (ECR / Dockerhub)
- Deploy: Deploy Container GO App
- Static Application Security Testing (SAST), or static analysis
- Manual Approval
- Deploy-DEV
- Manual Approval
- Deploy-UAT
- Dynamic Application Security Testing (DAST)
- Manual Approval
- Deploy-PROD
-
Running Deployment: Commit -> Push -> Webhook (CodeCommit)
-
CodeBuild Process
- Build Container
- Environment Image:
aws/codebuild/amazonlinux2-x86_64-standard:4.0
- Environment Type:
Linux
- Buildspec:
.aws/buildspec-build.yml
- Environment Image:
- Deploy Container
- Environment Image:
devopscorner/cicd:codebuild-4.0
orYOUR_AWS_ACCOUNT.dkr.ecr.us-west-2.amazonaws.com/devopscorner/cicd:codebuild-4.0
- Environment Type:
Linux
- Buildspec:
.aws/buildspec-deploy.yml
- Environment Image:
- Build Container