This repository contains a CI/CD project that allows you to automate the process of building, testing, and deploying your application using AWS Developer Tools.
To get started with this project, follow these steps:
- Clone the repository onto your local machine.
- Install the necessary dependencies.
- Configure your AWS credentials.
- Update the configuration files to suit your needs.
- Create 2 IAM Roles one for Ec2 and other for CodeDeploy Service.
This project requires the following dependencies:
- AWS Ec2
- S3 Bucket (For Artifacts)
- CodeCommit
- CodeBuild
- CodeDeploy
- CodePipeline
- Nginx
To configure this project, you will need to update the following files:
buildspec.yml
: This file contains the build commands for the Appappspec.yml
: This file contains the specifications used after deploymentinstall.sh
: This script installs CodeDeploy agent for AWS in the server.install_nginx.sh
: This script installs NGINX in the serverstart_nginx.sh
: This script starts the NGINX
To use this project, follow these steps:
- Push changes to your CodeCommit repository.
- CodeCommit will check for changes and trigger a build
- Configure the CodeBuild using the
buildspec.yml
and click ‘Start Build’ - Configure S3 as Artifact Storage and set path as needed.
- Configure an EC2 Instance , give IAM Permissions as per needed and Install CodeDeploy-agent from
install.sh
file - Configure CodeDeploy by using
appspec.yml
and deploy on the configured EC2 Instance. - Restart Codedeploy-agent in the instance
- Check by simply navigating to the Public IP of the instance and fix issues if any.
- After it is Deployed , create a pipeline in CodePipeline and make changes in the code , see if the pipeline triggers on its own.
- Fix issues if any
If you would like to contribute to this project, please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for more information.
Pipeline
Output