3 Chapter
3 Chapter
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.
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
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.
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