How to install Jenkins | Jenkins Simplified Installation on Ubuntu & Windows | First Freestyle Job
Aug 16, 2023
How to install Jenkins | Jenkins Simplified Installation on Ubuntu & Windows | First Freestyle Job
Join the Indiaās Largest Tech Cult! š Enter 2021 contest here - https://gleam.io/aEOQ8/giveaway-free- ⦠Winners will get: š§« Alexa Echo Dot 4th Generation š Cool T-Shirts š» Laptop Stickers Jenkins is the most popular CI tool right now in the market. With the help of Jenkins we can integrate many tools that we use software lifecycle so that everything comes under one. In this video, we are going to see how to install Jenkins on Ubuntu \u0026 Windows. For Ubuntu, we are going to use 1) Virtual Box and 2) Vagrant . #Jenkins #JenkinsS01E01 #JenkinsInstallation #ContinuousIntegration #DevOpsTools #DevOps #Vagrant #VirtualBox #Ubuntu #Windows #FreeStyleJob Timestamps :- ------------------------- 00:00 - Introduction to video 01:10 - Pre-requisites to run Ubuntu on windows 03:52 - Vagrant Initialization 06:31 - JDK installation on Ubuntu 08:05 - Jenkins Installation on Ubuntu 09:01 - Jenkins Installation on Windows 11:01 - Setting Up Jenkins ( Common for both Ubuntu \u0026 Windows ) 12:15 - Creating our first Jenkins job Ā All the commands executed in the video and important links can be found below : Oracle VirtualBox - https://www.virtualbox.org/wiki/Downl ⦠Vagrant - https://www.vagrantup.com/ Jenkins Installation guide - https://www.jenkins.io/doc/book/insta ⦠JDK Download - https://www.oracle.com/in/java/techno ⦠Jenkins for Windows - http://mirrors.jenkins.io/windows/2.232/ Commands for Vagrant : --------------------------------------- vagrant init vagrant up vagrant ssh Commands for ubuntu: -------------------------------------- java -version sudo apt search openjdk sudo apt install openjdk-11-jdk Commands for Jenkins installation on Ubuntu: ------------------------------------------------------------------------ wget -q -O - http://pkg.jenkins-ci.org/debian/jenk ⦠| sudo apt-key add - sudo sh -c āecho deb https://pkg.jenkins.io/debian-stable binary/ {filler} \ /etc/apt/sources.list.d/jenkins.listā sudo apt-get update sudo apt-get install jenkins ** Please replace {filler} with āgreater than symbolā as Youtube doesnāt allow that symbol in description Credits :- ------------------- Subscribe Overlay button: āSubscribe Buttonā by MrNumber112 Ā Ā Ā ā¢Ā FreeĀ Download:Ā SubscribeĀ ButtonĀ +Ā Notā¦Ā Ā Inspired by LeBouseuh Ā Ā Ā /Ā @levraibouseuhĀ Ā \u0026 Liam Ā Ā Ā ā¢Ā SubscribeĀ ButtonĀ GreenĀ ScreenĀ Ā
Content
0.96 -> Hello Everyone ⦠Welcome back to our channel.
3.51 -> Hope everyone is doing good.
4.51 -> In this video, we are going to see how to
setup jenkins on Ubuntu ( which is one of
12.08 -> the Linux version ) and on Windows.
16.01 -> Maybe a question would arise as to why on
ubuntu ? Well, if you take DevOps infrastructure
23.13 -> of most of the teams ⦠more than 90% of
them will have their Jenkins running on Linux
29.499 -> Operating System like CentOS or Red Hat Enterprise
Linux or Ubuntu.
34.89 -> The reason behind this is Linux comes with
great benefits like scalability, flexibility
40.989 -> and easy to install packages etc.
45.829 -> Also, the security feature of Linux is a major
plus.
50.09 -> So, in order to understand DevOps completely
one must have good Linux skills too.
57.26 -> With that being said ⦠let's begin
59.149 -> So, first we are going to start with Ubuntu.
67.659 -> If you are already running any linux version
on your local then you can directly skip to
76.25 -> Jenkins installation step which is marked
in the timestamp.
80.89 -> Now, If you are running Windows on your local
machine then there are some pre-requisites
86.909 -> which needs to be installed first in order
to launch a ubuntu machine on top of your
92.64 -> windows machine.
93.75 -> First one is Oracle Virtual Box and the second
is Vagrant.
100.799 -> So, let's start installing Virtual Box.
116.95 -> Select Windows Host and you can see an executable
file will be downloaded.
123.28 -> Once the download is complete, just run the
exe file, click 'Next' and approve the license
131.16 -> terms.
132.83 -> The installation is just simple as that.
137.5 -> Now, we are going to install Vagrant.
152.66 -> Download the msi file and follow the standard
installation procedure same as earlier.
161.28 -> Once the installation of Virtual Box is complete
you should be able to see this screen.
166.58 -> You can see currently we don't have any machines
running.
171.2 -> If I click 'Add' it will ask me to import
an vbox file.
179.3 -> Finding an appropriate box and downloading
it is somewhat lengthy.
183.88 -> So, that's where Vagrant helps us.
190.45 -> By running a couple of commands , we can launch
an ubuntu on the Virtual box.
196.72 -> Create a new folder in your local drive where
you want to store the ubuntu box.
206.86 -> If you have git installed, then right-click
and select Git bash.
212.9 -> I, personally feel more comfortable with Git
bash.
216.59 -> If you donāt have Git then no worries, you
can execute the commands from your windows
222.041 -> command prompt terminal
We are going to check if vagrant is correctly
226.37 -> installed ⦠and we can see that vagrant
is installed.
231.92 -> Now, visit the Vagrant site again, go to 'Find
Boxes' and search for ubuntu box.
243.62 -> You can switch to 'new' tab and execute the
same commands from your terminal
267.03 -> After executing the initialization command
, we can see that a vagrant file is generated
275.89 -> in the folder.
278.919 -> I'm going to open it to check some configurations.
285.379 -> This is the one configuration which we are
going to uncomment and modify the guest port
297.96 -> to 8080 and we will see soon why this needed.
303.15 -> Save the file and exit.
305.909 -> Now execute the vagrant up command . As we
are bringing up the ubuntu box for the first
311.409 -> time it will take some time to complete
316.129 -> After the installation is complete, you should
see this window which displays all the configurations
322.47 -> of our ubuntu box.
324.129 -> Now, we will ssh into the box
If we observe the above output, we can see
332.65 -> the 'vagrant' user generated along with ssh
key.
338.629 -> Also this command is easier if we compare
with our usual ssh command that we use on
344.159 -> Linux server.
346.24 -> Now we have successfully logged in to our
ubuntu box
356.34 -> As our Virtualbox installation is complete,
we can see that it is running our ubuntu box
362.469 -> launched by vagrant
366.169 -> Now , to install jenkins we are going to follow
the official documentation as it is.
375.389 -> We can see the Minimum requirements mentioned
for the Jenkins to run smoothly
385.189 -> Installing Java is mandatory as Jenkins can't
run without Java
394.439 -> I'm going to check the java version on the
ubuntu box.
399.77 -> Looks like we don't have any version installed.
403.21 -> Currently Jenkins supports only JDK8 and JDK11
and that too JDK 11 is compatible with Jenkins
411.591 -> 2.164 and above
So, if you donāt have any java installed
417.08 -> on your ubuntu then execute the following
command to check for available jdk versions
425.29 -> Here we can see that, only jdk11 is available
on my ubuntu box ⦠so, I'm going to install
430.99 -> jdk11 on my ubuntu.
432.919 -> So, whatever ubuntu box that you have selected
from vagrant, check if it has jdk8 or jdk11.
439.009 -> If not then destroy the box and pick the correct
one else you will run into errors while installing
445.74 -> Jenkins.
448.319 -> JDK installation usually takes more time.
453.009 -> So, let's wait
Our jdk installation is finally complete,
468.559 -> I'm checking for the java version again.
476.139 -> Now we can see that jdk11 is installed on
our ubuntu
486.599 -> I'm just executing the steps from the official
documentation here
492.62 -> Jenkins installation also takes time ⦠so
let's wait
509.389 -> We can now see that Jenkins has been successfully
installed
512.65 -> Now, let's try to access our jenkins through
browser.
520.91 -> And Jenkins is showing up
Earlier we have enabled port forward configuration
526.711 -> in vagrant file.
528.63 -> This configuration helps us to access the
Jenkins installed on Virtual box from our
534.39 -> local windows machine browser.
535.82 -> So, that is the reason we have to edit it
543.63 -> Let's see how to install jenkins on Windows
First we need to check the java version in
551.37 -> my local machine.
552.37 -> As we can see Java 1.8 is already installed
in my local.
557.32 -> So, I will not be doing any new installation
here.
561.59 -> I'm just going to get the path where the java
is installed
567.07 -> If you couldn't find any jdk on your machine
then download the jdk from the link given
571.97 -> in description
The installation of jdk will be straight-forward.
578.96 -> Only one thing to remember is please copy
the java path while installing the jdk because
585.66 -> we need it during jenkins installation
Also remember to pick correct jdk and jenkins
592.77 -> combination i.e, if you are installing jdk11
then you should pick >= Jenkins 2.164
600.51 -> Now, I'm going to download the jenkins 2.232
from the website and start installing it
609.54 -> Click on Next and when it prompts to enter
the java path, paste the one which you have
635.4 -> copied earlier and click 'Next'
Finish your installation and then your browser
643.08 -> should automatically open up localhost
Give it sometime and once the installation
651.1 -> is complete then you should see this screen
Retrieve the admin password from the below
658.4 -> directory and proceed further
664.38 -> We have retrieved our admin password from
the ubuntu box as well.
675.06 -> Once the password is authenticated, we can
see that Jenkins prompts for the plugin installation.
685.8 -> As Jenkins is a CI tool, it helps us to integrate
with other tools easily and this can be done
691.95 -> by installing respective plugins
For now, we are going to install suggested
698.76 -> plugins
707.48 -> Once the plugins are installed , we can see
in the next window which prompts to create
713.16 -> our first user.
715.33 -> I'm just going to fill out these details.
719 -> Now, we can see that we can modify the jenkins
URL as per our need.
725.46 -> Let's complete the setup
Now Our Jenkins installation is finally complete
732.98 -> and it is running !
734.43 -> Let's create our first jenkins job.
740.71 -> We can see that there are different types
of jobs like freestyle, pipeline and others
747.76 -> etc.
748.76 -> We will discuss about each of them as we progress
through this series.
753.13 -> For now, We are just going to build a job
which executes a shell command.
764.81 -> Select the name for the job
Let's add some description
778.15 -> Next, we can see SCM which needs to be configured
if we are pulling the code from Git or bitbucket
792.5 -> We have many Build Triggers, which triggers
our jenkins job accordingly
797.13 -> Now, for the actual 'Build' step , we can
see, we can execute Ant or Gradle or Maven.
807.31 -> If we add more plugins we can see them appearing
here respectively
813.04 -> Let's select 'Execute Shell' and print a simple
message
818.21 -> Yeah, now we can see that our build is successful
and our job has been successfully executed.
837.44 -> So, with this video, we have covered the installation
of Jenkins on Ubuntu and Windows and building
844.07 -> your first job.
845.63 -> Try it out on your local machines and if you
encounter any errors, please reach out to
851.12 -> us in the 'Comments' section.
853.99 -> We will try to address it as quickly as possible
859.06 -> In our next sessions we will explore more
about Jenkins like building a project by pulling
865.23 -> the code from SCM, Pipeline jobs, Jenkins
administration etc.
872.1 -> If you haven't subscribed to our channel,
please subscribe now so that you don't miss
876.82 -> any of them
879.6 -> See you all next time.
880.6 -> Until then, This is Rajesh signing-off ā¦.
Source: https://www.youtube.com/watch?v=OhahwrzqEoQ