Documentation Index

Fetch the complete documentation index at: https://supporthub.usheru.com/llms.txt

Use this file to discover all available pages before exploring further.

usheru Track- Tracking System Deployment

Prev Next

Overview

The Usheru Tracking Application is deployed using a fully automated CI/CD pipeline built on AWS CodePipeline, ECS (Elastic Container Service), and supporting AWS services.

The deployment pipeline handles two environments:

  • Production â†’ uts.usheru.com

  • Development â†’ uts-dev.usheru.com

Source code changes in GitHub are automatically built, tested, containerized, and deployed to the appropriate environment.


Workflow Summary

  1. Source Control (GitHub)

    • Repository: usheru-tracking

    • Branches:

      • main â†’ triggers production pipeline deployment

      • test â†’ triggers development pipeline deployment

  2. CI/CD Pipeline (AWS CodePipeline)

    • Orchestrates the build and deployment process.

    • Stages:

      • Source Stage

        • Retrieves source code from GitHub.

        • Stores artifacts in an S3 bucket (codepipeline-eu-west-1/SourceArtifact).

      • Build Stage

        • Builds and tests a Docker image.

        • Stores build artifacts in S3 (codepipeline-eu-west-1/BuildArtifact).

        • Pushes Docker image to ECR (Elastic Container Registry) (usheru-tracking ECR repo).

      • Deploy Stage

        • Creates a new ECS task definition.

        • Deploys new ECS service version.

  3. ECS (Elastic Container Service)

    • Runs Docker containers on an EC2-backed ECS cluster.

    • New tasks are registered and deployed during each pipeline execution.

  4. Networking & Load Balancing

    • Application Load Balancer (ALB):

      • Registered with ECS target group (EC2 instances).

      • Routes traffic to ECS containers via private IPs.

    • Route 53:

      • Routes external requests to ALB via CNAME records.

      • Endpoints:

        • Production → uts.usheru.com

        • Development → uts-dev.usheru.com


Deployment Flow

  1. Developer commits code to main or test branch in GitHub.

  2. AWS CodePipeline is triggered.

  3. Pipeline retrieves source and stores it in S3.

  4. CodeBuild:

    • Builds and tests Docker image.

    • Pushes new image to ECR.

    • Stores build artifacts.

  5. ECS deploys a new task definition using the updated image.

  6. ECS service runs containers in EC2 cluster.

  7. Application Load Balancer routes traffic to updated ECS containers.

  8. Route 53 resolves domain names to the ALB.


Key AWS Services Used

  • GitHub â†’ Source code repository

  • AWS CodePipeline â†’ CI/CD orchestration

  • Amazon S3 â†’ Artifact storage (source + build)

  • AWS CodeBuild â†’ Build and test Docker images

  • Amazon ECR â†’ Container image repository

  • Amazon ECS (with EC2 launch type) â†’ Container orchestration

  • Application Load Balancer (ALB) â†’ Traffic distribution across ECS containers

  • Amazon Route 53 â†’ DNS routing to application endpoints


Endpoints


Notes

  • Separate pipelines for prod and dev ensure isolation between environments.

  • New ECS task definitions ensure that rollbacks can be performed if needed.

  • The ALB provides high availability and fault tolerance.

  • ECS runs containers on an EC2 target group with auto-scaling capabilities (if configured).