Day 25 Task: Complete Jenkins CI/CD Project - Continued with Documentation
Task-01
Document the process from cloning the repository to adding webhooks, and Deployment, etc. as a README , go through this example
A well written readme file will help others to understand your project and you will understand how to use the project again without any problems.
Title: Node.js CI/CD Pipeline with Docker.
Overview: This project sets up a continuous integration and continuous deployment (CI/CD) pipeline for a Node.js application using Docker and Jenkins on an AWS EC2 instance.
Steps:
Launch an EC2 instance on AWS with an Amazon Linux 2 AMI / Ubuntu. Connect to EC2 Instance
Connect to your EC2 instance using SSH.
Install Docker
sudo apt update sudo apt install docker.io sudo usermod -a -G docker $USER sudo systemctl start docker
Install Java:
sudo apt update sudo apt install fontconfig openjdk-17-jre
Install Jenkins:
Download and install Jenkins from jenkins
Create Jenkins Job:
Create a new job, provide name and select "Pipeline" as the job type.
In the job configuration, select "Pipeline script" and paste the provided script.
Configure GitHub Webhook:
Under "Build triggers," select "GitHub hook trigger for GITScm polling."
Create GitHub Webhook:
In your GitHub repository settings, navigate to "Webhooks" and create a new webhook. Set the payload URL to http://<jenkins-host>:<jenkins-port>/GitHub-webhook/.
Create Docker Compose File:
Create a docker-compose.yml file.
version: '3.9' services: web: image: "200520210786/node-todo-app-jenkins-masteer-ageent:latest" ports: - "8000:8000"
Commit and Trigger Pipeline:
Commit changes to your GitHub repository and wait for Jenkins to trigger the pipeline automatically.
Access your Application:
Once the pipeline completes successfully, your application should be accessible at http://<publicip>:8000.
Task-02
Also it's important to keep smaller goals, as its a small task, think of a small Goal you can accomplish.
Write about it using this template
Have small goals and strategies to achieve them, also have a small reward for yourself.
Goal: To Become a DevOps Engineer.
Strategies:
Learn Cloud Computing (AWS)
Continuous Learning
Expertise in Automation Tools and Technologies
Strong Foundation in Software
Note to Self:
The more you read, the more things you shall know. The more that you learn, the more places you shall go.
Result:
Achieving the goal of becoming a DevOps engineer through dedication, improvement and continuous learning!