0% found this document useful (0 votes)
9 views7 pages

3 Chapter

Ai jntuh R18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views7 pages

3 Chapter

Ai jntuh R18
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

3.

3
DevOps
Essay Questions with Answers
INTRODUCTION TO PROJECT MANAGEMENT in source control and ops is in source control
3. and the beauty of DevOps is that both of them
are in source controland that too in the same
THE NEED FOR SOURCE CODE CONTROL' source control tool and hence evervone can see
3.1. what is there in the source and each version of
Explainthe need for Source code control it, clearly and transparently.
Q1. in project management.
This enables the team to work together, have
Answer: transpárerncy and collaborate with each other.
DevOps principle is to Version control This also brings the team and their work under
overuthing which undergoes changes during the life one umbrella, one tool.
out in (2)
Cucle so that the changes are not missed It prevents the team members from following
anyways or by anybody in the project their own knowledge, information and code to
Theprimary difference from agile to DevOps
use.

seen only the


is that in agile practice we have control for their (3) Source control helps in'understanding the
development team following version difference between versions and also the
code, releases,documents, and websites. But DevOps
Operations as well. purpose of making these changes.
introduces version control for
of. (4)
Version control helps in carrying out
It has been identified that a high number development in parallel and managing the
code but
failures, defects are not really due to bad stresses merges. More than one person can work on
due to misconfigurations. So, this statementproduction the same cod or script or document by picking
the requirement of version control in theinfrastructure
the base code. from the source control and
environment on configurations and taking a copy of them on to their local machines
which are delivered as a script. and then merging back to the master, once the
Thus, DevOps practice started version changes are done.
controlling the deployment scripts, environment Incase of any conflicts in the changes between
configurations, infrastructure details etc. Even earlier two people, the tool will throw an error and
dev used to follow version controlling of only code highlight the area of conflict.
and documents, now theyalso include controlling (5 In addition to this, version controlling
automation scripts, installation scripts, migration infrastructure a_ a code allows anyone to create
scripts etc., environments without having a dependency on
So, in DevOps practice in addition to source individual's knowledge and also helps in
code, automation scripts, documents, we practice creating environment purely from the
version controlling everything which undergoes information available in the source control and
changes like, deployment scripts or installation scripts, not based on individuals inteligence.
rollback scripts, migration scripts etc., which are part
(6) Version control makes the debugging of the
of software installation
software deployment failures and production
Infrastructure definitions or scripts, which issues very fast because the team can go back
contain the server configuration details, prerequisite to the previous version and check what is the
software details and their versions, DB details, difference, in case of failures and fix it fast.
connectivity of multiple components, network details Hence, identification of production issues
etc. need to be version controlled becomes easy and fast.

Environment-related configurations which 3.2, THE HISTORY OF SOURCE CODE


include the environment variables that are to be set
MANAGEMENT
default, the features which need to beturned off or
on by efault etc., needs to be version controlled. code4 man
Q2. Explain the history of Source
So, in broad words, Version control everything agement.
in aprojectwhich undergoes changes.
Answer :
Given below are the various benefits of Version practice of
Control: Source code management is the
Keeping a
(1) tracking modifications to source code.
First of all yersion control ensures that dev is
Warnring :Xerox/Photocopying of this book is a CRIMINAL Act. Anyone found guiltyvis LIABLE to face LEGAL proceedings
oncdeveloping new features
highhyfocused
quickly without sacrificing reliability or and sen
experience.
custo 3.5

respectlve
Anengineering and IT
organizatlon that edlts cting feature,
conflcould code they could unknowingly make
changes-or
work in silos will lead to overwri te the otherone developer's saved
productivity. DevOps really improved
is a
ldeas doe Before the develof oper's changes.
looking at things. It's a di
way to buildfferent way management
these scernarl o,s.
adoption
there were few sourceto code
and transparency açross

teams and ultimately,


feedback loops and
software
IT operations -leadinggto greater cdevelooplmabeonrbautsitn
vistbility for
more revenue.
on a file,
to
ensure no one
simultaneousky.
Each time safeguards
they would have todeveloper started prevent
a
let all working
else was the others know
working
help you Tighten
improving. That on it
between IT and developers will
observable systems that drive real
There isn'ta single wayto "do" cDevOps.oCusmmutoquimenciklrcayt van
And when it said, it
the changes worked,
made
was hardly a
foolproof process.
this method left nO
chángeitiesulted in a bug,the course of a record of all
over
tool or a process that workS
core of DevOps, youre
team works throughoutsimply
for
every team,
improving
the software the
There lsrt where originated determine projectifa
Source code
or there was no way to trace
how to fix it.
lifecycle and iincident way o problems by trackingmanagement
d e
managementve lo
is system agiostic - it doesn't matterprocesS.
working with AWS, GCP, pm e
Deo
whetorher you
hiDevelopers
ghlighting conflicts
address
and
gach developer'
are alerted topreventing
solves these
code s changes,
any conflicts sooverwiting.
code andthem before they are merged
infrastructure, or you're a
support,
From application
engineer. on-
backend
deployment
DevOps plays a'role
p r
to
e mi s es
frooducinteal potentialy
they can
into the source
O5.. How does compromise the application.
methodology with practical IT in
includes takeaways from combining
principles
pr Answer: source code
managenent work?
development principles asbothwellagile and Dev processTheis theheart
as core lean
of the
sourcea code
operations practicës. By sof
IT twg stores code repository, management
essentially serviCe;yo source code organization's centralized
all of an server that Q6.
deployment team into the IT
into your development team makin g
team, you're and the IT
code as well as the
management system that tracks code
changes for various Ans
to:
makingit ease develcode
Copies of source
files. Developers
opment projects.as
are stored
Findissues in "check out a file when theyindividual inchu
production Build
services fasl their local make code revisions and want to
Through. heightened environment. receive a copy of
that file in
tfrom
ransparency, your Devps teamcollaboration an file in the repository is
At the same time, the
so thatno one original
product development to can act as everythin check out that piecelocked of else can
review some of the core operations Now, e overwrite the current code and
apply to every team DevOps philosophies th developer makes anddeveloper' tests
inadvertently
stheirchanges. After the
3.4. sOURCE CODE "commit" them, chànges,
saving the revised code tothey
repository. This
MANAGEMENT SY`TEM AND the code versionreplaces number-a
the original file,
process
the
increments
Q4. Explain MIGRATIONS control"-and removes the lock. called version
source code The process repeated every time
is
and migrations.
Answer : management syste developer
code makes code changes to any file. another
managemernt
all revisions to system then stores andThe source
Source code piece of code.maintain a manages
complete historyof each
tracking modificatiomanagement
ns is
to source the practice uses anRegardless
of tools,
running
helps history of the changes madecode. array of common source code
managementthe
to aKeepiny following: terms, including
they' rpr
e ogra mmer s,
ays workidevel
code andalwhelps oper s codevoth
sand testerssensüre
resolvneg conflicts
from multiple sources. with acocurate andIup-to-d Repository (e.g.,
server in which a
Git
repositories): The
t when merging co stored, as well as theproject'
source
s collected files are
system used to track code code management
tiplSource
mulcodebase.
e develcode mananagement issimportant becau
And owiperth seachtypically work in a share
"check out" code to make
save them back tofiles
changes. Developers
changes, then
the repository
development when their
-Act. Anyone found guilty is developer working onthe
The work on
source code that code is completed.
management system saves a
LIABLE to face LEGAL proceedin
Warning :
Xerox/Photocopying of this book is a
oxyPhotocopying
Warning:of other Themajor Answer: Q8. case;
our In
remote warningthikse: DevOps
have
version
Git Git projects Git to
What github.com:JBCode
World/test.git
To Total
Compressing Delta
Counting git Receiving
Writing ubuntu@ubuntu:
ubuntu@ubuntu:~test$ origin If remote:remote:remote:remote:Cloning git
case;
our In
Git into git
"test... Secondl Are RSA ne
one y, dWerni
ubuntu@ubuntu:-Itest$
l ng: ubunt
you u@ubuntu: rintly,
services. Hi fingerprint do
is 9b7e69d..2391466 remote you clone clJBCodeWorl
wafoundation
s is some
created
control
with an GIT?
is 3
(delta compression
objects: objects: the
in
have Total
objects:CompressinEnumerat g ing
Counting
key
sutsure hentlcity let'sets tings
Git open-source set-url [email protected]:
Linus be
bycan of
many
allows high
speed
us
Explain. 0), objects:
reused 100% using 3,
/test$
done.
repository:
origin
already
[email protected]:JBCodeWorld/test-
100%
15
(delta objects:
objects:
Permanent
to ly
use
GitHub You've want ishost s h
yoU

the
in authenticate
of -$
this used to master (3/3), 100% cloned objects:
O), added to
bookTorvalds services distributed track and (delta
0 up
[email protected]:<url-repo
git git
(15/15), reused 100% with ly contSHA256:
<url-reposuccessful
-T
inue n'oithub. configuratthe on.
'github.com, [email protected]
to
privately efficiency. 294 (2/2),
pushremote and 100% 15,
isa and 3.6. >
0) threads.
2 shell
done.
worked done. (delta (9/9),(15/15),
6
CRIMINAL like work master >.gitaccess, conneçting
Thbg6kXUp140.JWG8I72.E1121.GO4'CspRom
bytes| done. set-url
in
2005 GitHub and together version It HoSTED authenticwe ated, (140.,82.
is
origin on 0), done. done. with
developed 294.00 git
the
Act. publicly. pack-reused
a must (yes/no)? 121.4)'
>.gitrepository,
to GIT
and with control command
Anyone develop
GitLab, our to
SERVERS [email protected]:JBCodeWorld/test.git
KiB/s, use but
shell GitHub (RSA) yes
can't
found co-ordinate done. 0 be
Linux team system. then
syntax sh
guilty
Kernel, but
members you
doesthe
to
established. -T

LIABLE
is we the is It must TxdCARLw6E5SY8.
follows;provide vik
as not list git@github.
can designed of
Itis work redefine known
hosts.
.com.
see You
also use the at
to among shell
face used workspace. Git same
to tsshhe access.
LEGAL without harndle
as the may
an developen 3.10
proce impona URL fO
using minot
d to FeaturesGitofaistributed
ComeClearCase.
Perforce,nd 3.15
remarkable Git
Warning Source
Git Open
repository. the project
change having sof Scalable
Git'Onesituations.
Distributed Git is
version-control
is is easy toolfor
stores Security
repository.
history Git entire scalable, an
hotocopying : is is one to open-sorce
to
learn,
its secure.
leading
another
just central
commit
great
features
history stored and
Files which
It repository
history machine, features has
up inand uses of
Subteam User 1 on tool. Git
sucha
to Fetches
our
means fast the
DevOps.
of thatcommits the User 3 of is SourceOpen areperformance.
this It
way SHA1 local the that we that when released is as
book commit. project. you can it
Scalability
follows:
that are repository. is the
is sendcreate
the(Secure
a Once checked Subteam
Fetches
distributed.
Distributedmeans Featureof
CRIMINAL number under It
|D We
changes GIt is
Origin a superior
it of If do"clone" the Security
is andHash
particular necessary, not
to, of
Actpublished,
users GPL
. retrieved needevery of Speed to
Function) other
Anyone the increases, (General
commits weto user
connect entire SCM
one by can has
found Subteam
Fetches User 2
their
pushrepository. the Public tools
cannot
depends its to
guilty checksumname User 4 to instead that of Git like
these the own License)
can
is make upon and repositorý
remote Subversion,
LIABLE changes Also, easily
at
changes the identify license.
to complete
the repository; instead
switching handle DevOps
face time to that CVS,
to objec. a
LEG its remot contains of such
of the just the
DevOps
Speed In a whle. Most of
Git is very fast, so it can complete all the tasks Also, a centralzed the glt operations are
localrepository, solt provides a huge opeed. verslon control systemdone on
Communicates with a server somewhere.

corehistory
FetchingTheversion
VCSe. server.
remote
extremely fast compared
Performance tests conducted by Mozllashowed that It was much faster
part of GIt is written In C, whlch lgnores runtime overheads:tot
from alocally stored repositoryls
contia
tthan fetching t
with other high-level languages.
hom
Linux kernel; therefore, it is capable enough to
Git was developed to work on the beginning, øpeed and performance
large repositorles effectively. Fromthe
primary goals.
have beenhan
Supports non-linear development:
helpssiin visualizing and
branching and merging, whichcommit.
Gitsupports seamless branch
linear development. A in Git represents
structure with the help of its parental commit.
a single We can construct the
navigating an,
Branching
BranchingandandMerging:
merging are the great features of Git, which makes it different from
SCMtools. Git allows the creation of multiple branches without affecting each other. Wes
perfomtaskslike creation, deletion, and merging on branches, and tthesetasks take afewset
branching:
only. Below are some features that can be achieved by
We can create a separate branch for a new module of the project, commit and dele
whenever we want.
producion a
We can have a production branch, which always has what goes into
merged for testing in the test branch.
We can create a demo branch for the experiment and check if it is working. We cana
remove it if needed.
The core benefit of branchingis if we want to push something to a remote repository
not have to push all of our branches. We can select a fewW of our branches, o. all ta
together.
Data Assurance
The Git data model ensures the cryptographic integrity of every unit of our project. It pro
a unique commit 1D to every commit through a SHA algorithm
can retrieve and update the commit by commit ID. Most of the centralized version control s1s
do not provide such integrity by default.
Staging Are
The Staging area is also a unique functionality of Git. It can be considered as a previen
our next commit, moreover, an intermediate area where commits can be formatted and revie
before completion. When you make acommit, Git takes changes that are in the staging area andma
them as anw commit. We are allowed to add and remove changes from the staging area. The stay
area can be considered as a place where Git stores the changes.
Although, Git doesn't have adedicated staging directory where it can store some objects represnt
file changes (blobs). Instead of this, it uses afile called index.

(Working Directory) (Staging Directory Repository


(.index)

add

Commit

Checkoutl|

Warning:Xerox/Photocopying of this book is a CRIMINAL Act. Anyone found guilty is LIABLE to face LEGAL P
DevDps
Photo by Glt and testing your application.
The download Whenyou're ready, deploy your
addres of SSH is generally in Into your production
enviservironmece.apnTiitcswa,o
the for 1 of
git@github. .Com:username/test.git
When executing Clone or Push, it will be container or an orchestrated
disassembled into: the same whhether your production:
Ssh usetname@aithub, com"git-upload-pack7
test.git'
is a loca data center, a cloud
hybrid of the two. eprorvviidroenr,
Docker streamlines the
Therefore, the formet of the SSH protocol is
different from that of the Git protocol when the byenvironments allowing developers to work in development !
parameters are passed for the first time, and other
Condiions are the same, such as reference discovery your
Packfile mechanism, , error handling, et., which wil
using local
applications and services.
for continuousintegration andI
whichcontainers
Cont ainsers:tandari
continuous
not be extended here. You can
documentation. participate in the official CD) workflows.
Consider the following example:
delveny
After understanding what the SSH protocol is
about, it becomes clear that we want to .Your developers write code
localSCenar
ly io:
Git SSH server. implement a their work with their
containers. colleagues and shasusing Doc
Weonly need to
perform correspondingimplement
an SSH Server and They use Docker to push their
executeapplautiocmat
ationsed i
data transmission in the atest environment and
corresponding Session. Let's implement a simple Git
SSH service. The manual tests.
code is asfollows:
3.8. DoCKER INTERMIS^ION When developers find bugs, they can fix
in the development
Q11. Give a brief note on them to the test environmentforand redo
On'Docker. validation.' environment testinn
Answer:
Docker is an open platform for When testing is complete, getting the fx
custormer is as simple as pushing the uDdatetot%
shipping, and rånning applications. Docker
you to separate your
developing,.
enables image the production
to
infrastructure applications from your environment,
so you can deljver oftware
Docker, you can manage your quickly. With Responsive deployment and scaling
same ways you manage your infrastructure in the Docker' s container-based platform allowsto
advantage of Docker' s applications. By taking highly portable workloads. Docker
testing, and deployingmethodologies
code
for
quickly, shipping,
you
on a developer'
machines in a
s local laptop, on containers
physical or
can nu
Virts
SIgniticantly reduce the delay between writing can data center, on cloud
and running it in
production. code mIxture of environments. providers, ot in
The Docker platform Docker's portability and lightweight natureak
make
Docker provide_ the ability to easy to dynamically
an application in a package and run scaling up or tearing down manage and
a container. The loosely isolated environment called as business needs dictate,in
workloads
applications
run many i_olation and security allows vou near real time. servica
containers
simultaneously
Containers lightweight
are on a given host.toKnnng more workloads on the same harwat
needed to run and Docker is
socontain
rely on what isthe
application, everything
you do not need to viable,
can easily sharecurrently installed on the host. You virtual machines, so you cost-effectlightweight
and fast. It provides
ive alternative hypervisor-basa
to
sure that containers while you work, and be compute capacity to caD use more ot you
container everyone
that worksyou share
in the samewith gets the same for Docker is
small
achieve your
perfect for high density business goas
Docker provides
way.
tooling and a platform to
to and medium
do more with
deployments
where
environments
an
manage the lifecycle of your fewer youn
resources.
Develop your containers: Q12. Explain in detail
components application
using and its
containers. Answer: Docker Architectur
The container supporting Docker architecture
becomes the unit for
Warning : distributing Docker uses
Xerox/Photocopying of this book is a
CRIMIN AL Act.
a
cient-server architecture. T
Anyone found guilty is
IABLE to face LEGAL procee
runningcor networkinte Thisincl usingthe contalh
input
Docker
createsa
networking
options. networks
external bin/bash.
Becausethe provide
can using your key
(4) specifyany connectto executes flags), you
containerscan containerand
-t
Ë and containerstops but is
Docker
(5) attachedto
whilethe
the terminal(dueto
starts
your
outputis
loggedto
to
your
terminate
the
terminal.
the
bin/bash
command,the
not erno
youtype exit orremoveit. 3.9.GERRIT
again
(6) When
can startit
You

Gerrlt. and built on top of Git


overvlew on with Git work). t
brief
Q13.Givea
review tool
integrated
whichis.maintainthehistoryof
their
allows
to
Answer:
basedcode worktogetherand reviews.
Java, Servlet.
web
Geritis a developersto donewiththecode
(helps
controlsystemrepositorywhenvou
are
Goógle
writtenin ,GWTIGoogle
whichis March 11, 2016licensed under
Pearce at published on
changestoGit by Shawn and
Gerrit was develóped of Gerrit is 2.12.2
release
Toolkit). Thestable
Licensev2.
Use of Gerrit: why youshould useGerrit.
reasons, Gerrit.
Followingarecertain thesourcecodeusing install any Gerritcliernt
findthe error in need to
You caneasily reqularGitclient; no
work with Gerrit,ifyou have
developers and gitrepositories.
Youcan intermediate between
used asan
Gerritcan be
Features of Gerrit:
sourceGit version control system.
open
Gerrit is a free andan Toolkit.
of Gerritis formed on Google Web
The user interface every commit.
frameworkfor reviewing comr
It isa lightweight pushing the code and creates the review for your
allows
Gerrit acts as a repository, which
Advantages of Gerrit: review.
control for Git repositories and web frontend for code
Gerrit provides access
additional command line tools.
You can push the code without using
level and down to the branch level
Gerit can allow or decline the permission on the repository
Gerrit is supported by Eclipse.
Disadvantages of Gerrit:
Reviewing, verifying and resubmitting the code commits slows down the time to market.
Gerrit can work only with Git.
Gerrit is slow andit's not possible to change the sort.order in which changes are listed.
You need administrator rights to add repository on
Gerrit.
3.10. THE PULL REQUEST MODEL, GITLAB
-Q14. Explain the Pull request model in Git.
Answer :

Warning:XeroyPhotocopying of this book is a


CRIMINAL Act. Anyone found guilty is LIABLE to face
LEGAE
3.30 mentioned
thisSelect PullRequestDemo.
request. with ol
for act changes
branch. request
branch an
we pull is overwriting
this Pushing
As new create
new merge
branch.tthe Creste
pul
TeqUEst
pull
a of repository.
of Commit
"create as
new name
about file option can capable add

more the They


aas the Give
page. the
named is
remote
option
the Consider Lean
request. Pushing Remote
repo
it Select
commit request, and a fou
page. this torepository.
andSelect
the
page.
the stantapull option
them see
content Any
ropose
nw
ile newW
flle of iB.
AA can
Explain.a pull.bottom required
Cancel pasting
the a
People
request. repository
remote Act.
use ofbottom branch.and
create
git open er
cominit selecting Git. Pull
Push CRIM
thewill toa
Request.to to master selected
you.pull in
file fromthe
need this It
file.
dropping.
by merged
model localrepository
at for a
a request"
pull
youcommit the created upload pushing. is
Pull new to branch P
file PullRequestDem havenew &
dragging request
book
request, directhy a Local
repo this
GIT new a Preiew
is
selecting tolocal when
how
to I propose
image,
create
dermo
by requestPush refers of
your
create pull a aproposeCommitaCreaterequests. image: files
Attach taken
XeroxPh
Wite by term from
a topic,start above
to below pullbranches
the
to create ) option be
commits
thisandto O the Explain push should
How
DevOps Answer: option the the Now,
To in commit
Q15. earlier In theConsider other Answer PushThetransfer
: Git caution :
the Select Q16. Warning
the

You might also like