This repository contains the source code and configuration for a simple web application and a Continuous Integration / Continuous Deployment (CI/CD) pipeline using AWS services, including AWS CodePipeline, AWS CodeBuild, and AWS Elastic Beanstalk.
- Overview
- Requirements
- Getting Started
- Pipeline Stages
- Automated Testing
- Deployment
- Contributing
- License
- Output
The primary goal of this project is to set up a CI/CD pipeline that automates the build, test, and deployment of a simple web application to AWS Elastic Beanstalk whenever changes are pushed to the repository. Below are the key components of the project:
-
Web Application: A simple web application that is hosted on AWS Elastic Beanstalk.
-
CI/CD Pipeline: The CI/CD pipeline is defined using AWS CodePipeline and includes the following stages:
- Source: Pulls the code from the repository.
- Build: Builds the application using AWS CodeBuild.
- Deploy: Deploy the application to Elastic Beanstalk using CodePipeline to Elastic Beanstalk integration.
To set up and use this CI/CD pipeline, you need the following requirements:
- An AWS account with the necessary permissions.
- An AWS Elastic Beanstalk environment for hosting the web application.
- A GitHub repository to host the source code.
- An AWS CodeBuild project for building the application.
Before you start, ensure you have the following prerequisites:
- AWS account credentials configured on your local machine.
- AWS CLI and AWS Elastic Beanstalk CLI (EB CLI) installed.
- GitHub repository with your web application code.
-
Create a GitHub Repository: Create a new repository for your web application on GitHub.
-
Configure AWS Services:
- Set up an AWS Elastic Beanstalk environment to host your application.
- Create an AWS CodeBuild project for building your application.
-
Create AWS CodePipeline:
- Set up an AWS CodePipeline that defines the source, build, and deploy stages.
-
Configure Automatic Trigger:
- Configure the pipeline to be triggered automatically whenever there is a change to the code in your GitHub repository.
-
Deploy the Pipeline:
- Deploy the configured pipeline in AWS.
The CI/CD pipeline is composed of the following stages:
-
Source Stage:
- This stage pulls the code from your GitHub repository whenever changes are pushed.
-
Build Stage:
- This stage builds the application using AWS CodeBuild, ensuring that your application is ready for deployment.
-
Deploy Stage:
- This stage deploys the application to the Elastic Beanstalk environment using CodePipeline's integration.
You can add automated tests to your application and configure the pipeline to run these tests before deploying the application.
Your web application will be automatically built, tested (if configured), and deployed to AWS Elastic Beanstalk whenever changes are pushed to your GitHub repository.
We welcome contributions to this project. Please feel free to submit issues, feature requests, or pull requests.
This project is licensed under the MIT License.
Happy coding and automating your deployments with AWS! 😊