Site Loader
Introduction to DevOps | DevOps Tutorial for Beginners | DevOps Training | Edureka

Welcome everyone to Edureka
YouTube channel. My name is Saurabh and today I’m going to focus on introduction
to DevOps. So, without any further ado let us move forward and have a look at
the agenda for today. So this is what we’ll be discussing today we’ll begin by
understanding what exactly is DevOps and how it works we’ll also look at
various DevOps phases and one of the various DevOps tools available in the
market after that will focus on a couple of fuse cases of Devops how it can be
implemented into your life and then finally in the hands-on part I’ll show
you how you can prepare a bill pipeline using Jenkins so let’s move forward guys
and understand what is DevOps if you want to know why they’ve officers
introduced what was the methodology before DevOps you can refer the DevOps
tutorial video I’ll leave the link in the description box below so here I’ll
be discussing only about DevOps what exactly it is so DevOps is basically a
software development strategy it is not a tool it is not a technology it is not
a framework it is a methodology and the aim of this methodology is to bridge the
gap between development team and the operations team there are lot of
conflicts between the two teams for example though software works in the
developers laptop but it doesn’t work in the tests or the production environment
similarly the dev team wants agility whereas the ops team want stability so
there are many other conflicts between the dev and the off side of the company
which resolve with the help of DevOps right so what exactly is DevOps
basically it is a software development strategy and the aim of this strategy is
to bring together to Devon the off side of the company now this slide basically
tells us about what are the various phases involved in DevOps and what are
the various tools available for those phases so the first thing is planning
you get the requirement from the client you start planning your application
right and once planning is done you start writing the code now there are
multiple developers who are writing code for that particular application so you
need a system that can manage the code for example if I want to go back to the
previous commit how can I do that or if I want to check the previous version of
the code basically to manage the source code we have multiple tools like gate
subversion git is a decentralized version control tool and is preferred by
mostly industries and this is included in the courses well after that the code
is built now build life cycle includes lot of things it includes validation of
your application compiling your application packaging your application
performing unit tests integration tests those things are done in this face then
what happens the build application is deployed onto the test servers for
testing and once testing is done it is deployed onto the prod servers for
release and after that it is continuously monitored by tools like nag
us in Splunk now let me focus on the tools which are there so for the build
we have multiple tools like maven and and Gradle depending on the kind of
application you have you choose the build tool for Java applications we
usually go for maven then for testing that is the end user testing or you can
even consider it as functional testing in this case we use selenium after that
in order to deploy the application onto the prod servers there are tools like
puppet chef ansible and salsa so puppet chef Hansel and salsa are tools like
these are called configuration management tools the major aim is to
provision and deploy your application to provision your nodes for example in the
test server I might require a particular software stack maybe a lamp stack right
so I can write scripts using these tools and can deploy it onto the test servers
as well as in the prod servers so all of these four tools have a similar
architecture that is a master/slave architecture in which I can write the
scripts for a particular software stack in the master and deploy it onto the
notes right so with this we can actually maintain an accurate historical record
of a previous system State as well so if I want to roll back to the previous
version of the software stack I can do that as well because everything is well
documented in the master so it can be a puppet master it can be a chef master
can be ansible control machine or it can be a salt
master as well so these are the four tools that we call configuration
management tools and they play a major role in DevOps now for docker it is
basically a containerization platform so what I mean by that is you can create a
docker containers which provide the consistent computing environment
throughout the hdl-c lifecycle plus it basically containerized is your
application and has a lot of advantages over virtual machines if you have heard
about micro services so docker is an ideal environment to have a micro
service architecture right I’ll discuss more about docker in detail later on
currently just understand that it is a container ization platform now the heart
of devops is this integration phase that you can notice here and what the most
famous continuous integration tool is called Jenkins Jenkins has well over
2,500 plug-ins for various development testing and deployment technologies so
what exactly is integration here basically
integrating all the stages that you have seen all the stages whether it’s coding
building source code management of building your application testing it
deploying it monitoring it all of these phases are integrated with the help of
tools like Jenkins so let me give you a scenario how we can use Jenkins at the
moment any developer makes a change in the source code in the shared repository
Jenkins will pull that code and prepare a build once the build lifecycle is
complete it will deploy that build application on to the test servers for
testing then it will deploy it onto the prod servers for release and finally it
will be continuously monitored by tools like Naga voice which will give the
feedback to Jenkins and it will notify the concerned teens about it right so
this is how Jenkins work guys this is one use case that I’m telling you about
and this is basically cut the nest deployment so this is basically how we
can use Jenkins and DevOps lifecycle now let’s move forward and we’ll focus on
how you can implement the verbs in the real life so we’re going to discuss a
couple of examples here so one example is that you have a source code in the
git repository this is how you are managing your code you have multiple
developers committing code to the shared repository several times a day so
Jenkins will pull that code prepare a build then deploy it onto the test
servers and then finally deploy it onto the prod servers your tests and prod
servers are configured by tools like puppet chef and ansible so these tools
the CM configuration management tools that I’m talking about puppet chef
ansible are really important guys because they not only maintain the
accurate historical record of your system state they also ensure that the
computing environment remains same throughout the software delivery
lifecycle my major aim is to replicate what is there in a developer’s laptop
throughout the software delivery lifecycle so that I don’t face a problem
where the application works finally the developer but doesn’t work well in the
production or in the test environment right so that’s why we use puppet chef
and ansible now let me tell you a very good example where puppet has actually
saved millions of dollars everyone’s heard about New York Stock Exchange
right so in New York Stock Exchange the software of a trading terminals was
upgraded with the help of puppet it was working fine that day but in the next
morning it didn’t work properly they have a lot of bugs with us now with the
help of puppet New York Stock Exchange was able to roll back to the previous
table version of the surface thought within 90 minutes people might think
that 90 minutes is a lot but is not it is actually a success of
configuration management due to which the New York Stock Exchange was able to
save billions of dollars imagine what would have happened if the problem would
have continued so this is an example of DevOps how you can implement it now let
me talk about docket a bit how you can implement a docker
in DevOps right so these are the two ways in which you can use docker in the
box so what happens a developer writes the project code in a docker file for
example a requirement for a micro service whatever the requirement for the
application is the developer will write a simple docker file right it’s very
easy to write once the docker file is written we can build docker images from
that and with the docker image we can build as many containers as we want
now containers are nothing but an environment where you can run your
application for example if I require a Linux environment I can run a Linux talk
a container right similarly that depends on the kind of environment that you what
then what we can do is you can upload the docker image onto docker hub and
through docker hub various themes Beach staging or production can pull that
docker image and prepare as many containers as they want now docker hub
is nothing but I get repository of docker images now with this architecture
what is the advantage so whatever was there in the developers laptop I was
able to replicate it in the staging as well as in the production in one
similarly there is one more way you can use docker so if you write a complex
requirement for a Microsoft or Cerf I’ll upload that onto the git repository so
from git repository Jenkins can pull that docker file and build whatever was
there in the developers laptop into testing staging and production right so
these are the two ways in which you can use docker in DevOps now let’s move
forward and we’ll understand a very interesting topic called continuous
integration containers delivery and containers deployment I actually noticed
that a lot of people have confusion behind these three concepts so let me
just clear that out for you and it is one of the very important concepts in
DevOps so let me introduce continuous
integration first so the moment any developer commits a change in the source
code the continuous integration tools like Jenkins can pull that code prepare
a build ones build is done it can perform unit and integration testing as
well right till this stage it is called continuous integration right you are not
deploying your application on to any server even for testing purpose right
even for functional regression testing so this is basically integration stage
now what you can do next is automatically deploys out of the test
environment to perform acceptance testing or you even call it user
acceptance sua t-test or the end user testing so once you do that in an
automated fashion it becomes continuous delivery now continence deployment is
basically deploying your application after testing into production for
release so continuous deployment is something which is not a good practice
because even after the end user testing there might be some checks that you need
to do or you need to market your application right so there might be
multiple thing that you want to do and you don’t want it to be automatically
released right you wanted to perform a lot of checks before you release it in
the market so that’s why continence deployment is not a good practice
whereas continence delivery is what every company tries to achieve nowadays
so I hope I’m clear the moment any developer commits a code and till the
unit and integration test where your application is not deployed on to any
server or any environment it is integration testing once it is deployed
to the test environment for a user acceptance test it becomes continence
delivery and when it is deploy to production for release then it becomes
continuous deployment so this is the difference between continuous
integration delivery and deployment I hope you have understood it now let’s
discuss the DevOps use case so we are going to implement this use case
practically in today’s session so what we are gonna do we’re gonna use Jenkins
to prepare a build pipeline in which we’ll compile the code we’ll review it
will perform unit testing we’ll package it and we’ll deploy it manually guys
remember that we are going to deploy our application manually so I will also tell
you how to do it automatically but in our use case in our practical we are
going to deploy it finally we will be using Jenkins for this purpose so
there’s a source code repository present in github right so over there a test
cases are already written it is basically an address book application
it’s a java application so I’ll be using maven here and I’ve already installed
Jenkins in my Auburn – box so you can go ahead and refer the Jenkins installation
video if you have any difficulties and installing Jenkins Raich let me just
open my open to machine and I’ll show you there so guys this is now going to
box and over here I’ve already installed Jenkins and I’ve configured it at four
eight zero eight zero and these are the jobs that I was talking about in the use
case as well first I’m going to compile the code then I’m going to review it
then perform testing and then finally package it into an executable format or
in a distributable format let me show you how you can create a project the
first thing you need to click on new item
right once you click on your item you’ll be directed to a page something like
this where you need to enter the name of your project and the type of project so
I’ve created a freestyle project so all the jobs that you are seeing here all
the projects are actually freestyle projects because it is pretty flexible
apart from that there are lot of features which are there in the other
projects are present in the Freestyle project is where so let me just quickly
give you a walkthrough of these project so the first thing is compiled so I’ll
just go ahead and click on configure and I’ll show you how I have configured it
the first thing I need to do is give a name to my project so basically the git
repository with my source code is present when I click on build up I’ve
invoked the top-level maven targets so bavin has this build lifecycle let me
explain you that now a lot of people think that build only means compile it
doesn’t mean that there’s the entire build lifecycle where you can validate
the code where you can compile it test it basically you can test the compiled
source code using a suitable unit testing framework and these tests should
not require the code to be packaged or deployed then you can even package your
application take the compiled code and package it in a distributer format such
as jars or voids you can verify your source code you can install a package
and you can finally deploy your application as well so this is basically
maven build lifecycle and first thing we are going to do is invoke the compile
phase of the maven build lifecycle just click on apply and sleep let me go back
to the dashboard and I’m going to show you the code review project as well let
me go ahead and click on configure and pretty much the same the name of the
project write the code review then source code management the basically the
github repository where my code is present then in the build triggers tab
let me just take you these things so trigger builds remotely you can use
scripts for that you can build after other projects or build so I’m going to
build it after that source code is compiled then I can even click on build
periodically I can click on build when a change is pushed to the github I can
even pull my source code repository that is my github repository I can configure
Jenkins to pull the github repository at regular intervals and if there is any
change then it should pull that change and prepare a bill for me so here I’m
going to show you how to build a project and other projects of bid so after
compiling the source code my code will be reviewed using the PMD analysis so
here also I will invoke the top-level maven targets now let me explain about
PMD is so it is an extensible cross language static code analyzer what I
mean by that it basically finds common programming flaws like
unused variables empty cache blogs and necessary object creation and so
it basically scans source code in Java and other languages for potential
problems like possible bugs what can be possible bugs for example empty try
catch finally switch statements it also checks for dead code so dead codes are
basically unused local variables parameters and N and private methods
things like that it also checks for suboptimal code which is nothing but
wasteful string string buffer usage etc etc and it also looks for over
complicated expressions if I have to give you an example think of you know
unnecessary if statements or for loops that could be actually while loops right
so these are the things that the PMD analysis report will give us right and
this is where it will be stored post bill actions tab let me just give you a
walkthrough of this build so here are multiple options you can execute shell
you can invoke and you can invoke Gradle scripts right so there are a lot of
things that you can go ahead and check up I am using invoke top level maven
targets apply and save so if you want to see the PMD analysis
report I’ll just show you I’ve already executed this project one so I can see
the lannisters report here so it says that there is a number of packages then
the number of files present then there are multiple categories so there are
empty code which are forward unnecessary r5 and you scored as two then what are
the types of these warnings so we have let me show you empty cache block there
to empty cache flows in a to empty finally block and unused private fields
are too and useless parentheses are fight then let me show you the warnings
these are the various warnings and if you want to find the details so here you
can find all the details of the warnings that are present in the report so this
is about the source code review then let me show you the tests project so let me
just go ahead and click on configure it’s pretty simple guy is pretty basic
what I have done in the other projects go to source code management tab here
you’ll find the repository link builder guys I’m going to build it once my code
review is done and then I’m going to invoke the top-level maven target in
which I’ll invoke the test phase of my maven build life cycle let me just go
ahead and up save and apply let me go back to the dashboard again and I’ll
finally show you how I have packaged my application so I will go and click on
configure and over here you can find that when you go to source code
management tab you’ll find the github repository link then when you click on
build triggers will be build after other projects are built and finally in the
top level maven targets I am going to invoke the package phase of the build
lifecycle of maven this pretty much it let me go back to the dashboard and what
I’m going to do is I’m going to create a pipeline view so I’m going to give a
name to my pipeline so let the name of my pipeline be build pipe right you can
give whatever you name you want I know it’s not a pretty fancy name just click
on OK you’ll be redirected to a page that will basically ask you to configure
your pipeline the way you want it’s pretty self-explanatory just give a name
to your pipeline description how you want the layout to be so I want compiled
to be my national job then build cards the number of display so I can just
select any row headers if you want write column headers currently there are no
header sizes click on just the build number and the
name refresh frequency is three seconds just click on apply and ok so my
pipeline is configured now all I have to do is click on run so the first step is
basically compiling the source code so you can see that it is executing when
it’s yellow in color that means it is executing so let me just finish this
yeah so if I click here
I can see the console output as well so here you can find all the necessary
logs is web so Mike source code compiling step is
done right combining a source code is done knot is reviewing the code
similarly if you click here you can find the necessary logs here right you can
find all the details there after this unit testing will be performed test
cases are already written in the source code so yeah you can see that code
review is done now the test project will be executed
so you can see that it has started executing the test project and then
after this it’ll package my application into a word file similarly if you click
here you can see the console output or the necessary logs that you want to see
and they just get over and after every three seconds it is refreshing so you
can see that my package project is started
so they started implementing the package project or you can see that it is yellow
in color that means it is currently executing it so you can see here that the logs are
present here you can just have a look here so let’s just wait until it is
executing so it is done now you can see that my
war file will be created in this particular directory let me just open my
terminal and show you there as well let me clear it
so when I go to that particular directory and hit an LS command I can
find my address book dot war has been created now I’m going to deploy this war
file on a tomcat server so for that I need to start the Tomcat server and let
me show you how I can do that first I’ll go to the storm-cat directory let me
clear the terminal yeah I need to change my directory to tomcat nine now over
here I’ll just execute the startup script startup door Sh
so my tomcat server is running let me just go to that particular port so I’ve
configured it on 8,000 localhost port 8000 is my port number where of
configure Tomcat when I click on manager apps
I’ll be directed to at this particular page and over here all I have to do is
give a context path so let that be Ed Eureka – war and the directory where it
is present so I’ll just write here address book dot war I’ll click on
deploy and finally you will see that my application has been deployed so
edureka.war is present you that it has been deployed now let me
go back to my slides so I hope you have enjoyed the practical that we have just
executed let me just give you a quick walkthrough over all things we have done
so we have a source code repository present in github so I have just used
that repository and with Jenkins I’m using maven in order to compile the
source code then review it then perform unit testing and then finally packaging
it and then I have deployed it manually on a tomcat so right so this is what I
have done and I’ve used then kids for this particular a practical so I hope
this session was useful for you guys so if you are looking for more DevOps
videos you can check out the DevOps flail is provided by Edureka there is
also a DevOps blog series present I’ll leave the link in the description box
below now if you’re looking for online structure training on DevOps you can go
to this particular website that is

