Skip to content

ProjectTech4DevAI/infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform and Shell Scripts for ECS Environment Setup

This repository contains Terraform files and shell scripts to create a new Amazon ECS (Elastic Container Service) environment within a new VPC (Virtual Private Cloud). These scripts automate the provisioning of AWS infrastructure for deploying containerized applications efficiently.

🚀 Steps to Set Up the ECS Environment

Follow the steps below to successfully create and deploy your ECS environment.

Step 1: Install and Configure AWS CLI

Before running the setup, ensure that the AWS CLI is installed and configured on your local machine.

Step 2: Run the Shell Script to Create the Environment

Execute the shell script to initiate the ECS setup:

/bin/bash run.sh <github-repo-name>

📌 What this script does:

  • Runs a Python script in the backend to automate resource creation.
  • Sets up AWS VPC, Subnet, Internet Gateway, ECR Repository, ECS Cluster, and ALB.
  • Upon successful execution, the script returns the Application Load Balancer (ALB) URL, which is required to access the deployed application.

Step 3: Create Your Own Repository from the Python App Boilerplate

To deploy your application, create a new repository based on the Python-app boilerplate.

Step 4: Push Code Changes to Trigger GitHub Actions

Make any new commit to the main branch of your repository. This will automatically trigger a GitHub Action that:

  • Builds the Docker image of your application.
  • Pushes the image to Amazon ECR (Elastic Container Registry).
  • Deploys the application to Amazon ECS.

Step 5: Access Your Deployed Application

Once the deployment is successful, you can access your application using the ALB URL obtained in Step 2.

🔗 Application URL: http://<ALB-DNS-Name>


🎯 Summary

Automated infrastructure provisioning using Terraform and shell scripts
Secure and scalable ECS deployment in a new VPC
Seamless GitHub Actions integration for CI/CD
Easy application access via ALB URL

This setup ensures a smooth and automated deployment process for your Python-based containerized applications on AWS ECS. 🚀

For any issues or improvements, feel free to open an issue or contribute to this repository! 😊

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published