Design and Build CI/CD Pipelines that Support Continuous Delivery Processes.
Update key pair name in the cloudformation template [backend.yml]
You'll need these credentials to add to CircleCI configuration.
- Choose a random string, such as kk1j287dhjppmz437
- Create a public S3 bucket with a name that combines "udapeople" and the random string, such as udapeople-kk1j287dhjppmz437.
- Manually run .circleci/files/cloudfront.yml template file locally, and use bucket name for the Workflow ID parameter.
$ cd .circleci/files
$ aws cloudformation deploy \
--template-file cloudfront.yml \
--stack-name InitialStack\
--parameter-overrides WorkflowID=udapeople-kk1j287dhjppmz437
Once the initial stack is created, subsequent executions of the cloudfront.yml template will modify the same CloudFront distribution to make the blue-to-green switch without fail.
- Add SSH Key pair from EC2 to the CircleCI Project Settings > SSH Keys >Additional SSH Keys.
To get the actual key pair, you'll need to open the pem file in a text editor and copy the contents. Then you can paste them into Circle CI.
-
Add the following environment variables to your Circle CI project by navigating to {project name} > Settings > Environment Variables.
AWS_ACCESS_KEY_ID=(from IAM user with programmatic access) AWS_SECRET_ACCESS_KEY= (from IAM user with programmatic access) AWS_DEFAULT_REGION=(your default region in aws) TYPEORM_CONNECTION=postgres TYPEORM_MIGRATIONS_DIR=./src/migrations TYPEORM_ENTITIES=./src/modules/domain/**/*.entity.ts TYPEORM_MIGRATIONS=./src/migrations/*.ts TYPEORM_HOST={your postgres database hostname in RDS} TYPEORM_PORT=5432 (or the port from RDS if it’s different) TYPEORM_USERNAME={your postgres database username in RDS} TYPEORM_PASSWORD={your postgres database password in RDS} TYPEORM_DATABASE=postgres {or your postgres database name in RDS}
we successfully reduced cost, time, and effort and increased revenue using DevOps culture with continuous delivery and faster time to clients.
$ cd util
$ docker compose up
- Circle CI - Cloud-based CI/CD service
- Amazon AWS - Cloud services
- AWS CLI - Command-line tool for AWS
- CloudFormation - Infrastrcuture as code
- Ansible - Configuration management tool
- Prometheus - Monitoring tool