Jenkins Project on AWS EC2 CI/CD
Deploying Jenkins within the AWS environment using an EC2 instance. Introduccion Jenkis Jenkins is an open-source automation tool used for continuous integration (CI) and continuous delivery (CD). It automates software development tasks such as building, testing, and deploying applications, improving software efficiency and quality. CI/CD Deployment with Jenkins on AWS EC2 Jenkins on EC2 In this project, we will implement a Continuous Integration (CI) and Continuous Delivery (CD) pipeline using Jenkins on an AWS EC2 instance. The goal is to automate the process of building, testing, and deploying an application. -Jenkins: CI/CD automation server -GitHub: Code repository -AWS EC2: Virtual instance for Jenkins CI/CD pipeline: -Build: Jenkins retrieves the code from GitHub and builds the application. -Testing: Jenkins runs unit and integration tests to validate the application. -Deployment: Jenkins deploys the application to the test server. -Validation: Jenkins runs validation tests to ensure the application is working properly. -Production deployment: Jenkins deploys the application to the production server. Commands to run in programmatic access in the EC2 CLI. ` sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key sudo yum upgrade Add required dependencies for the jenkins package sudo yum install fontconfig java-21-openjdk sudo yum install jenkins sudo systemctl daemon-reload ` Install Amazon Corretto Running this command will install Amazon Corretto 21 on your system, allowing you to develop and run Java applications. sudo dnf install java-21-amazon.corretto-devel java --versión Run and view the status of Jenkins on EC2. jenkins status sudo systemctl enable Jenkins sudo systemctl start Jenkins sudo systemctl status Jenkins Copy the IP of the instance port 8080 Example to paste into a browser tab: http://123.24.45.98:8080 6 jenkins unlok Security group Add the security group on port 8080 and in source myIP and put the instance's with the slash /32 Jenkins In Jenkins, branch management in a Git repository is essential for implementing Continuous Integration (CI) and Continuous Delivery/Deployment (CD) workflows. Here's how Jenkins handles branches: Configuring Branches in Jenkins You can configure Jenkins to automatically build when changes are detected on a specific branch of a Git repository. This is typically done in the Jenkins job configuration, specifying the branch or branches you want to monitor. Multibranch Pipeline Jenkins offers the "Multibranch Pipeline" feature, which allows you to create jobs that automatically detect and build branches in a Git repository according to a specified pattern. Jenkins Pipeline A Jenkins Pipeline is a suite of plugins that supports the deployment and integration of continuous delivery pipelines in Jenkins. A Jenkins pipeline is a sequence of automated tasks that execute in a series of defined stages, enabling the efficient and repeatable building, testing, and delivery of applications. Key components of a Jenkins Pipeline: Stages: A pipeline is divided into stages, such as "Build," "Test," and "Deploy." Each stage contains a series of steps that execute in order. Steps: Steps are the basic units of work within a stage. They can include shell commands, script execution, API calls, etc. Agents: Agents are the nodes where pipelines run. They can be the Jenkins master or slave nodes configured to perform specific jobs. Enrique Aguilar Martinez Cloud Engineer. DevOps Jr.

Deploying Jenkins within the AWS environment using an EC2 instance.
Introduccion Jenkis
Jenkins is an open-source automation tool used for continuous integration (CI) and continuous delivery (CD). It automates software development tasks such as building, testing, and deploying applications, improving software efficiency and quality.
CI/CD Deployment with Jenkins on AWS EC2
Jenkins on EC2 In this project, we will implement a Continuous Integration (CI) and Continuous Delivery (CD) pipeline using Jenkins on an AWS EC2 instance. The goal is to automate the process of building, testing, and deploying an application.
-Jenkins: CI/CD automation server -GitHub: Code repository -AWS EC2: Virtual instance for Jenkins
CI/CD pipeline:
-Build: Jenkins retrieves the code from GitHub and builds the application. -Testing: Jenkins runs unit and integration tests to validate the application. -Deployment: Jenkins deploys the application to the test server. -Validation: Jenkins runs validation tests to ensure the application is working properly. -Production deployment: Jenkins deploys the application to the production server.
Commands to run in programmatic access in the EC2 CLI.
`
sudo wget -O /etc/yum.repos.d/jenkins.repo \
https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
sudo yum upgrade
Add required dependencies for the jenkins package
sudo yum install fontconfig java-21-openjdk
sudo yum install jenkins
sudo systemctl daemon-reload
`
- Install Amazon Corretto Running this command will install Amazon Corretto 21 on your system, allowing you to develop and run Java applications.
sudo dnf install java-21-amazon.corretto-devel
java --versión
Run and view the status of Jenkins on EC2.
jenkins status
sudo systemctl enable Jenkins
sudo systemctl start Jenkins
sudo systemctl status Jenkins
- Copy the IP of the instance port 8080 Example to paste into a browser tab: http://123.24.45.98:8080 6 jenkins unlok
- Security group Add the security group on port 8080 and in source myIP and put the instance's with the slash /32
In Jenkins, branch management in a Git repository is essential for implementing Continuous Integration (CI) and Continuous Delivery/Deployment (CD) workflows. Here's how Jenkins handles branches:
Configuring Branches in Jenkins You can configure Jenkins to automatically build when changes are detected on a specific branch of a Git repository. This is typically done in the Jenkins job configuration, specifying the branch or branches you want to monitor.
Multibranch Pipeline Jenkins offers the "Multibranch Pipeline" feature, which allows you to create jobs that automatically detect and build branches in a Git repository according to a specified pattern.
Jenkins Pipeline
A Jenkins Pipeline is a suite of plugins that supports the deployment and integration of continuous delivery pipelines in Jenkins. A Jenkins pipeline is a sequence of automated tasks that execute in a series of defined stages, enabling the efficient and repeatable building, testing, and delivery of applications. Key components of a Jenkins Pipeline:
Stages: A pipeline is divided into stages, such as "Build," "Test," and "Deploy." Each stage contains a series of steps that execute in order. Steps: Steps are the basic units of work within a stage. They can include shell commands, script execution, API calls, etc. Agents: Agents are the nodes where pipelines run. They can be the Jenkins master or slave nodes configured to perform specific jobs.
Enrique Aguilar Martinez Cloud Engineer. DevOps Jr.