Member-only story
How did we set up the staging environment in our company?
OBJECTIVE: In this blog, I am going to explain how did we set up the STG environment in our current company. The above image is the architectural diagram of the staging environment set up with END to END automation using terraform. whatever we create in the AWS, it is from the terraform and nothing is manual.
COMPONENTS USED :
- Bitbucket
- Code commit
- Terraform
- Code pipeline
- Code build
IN DETAIL: In STG env we are having 3 types of pipelines, 1) Infrastructure pipeline, 2) backend pipeline, and 3) frontend pipeline. We have integrated bitbucket with code commit to getting all the code into the AWS. The source for all the pipelines is code commit. Overall we have 1 infrastructure pipeline to create any infrastructure in the AWS and we will be having many backends and front-end pipelines for deploying microservices.
- Infrastructure Pipeline: In the infrastructure pipeline, we are having 3 stages, A) source, B) build, and C) deploy.
A) source: is used to fetch the latest code from the AWS CodeCommit whenever there is a new commit and push it to the build stage.
B) build: is used to init, validate, and plan the terraform files in the repo. The terraform plan is saved in the…