deploy-with-circleci-jira-ecr-ecs-s3-LB
README.md

deploy-with-circleci-jira-ecr-ecs-s3-LB

Project involves uses the following tools/technologies -

  • ReactJS
  • FastAPI
  • Git Branching
  • BitBucket
  • Project Management using Jira
  • Jira Automation
  • CI/CD pipeline with CircleCI
  • Infrastructure provisioning using Terraform
  • Domain name registration
  • AWS Route53
  • AWS Certificate Manager
  • CloudFront
  • Website UI hosting with Amazon S3
  • Amazon ECR
  • Amazon ECS
  • LoadBalancer

The project involves deploying the 2 microservices to AWS - Frontend on S3 and backend on ECS, with each microservice having its own custom domain name. Pipeline for the deployments is maintained using CircleCI. Every pull request made on BitBucket should trigger automatic transition of the ticket created for the fixed issue from TO Do to In Progress. Once a pull request is reviewed and merged, the ticket should transition to Done. This is achieved using Automation Rules in Jira. This merge then also triggers the CI/CD pipeline to integrate any new changes to the deployment.

Steps involved in the project are...

  1. Creating 2 microservices (frontend and backend). The frontend is written in React and backend in Python FastAPI framework.

  2. Each microservice contains a .circleci folder containing a config.yml file for the pipeline

  3. Push both microservices separetly to their BitBucket repositories.

  4. Connect the 2 BitBucket repositories to their respective projects on Jira.

  5. Create automation rules to initiate ticket transition to In Progress and Done following a Pull Request and after merging the Pull Request to the main branch.

  6. Create 2 projects in CircleCI, each for the microservices - frontend and backend and connect the CircleCI projects to the BitBucket repository of each microservice.

  7. Using Terraform, ECR and ECS are provisioned for the backend microservices deployment.

  8. Also, S3 bucket is created to host the frontend microservice. The React application is built and the build folder is copied to S3, with public access enables.

  9. A bucket policy is also created on S3 to enable access from the internet.

  10. Hosted zones are created on Route53, one for backend and the other for frontend using the subdomains ... frontend.devwithagnes.website and backend.devwithagnes.website.

  11. The NameServers created for each of these zones are copied to the domain registrar where the domain name devwithagnes.website was registered (ns record is created foor each subdomain at the domain registrar).

  12. Certificate Manager is created and the 2 subdomains added.

  13. A CNAME-record is created for the Certificate Manager in Route53.

  14. CloudFront Distribution is created to serve content from the S3 bucket.

  15. An A-record is then created in Route53 for the CloudFront Distribution.

  16. Target group and LoadBalancer are also created and the LoadBalancer should accept https traffic on port 443 using the ACM created earlier.

  17. An A-record is created in the Route53 hosted zone for the backend subdomain. This is for the LoadBalancer.

  18. Register the ECS tasks private IP addresses in the Target Group.

  19. Visit the frontend on frontend.devwithagnes.website and send a request to the backkend by clicking the button.