Top Answers To DevOps Interview Questions
Top Answers To DevOps Interview Questions
1. What is DevOps?
Characteristics DevOps
Basic premise A collaboration of development and operations teams. It is more
of a cultural shift.
Related to Agile methodology
Priorities Resource management, communication, and teamwork
Benefits Speed, functionality, stability, and innovation
2. Our team has some ideas and wants to turn those ideas into a software
application. Now, as a manager, I am confused about whether I should follow the
Agile work culture or DevOps. Can you tell me why I should follow DevOps over
Agile?
According to the current market trend, instead of releasing big sets of features in
an application, companies are launching small features for software with better
product quality and quick feedback from customers, for high customer satisfaction.
Now, to keep up with this, we have to:
� Development
� Version Control
� Testing
� Integration
� Deployment
� Delivery
� Configuration
� Monitoring
� Feedback
4. What are some technical and business benefits of DevOps work culture?
Technical benefits:
If a team member checks into the code file with a bug, then the build gets broken.
In this sort of scenario, other developers can�t synchronize the shared source code
repository without introducing compilation errors into their own local workspaces.
Thus, collaborative and shared software development cannot go forward.
10. What are the core operations of DevOps in terms of development and
infrastructure?
The core operations of DevOps are application development, version control, unit
testing, deployment with infrastructure, monitoring, configuration, and
orchestration.
But, �git fetch� is a slightly different form of �git pull�. Unlike �git pull�, it
pulls all new commits from the desired branch and then stores them in a new branch
in the local repository.
In order to reflect these changes in your target branch, �git fetch� must be
followed with a �git merge�. The target branch will only be updated after merging
with the fetched branch (where we performed �git fetch�). We can also interpret the
whole thing with an equation like this:
Understand what happened: It could be because of the same line edit on the same
file; it could be because of deleting some files, or also it could be because of
files with the same file names. You can check everything by using �git status�.
Mark and clean up the conflict: When we open the files using mergetool, Git marks
the conflicted area like this �<<<<< HEAD� and � >>>>> [other/branch/name]�.
Perform commit again and then merge the current branch with the master branch.
17. Can you tell me some advantages of Forking Workflow over other Git workflows?
Forking Workflow is fundamentally different from other Git workflows. Instead of
using a single server-side repository to act as the �central� codebase, Forking
Workflow gives every developer their own server-side repositories. This workflow is
most often seen in public open-source projects.
The main advantage is that contributions can be integrated without the need for
everyone to push to a single central repository to maintain clean project history.
Developers can push to their own server-side repositories, and only the project
maintainer will push to the official repository.
As soon as developers are ready to publish their local commits, they will push
their commits to their own public repositories. Then, they will perform a pull
request from the main repository, which notifies the project maintainer that an
update is ready to be integrated.
Interested in learning DevOps? Click here to learn more from this DevOps Training
in Sydney!
When we perform rebase of a feature branch onto the master branch, we move the base
of the feature branch to the master branch�s ending point.
By performing merge, we take the contents of the feature branch and integrate them
with the master branch. As a result, only the master branch is changed, but the
feature branch history remains the same. Merging adds a new commit to your history.
19. I just made a bad git commit and made it public, and I need to revert the
commit. Can you suggest me how to do that?
Here we can use the command:
20. Can you tell me how to squash the last n commits into a single commit? Is it
even possible?
To squash the last n commits into a single commit, we can use:
Or, we can also make a copy of an existing Jenkins job by making a clone of that
job directory in a different name.
Another way is that we can rename an existing job by renaming the directory. But,
if you change the name of a job, you will need to change any other job that tries
to call the renamed job.
Become a master of DevOps by going through this online DevOps Course in Toronto!
22. Can you tell me, what Continuous Testing and Automation Testing are?
Automation testing, as the name suggests, is a process of automating the manual
process of testing. It involves the use of separate testing tools that let
developers create test scripts that can be executed repeatedly without any manual
intervention.
Continuous testing is nothing but the process of executing automated tests as part
of the software delivery pipeline in DevOps. In this process, each build is tested
continuously, allowing the development team to get fast business feedback so that
it can prevent the problems from progressing to the next stage of the software
delivery lifecycle. This will dramatically speed up a developer�s workflow. He/she
no longer needs to manually rebuild the project and re-run all tests after making
changes.
27. I have 40 jobs in the Jenkins dashboard and I need to build them all at once.
Is it possible?
Yes, it is. With the help of a Jenkins plugin, we can build projects one after the
other. If one parent job is carried out, then automatically other jobs are also
run. We also have the option to use Jenkins Pipeline jobs for the same.
29. Can you please tell me how to create a backup and copy files in Jenkins?
To create a backup, all we need to do is to periodically back up our JENKINS_HOME
directory. This contains all of the build configurations of our job, our slave node
configurations, and our build history. To create a backup of our Jenkins setup,
just copy this directory. We can also copy a job directory to clone or replicate a
job or rename the directory.
For instance, we can write a manifest in Puppet Master that creates a file and
installs Apache on all Puppet Agents or slaves that are connected to the Puppet
Master.
33. What is a Puppet Module? How is it different from the Puppet Manifest?
A Puppet Module is nothing but a collection of manifests and data (e.g., facts,
files, and templates). Puppet Modules have a specific directory structure. They are
useful for organizing the Puppet code because with Puppet Modules we can split the
Puppet code into multiple manifests. It is considered as the best practice to use
Puppet Modules to organize almost all of your Puppet Manifests.
Puppet Modules are different from Puppet Manifests. Manifests are nothing but
Puppet programs, composed of the Puppet code. File names of Puppet Manifests use
the .pp extension.
Learn the complete concepts of DevOps from the DevOps Training at Hyderabad in 26
hours!
Unix/Linus Systems:
/etc/puppetlabs/code
Windows:
%PROGRAMDATA%\PuppetLabs\code (usually, C:\ProgramData\PuppetLabs\code)
Non-root users:
~/.puppetlabs/etc/code
36. How does Ansible work?
Ansible is an open-source automation tool, which is categorized into two types of
servers:
Controlling machines
Nodes
Ansible will be installed on the controlling machine, and using that machine nodes
are managed with the help of SSH. Nodes� locations are specified by inventories in
that controlling machine.
Ansible can handle a lot of nodes from a single system over an SSH connection with
the help of Ansible Playbooks. Playbooks are capable of performing multiple tasks,
and they are in the YAML file format.
Are you interested in learning DevOps from experts? Enroll in the DevOps Course in
Bangalore provided by Intellipaat!
37. Sometimes, we use ad-hoc commands instead of Playbooks in Ansible. Can you tell
me what�s the difference between Ansible Playbook and an ad-hoc command? Also, cite
when to use them.
Ad-hoc commands are used to do something quickly, and they are for, mostly, one-
time use. Whereas, Ansible Playbook is used to perform repeated actions. There are
scenarios where we want to use ad-hoc commands simply to perform a non-repetitive
activity.
Configuration Management
Application Deployment
Task Automation
39. What are handlers in Ansible?
Handlers in Ansible are just like regular tasks inside an Ansible Playbook, but
they are only run if the task contains a �notify� directive. Handlers are triggered
when it is called by another task.
40. Have you heard about Ansible Galaxy? What does it do?
Yes, I have. Ansible Galaxy refers to the �Galaxy website� by Ansible, where users
share Ansible roles. It is used to install, create, and manage Ansible roles.
41. Can you write the syntax for building a docker image?
To build a docker image, we use the following command:
If you have any doubts or queries related to DevOps, get them clarified from DevOps
experts on our DevOps Community!
47. Can you tell me why I should use Nagios for HTTP monitoring?
Nagios can provide us the complete monitoring service for our HTTP servers and
protocols. Here are a few benefits of implementing effective HTTP monitoring with
Nagios: