JENKINS

Blog
Spread the love

JENKINS

Introduction and Installation

extention_2023

Background:

In today’s we are emerging over the technical and quick solution. We are having different servers whether it is related to AWS instance, azure server.

In today’s blog I am going to focus on some deployment techniques related to Jenkins. Mainly today I will cover introduction part.

Why are we using Jenkins?

When we talk about Jenkins we need to first talk about CI/CD (Continuous Integration and Continuous Development)

From my point of view CI/CD is the process to automate your deployments.
Suppose you have one server, and you need to deploy your code. Mainly Manual steps would be going to server command line and run the git commands and then run framework command to run the deployments.

We can automate this process with the help of CI/CD integration with git. Whenever there will be any Merge or Pull requests in your git branch then automated process will run through Jenkins and deployment will be taken.

Also, we have CI/CD process with GitLab also.

So, we are using Jenkins to automate the process.

Installation process of Jenkins with Docker

First step to start this process need to install docker and docker compose in your Linux machine.

You can go through the official blog to install the docker and docker compose

https://docs.docker.com/engine/install/ubuntu/

Create one directory under var/www/jenkins

In this folder take the pull of docker jenkins images with command

docker pull jenkins/jenkins

Then create one volume directory that will have all data related to jenkins
Note: Volume is set of files in directory, docker use this keyword volumes:

– “$PWD/jenkins_home:/var/jenkins_home”

To download the files in particular folder when docker-compose run

Now the main step to create docker-compose.yml file with content

Description of docker-compose.yml file

  1. Version: Here the version represents the file format of docker-compose file. It also means that you are going to create new plugin
  2. Services: It means the services or resources that going to use with in compose file
  3. Jenkins: it is service name

Next Step:

Need to run command in directory

docker-compose up –d

It will create the container

Now go to URL:

http://localhost:8080/

It will ask for initial password you can find in directory

jenkins_home/secrets/initailpassword

extention_2023

Click on Install Suggested Plugin and wait for some time It will take some time to have on Getting Started page

extention_2023

Now create admin user

extention_2023

After this you can be redirected to Jenkins dashboard

extention_2023

How to create your first job

To automate any process, we are using to create job in Jenkins

Today I will tell how to create your first job manually.

Go to dashboard click on + New item

extention_2023

After this it will redirect to new page Enter any custom name for now, I have given second job and then click on freestyle project and then click on OK

extention_2023

For now, you need to fill description only and on build steps choose execute

shell and write in execute shell

Echo this is second job

Click on save

extention_2023

extention_2023

extention_2023

After saving it will redirect to new page and click on build now

extention_2023

After clicking on new build id, you will be able to see the console output

extention_2023

aman shukla

aman shukla

2024-02-07

0

Leave a Reply

Your email address will not be published. Required fields are marked *

Find More Blogs

How to Add a Custom Tab to the Customer Order Detail Page in Magento 2

Spread the love Adding a custom tab to the Order Detail

Exception Handling in Java

Spread the love Introduction – Exception:An unwanted

How to add custom less file in Magento2

Spread the love Source files *.css included into layout

Spring Boot Microservices

Spread the love Microservices architecture has become

Implementation of WireMock for better testing

Spread the love WireMock is a flexible and powerful tool

Magento 2: How to selected default option in configurable options?

Spread the love Configurable products in Magento 2 allow

How To Implement Simple JWT Authentication in Django Rest Framework

Spread the love We’ll learn how to use simple JWT

Optimizing Search: Integrating Elasticsearch in Django Applications

Spread the love What is Elasticsearch? Elasticsearch is a

How to create Customer Segments

Spread the love In Magento 2, “customer

Proxy Design Pattern and Requisition List in Magento 2

Spread the love Requisition List in Magento 2 Requisition

bluethinkinc Blogs