Introduction:
The purpose of this project is to gain hands-on experience on DevOps concepts. In this project, I designed and deployed a fully containerized application using docker, AWS EC2 and linux environments. This project showcase my skills in DevOps practices including conatiner orcestration , linux and cloud infrastructure setup enmabling seamless application delievery and management.
Following tools are used in this project:
-
Version Control:
Git along with Github(to store source code) is used for version control, allowing me to track changes, managing source code, configuration files, and Docker setup throughout the project.
-
Containerization:
Docker was used to containerize the application, ensuring it could run consistently accross different environments. I created a Dockerfile to define setup and built(image pushed to DockerHub) and packaged the application with all it's dependencies.
-
CI/CD:
Jenkins(on Local machine) was used to automate the build, test and deployement process. I setup a pipeline script that pulls the code from Git,build image , test and deploy the updated container on AWS EC2.
-
Testing:
ESLint is used in this project to check javascript code quality and check for potential issues. Other testings will be applied soon.
-
LocalTunnel:
Used localtunnel to expose locally installed jenkins to the Internet by creating a secure URL.
-
Webhooks:
Github Webhooks are used to trigger the jenkins pipeline to automate the build when new code(or new changes) are pushed to github.
-
WebServer:
Nginx was used as a WebServer to server my portfolio application on EC2, handling incoming HTTP traffic requests, served static files efficiently ensuring fast and smooth delievery.
-
AWS EC2:
AWS Elastic compute cloud was used to host and run the application in an reliable cloud environment. I launched an EC2 instance, installed Nginx and deployed my porject there ensuring high availability.
Good Practices I considered:
-
Local Installation:
Installed Jenkins locally not on EC2 instance to avoid high use of EC2 resources.
the tool LocalTunnel helped me to use Jenkins in professional manner.
-
Email Notification:
Configured and utilized Email Notification service to get build information quickly whether build is successful or not so that instant action can be taken.
-
Budget and Alarms:
Setted up budget and alarms on AWS so that I can avoid charges and remain within the free-tier.
-
Backup:
As Jenkins is locally installed, I used a script that backups my jobs and important files to drive.
-
Task Scheduler:
Windows task Scheduler is used to run the script on a particular time that backups all important jobs, configuration files everyday. Another task Scheduler is used to wake Google Drive(Installed locally) so that it mount the Drive in the memory and script is able to find the correct path for backup.