github-projects
aws-jenZ-cli-deploy
What Is

Automated Infra+APP Deployment via AWS CLI in Jenkins

In this project, we set up a deployment pipeline to manage application releases across Pre-Production (PP) and Production (PROD) environments using Jenkins and AWS. The process involves Bluegreen, and automated traffic management to ensure smooth transitions between environments.

Project Overview

Deployment Jobs in Jenkins

  1. PP Deployment: Deploys code to the PP environment and switches traffic to the updated PP instance.
  2. PROD Deployment: Deploys code directly to the production server.
  3. AMI and ASG Update: Creates a new AMI from the PROD instance, updates the launch template, and deploys a new EC2 instance within an Auto Scaling Group (ASG), ensuring that traffic is seamlessly switched to the updated instances.

Prerequisites

  • AWS CLI: Ensure AWS CLI is installed and configured on the Jenkins server with credentials for full admin access.
  • Environment Variables: Key variables such as Git credentials, deployment tags, instance IDs, and ALB settings must be set to align with your AWS setup.

Key Deployment Steps

  1. Initiate Deployment in PP: Start the PP server instance, verify status, and deploy code, followed by health checks.
  2. Balance Traffic between PP and PROD: Modify ALB listener settings to balance traffic, validating the deployment stability.
  3. Deploy to Production: Deploy code to PROD, following similar steps as in PP.
  4. Update ASG with New AMI: Create a new AMI from the PROD instance, update the launch template, and update ASG to replace instances.
  5. Shutdown PP Post-Deployment: Stop the PP instance post-verification to optimize resources.

Conclusion

This setup provides an automated, controlled deployment process across environments, minimizing downtime and maintaining application stability. Follow each step closely and adjust environment variables as needed to fit your configuration.

For more details, refer to the complete deployment guide in the GitHub repository and the attached PDF.


This overview is suitable for understanding the deployment flow, while detailed steps and commands are available in the GitHub project.


🧙 AI Wizard - Instant Page Insights

Click the button below to analyze this page.
Get an AI-generated summary and key insights in seconds.
Powered by Perplexity AI!