Reynold King

34 Replies to “Introduction to DevOps | DevOps Tutorial for Beginners | DevOps Training | Edureka”

  1. My question sounds kind of funny but I have to ask.
    I am new to IT field, have been working on my uncle's project for almost a year.
    I have 1 Year Hands-on in AWS (usually the topics in topics which are solutions architect associate) and I know Jenkins, GIT, Selenium, and docker. planning to learn Vagrant, Chef, and Puppet.
    What is the scope of me getting a good job outside? You guy's are anyone who reads this comment can give me any suggestions?
    By the way, your videos on youtube are the best. Thanks for the free content.

  2. Got a question on the topic? Please share it in the comment section below and our experts will answer it for you. For Edureka DevOps Training and Certification curriculum, Visit our Website: Use code "YOUTUBE20" to get Flat 20% off on this training.

  3. Good video, but please speak a bit slow in pace. That would be very good. Appreciate your efforts for making this video. Thanks!

  4. Which software/tool you used to record this video? Superb audio video quality and presentation! Please reply.

  5. Very nice and short intro. Keep up the good work. Also, pls use a red mouse pointer/marker – when you are explaining a block diagram or workflow, the red pointer/blob really helps to know where to look at.

  6. Good Video, but, you go through it way too quickly and way too fast. It is difficult to understand you sometimes because of your accent and the speed that you are talking. Slow down to make it easier to understand

  7. Sir you are good but will give one suggestion i.e. pls go slowly and take pause while explaining.
    P.S. your content is too good

  8. Good video overall but please be a bit slow..i am very new to this naming conventions can't meet your pace 😄

  9. Its really nice one to get start off with. Lone suggestion as all already provided , go with a bit slower peace while speaking so that the viewers can be with you and they don't need to go backward and play again what have you said :). Overall very well explained
    Thanks for sharing this.

  10. Hi..I am working as Wintel admin is there a way that I can switch to devops..pls let me know the pre requisites and links .. thanks

  11. If I want to Carrie on DevOps then what about coding ?is coding kill need to be extraordinary like a
    developer or just need basic coding skill ! Understand the code

  12. Is there any devops tutorials with native english speakers? For such a dense and difficult subject as DevOps, I would think there would be a more beginner friendly version..

Leave a Reply

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