Numino Training Infra Backend DevOps

Overview

Auction management java backend (AMReplica) is a critical production backend that constitutes the core part of Numinos Technical Training Infrastructure. The goal of this project is to streamline the deployment process to this production environment. 

 

This case study outlines our journey towards achieving optimized deployment practices.

 

Project Info

Category

DevOps

Client

Numino

Tags

Technology stack

DevOps and Containerization
Test Automation Tools

Architecture

We provisioned AWS resources including EC2, ECS cluster, ECR repositories, and ECS services to facilitate deployment.

ALB Setup

Created an ALB with the required specifications including VPC, availability zones, public subnet, security group, and associated target group.

A target group with the appropriate settings and associated it with the VPC.

Configured ALB and target group for the ECS cluster to efficiently manage dynamic port mappings and incoming traffic distribution.

Scaling Mechanism
Scaling Mechanism

We implemented auto-scaling in ECS to dynamically adjust the number of EC2 instances based on resource utilization. We defined scaling policies based on CPU and memory utilization metrics.

ECS + CloudWatch
ECS + CloudWatch

Enabled CloudWatch Logs in ECS task definitions to monitor and troubleshoot containerized applications effectively.

Monitoring
Monitoring

Created CloudWatch log group and stream manually or through task definition settings, and monitored logs in the CloudWatch Logs console.

Network Settings Configuration
Network Settings Configuration

All resources were provisioned with proper network configurations, including VPC, subnet settings, and security group assignments, ensuring both connectivity and security.

Secret management
Secret management

All sensitive information, including AWS credentials, DB credentials, and other secrets, were securely stored as variables within GitLab CI/CD, ensuring that sensitive data remained protected.

Permissioning
Permissioning

IAM permissions to ensure proper access and logging permissions.

This approach allowed the deployment process to securely access the necessary resources without compromising sensitive information, enhancing the overall security posture of the deployment pipeline.

Pipeline Setup

We configured GitLab CI/CD pipelines to automate our deployment process. The pipeline consisted of three stages

Build
Build

Pulling the necessary image, installing dependencies, and creating a build of the application.

Test
Test

Installing Maven, setting up tunneling to RDS, running automated cucumber based tests, and storing test reports.

Deploy
Deploy

Pulling Docker image, configuring AWS CLI, creating and pushing Docker image to ECR, and deploying the application on ECS.

The pipeline is set up to trigger automatically upon any commits made to the main branch, ensuring that changes are rapidly integrated and deployed.

Metrics

Deployment Time Reduction
Deployment Time Reduction

The complete pipeline now takes an average of 10-12 minutes to run, signifying a significant reduction in deployment time compared to manual processes.

Deployment Success Rate
Deployment Success Rate

With the streamlined deployment process, the deployment success rate has remained consistently high, ensuring reliable and error-free releases.

Summary

Automation Efficiency

The implementation of GitLab CI/CD pipelines automated the deployment process, reducing manual intervention and potential errors. This resulted in faster and more reliable deployments.

Scalability

Integration with AWS ECS and auto-scaling enabled us to handle varying workloads efficiently. The system dynamically provisioned resources to meet demand, ensuring optimal performance.

Improved Testing

By incorporating automated testing into the pipeline, we enhanced the quality of our releases. Test reports provided valuable insights into application health and functionality.

Resource Optimization

Auto-scaling mechanisms in ECS effectively manage resource utilization, ensuring cost efficiency while meeting performance requirements. The scale-in and scale-out cooldown periods helped stabilize the system during scaling events.

Enhanced Visibility

GitLab CI/CD pipeline provided a centralized view of the deployment process, allowing us to monitor progress and identify bottlenecks or issues promptly.

Overall, the implementation of GitLab CI/CD pipelines integrated with AWS ECS, ECR, ALB empowered AMReplica to achieve efficient, scalable, and reliable deployment practices, ultimately enhancing their software delivery capabilities.

Test Automation Tools

DevOps and Containerization