Most Popular DevOps Interview Questions and Answers for 2019

Most Popular DevOps Interview Questions and Answers for 2019

You can think of DevOps as being some kind of a thought process, a philosophy and a cultural outlook which blends operations with development and brings together a toolchain of technologies that collaborate to bring about constructive change.

Be informed that the coming years are going to be exciting for DevOps engineers in more ways than one. Those that bring a strategic understanding of tools and processes and the ways of using technologies can look forward to terrific prospects. A quarter of the top 2000 global organizations have already adopted DevOps as a mainstream strategy.

 1st Round: DevOps Basic interview questions and answers:

Q1) Explain DevOps?

Ans:DevOps, which derives its core principles from Agile, can be considered more a systematic and philosophical approach than simply automation. These are what it does:

It encourages communication and collaboration between business, development and operations

It goes beyond tools and involves people and processes

DevOps focuses on automating the processes relating to development, release and operation

It accelerates the delivery of applications to the end users

It facilitates continuous improvement through feedback.

 Q2) How do you define DevOps?

Ans:DevOps can be understood as being a transformational strategy for development that aims to address the gaps between traditional development and operations. It seeks to bring about hastened delivery of applications while keeping the quality of the product intact. The main purpose of DevOps is to eliminate constraints relating to development and automate by creating a feedback option from operations to the development team. In a nutshell, DevOps is the inculcation of a mindset with which to deliver applications quickly without compromising on quality.

Q3) Which are the pillars to support the principles of DevOps Development?

Ans:DevOps development rests on the tripod consisting of:

Ensuring predictability and incrementality while delivering

Utilizing and leveraging proven technologies and patterns

Putting the right force towards this.

Q4) which are some of the prerequisites that help in DevOps implementation.

Ans:These are some of the pre-requisites for DevOps implementation:

  1. Showing commitment to those in the senior levels of the organization
  2. Change has to be communicated across the organization
  3. Putting in place a version control software
  4. Using the right automated tools that ensures compliance to process
  5. Automated Testing and Deployment.

Q5) What are some of the advantages of using DevOps?

Ans:The biggest advantage with the DevOps model brings is that the bulk of the development happens in small and frequent development cycles consisting of short sprints, which are not likely to extend beyond two to four weeks. This gives ample time for changes to be included in the upcoming sprint.

This is another advantage with DevOps: Since most part of the solution is made up of components such as existing reusable APIs, reliable third-party services and related ones, the development time is reduced drastically, as this system can use the new code, which could be required only for integrating and customizing.

Q5) What are the key components of DevOps?

  1. Ans:
  2. Continuous Integration
  3. Continuous Testing
  4. Continuous Delivery
  5. Continuous Monitoring

Q6) If you were to single out the most important use of DevOps, what would it be?

Ans:Changes needed for production should be the most important action that DevOps helps us achieve. The feature of making changes into production as quickly as possible even as risks are kept at a minimum without diluting the quality and compliance requirements is DevOps’s USP.

Q7) What is Continuous Delivery?

Ans:Continuous Delivery can be described as an extension of Continuous Integration. What it does is that it helps to get the features being developed by the developers out to the end users in the quickest possible time. This it does by passing through stages of QA, Staging etc., and then delivery.

Q8) What is Extreme Programming?

Ans:Extreme Programming, which goes by its popular initials, XP, is a well-known agile methodology used for executing software development. XP rules are designed to focus primarily on customer satisfaction. What it does is that it gives developers the freedom to carry out requirement changes through smaller iterations. XP is of a collaborative nature as it brings together most of the team and coordinates their work to carry these changes out.

Q9) What are the anti-patterns of DevOps?

Ans:This is how we understand antipattern: if a pattern that is commonly followed by some others does not work for you and you continue to follow it, then, you are following an anti-pattern. Some of the myths about DevOps include:

  1. It is a process
  2. It is the same as Agile
  3. DevOps needs a separate group
  4. DevOps will solve all our problems
  5. DevOps stands for Developers Managing Production
  6. DevOps is Development-driven release management
  7. DevOps is not development driven.
  8. DevOps is not IT Operations driven.
  9. DevOps is not for us
  10. We don't have the right people for DevOps

Q10) In Git, how will you know if a branch has already been merged into master?

Ans:You can include both the below mentioned commands:

git branch –merged lists the branches that have been merged into the current branch.

git branch –no-merged lists the branches that have not been merged.

Q11) Why is a Continuous Integration of Dev & Testing needed?

Ans:In improving the quality of software, Continuous Integration of Dev and Testing reduces the time taken to deliver it. It replaces the traditional practice of testing after completing all development, because of which the development team can easily detect and locate problems early. This is because developers need to integrate code into a shared repository several times during a day. Each check-in is then automatically tested.

Q12) How can we create a backup and copy files in Jenkins?

Ans:Just periodically back up your JENKINS_HOME directory, which contains all of your build jobs configurations, your slave node configurations, and your build history. All that you need to do to create a back-up of your Jenkins setup is to just copy this directory. A job directory can also be copied to clone, or you can replicate a job or rename the directory.

Q13) How do you secure Jenkins?

Ans:This is how:

  1. Make sure that the global security is on.
  2. Make sure that Jenkins is integrated with my company’s user directory with appropriate plugin.
  3. Guarantee that matrix/Project matrix is enabled to fine tune access.
  4. Automate setting rights/privileges in Jenkins with custom version-controlled script.
  5. Limit the physical access to Jenkins data/folders.
  • Run security audits from time to time.

Q14) Explain Continuous Testing?

Ans:It is the process of carrying out automated tests as part of the software delivery pipeline to obtain immediate feedback on the business risks associated with in the latest build. This helps each build to be tested continuously, allowing Development teams to get fast feedback so that these problems can be prevented from progressing to the next stage of Software delivery life-cycle. This has the effect of rapidly speeding up a developer’s workflow, since there is no need to manually rebuild the project and re-run all tests after making changes.

Q15) How is Testing automated in DevOps lifecycle?

Ans:DevOps requires developers to commit all the changes made in the source code to a shared repository. Continuous Integration tools like Jenkins will take out the code from this shared repository each time a change is made in the code and deploy it for Continuous Testing that is done by tools like Selenium. This is shown in the below diagram.

Q16) What importance does Continuous Testing have for DevOps?


In allowing any change made in the code to be tested immediately; Continuous Testing helps to prevent the problems that arise when critical testing is left to the end of the cycle, such as release delays and quality.

Q17) What is your understanding of Selenium IDE?

Ans:Selenium IDE is an integrated development environment for Selenium scripts. Implemented as a Firefox extension, it allows recording, editing, and debugging of tests. Since Selenium IDE includes the entire Selenium Core, it allows you to easily and quickly record and play back tests in the actual environment that they will run in.

Its advantages are its autocomplete support and the ability to move commands around quickly. This makes Selenium IDE the ideal environment for creating Selenium tests irrespective of the style of tests you prefer.

Q18) What are the purposes of Configuration management processes?

Ans:Configuration Management (CM) has the purpose of ensuring the integrity of a product or system throughout its life-cycle. This it does by making the development or deployment process controllable and repeatable, which leads to a higher quality product or system. These are some of the purposes the CM process allow in orderly management of system information and system changes:

  1. The capability can be revised
  2. It improves performance
  3. It is reliable and easily maintained
  4. Has extended life
  5. The costs and risks are lowered
  6. It corrects liability and defects.

Q19) What is Puppet Module? How it is different from Puppet Manifest?

Ans:A Puppet Module is a set of Manifests and data such as facts, files, and templates. They have a specific directory structure. Modules are handy in organizing your Puppet code because they allow you to split your code into multiple Manifests. Using Modules to organize almost all of your Puppet Manifests is considered an industry best practice.

Puppet programs are called Manifests. These consist of Puppet code. Their file names use the .pp extension.

Q20) Explain playbooks in Ansible?

Ans:They are Ansible’s configuration, deployment, and orchestration language. With playbooks, you can either describe a policy you want your remote systems to enforce or a set of steps in a general IT process. Playbooks are readable by humans and are developed in a basic text language. Fundamentally, playbooks can be used to manage configurations of and deployments to remote machines.

Q21) What is the way of setting up deployment order for applications?

Ans:With WebLogic Server 8.1, you can select the load order for applications. Read the Application MBean Load Order attribute in Application. WebLogic Server deploys server-level resources (first JDBC and then JMS) before deploying applications. This is the order in which applications are deployed: connectors, then EJBs, then Web Applications. If the application is an EAR, the individual components are loaded in the order in which they are declared in the application.xml deployment descriptor.

Q22) When should the external_stage option be used?

Ans:You may set -external_stage using weblogic.Deployer when there is a need to stage the application yourself and you prefer copying it to its target using your own means.

Q23) What is the need for Continuous monitoring?

Ans: Continuous Monitoring helps to identify problems or weaknesses early on and take quick corrective measures with which an organization can keep its expenses down. The solutions Continuous monitoring provides address three operational disciplines:

  1. continuous audit
  2. continuous controls monitoring
  3. continuous transaction inspection

 2nd Round: DevOps Technical Interview Questions and answers:

Q1) How do all the DevOps tools work together?

Ans:This is a generic logical flow where everything gets automated for seamless delivery. This, however, can change from one organization to another based on its own requirements.

  1. Developers develop the code. Version Control System tools like Git, etc. are managed by this source code.
  2. Developers send this code to the Git repository. Any changes made in the code is committed to this Repository.
  3. In the next step, Jenkins pulls this code from the repository using the Git plugin and builds it using tools like Ant or Maven.
  4. Configuration management tools like puppet deploy and provision testing environment, after which Jenkins, using tools like Selenium, releases this code on the test environment on which testing is done.
  5. After testing the code, Jenkins sends it for deployment on the production server (even production server is provisioned & maintained by tools like puppet).
  6. Tools like Nagios continuously monitors it after deployment.
  7. The testing environment to test the build features is provided by Docker containers.

Q3) Can you name the top 10 DevOps tools that are being used in the industry today?


  1. Jira
  2. SonarQube
  3. Jenkins
  4. GIT/SVN
  5. Bitbucket
  6. Bamboo
  7. Artifactory/Nexus
  8. Chef / Puppet /Ansible
  9. Docker
  10. IBM Urbancode Deploy / CA-RA
  11. Nagios / Splunk

Q4) Explain a build?

Ans:This is a process in which the source code is put together for the purpose of verifying whether it will work as a single unit. While the build is being created or generated, the source code will undergo activities such as compilation, testing, inspection and deployment. Usually, build generation process is completely automated so that to carry out all these functions, a single command is all that is needed.

Q5) What do you understand by Design Patterns?

Ans:Design Patterns represent the solution to problems faced by developers, since they represent the best practices that are used by developers. They help a greenhorn developer to learn easily and quickly. Design Patterns come with standard terminologies addressing specific scenario.

These are the three main types of Design Patterns:

1.Creational, which addresses design problems

2.Structural, which simplifies the relationships between objects

3.Behavioral, which simplifies how objects interact with each other.

Q6) What is the way of squashing last N commits into a single commit?

Ans:Squashing last N commits into a single commit can be done in either of these two ways:

1.Use the command

git reset –soft HEAD~N &&

git commit if you want to write the new commit message from scratch

 2.Use git reset –soft HEAD~N &&

git commit –edit -m”$(git log –format=%B –reverse .HEAD@{N})” if the need is to start editing the new commit message with a concatenation of the existing commit messages. In such cases, you need to extract those messages and pass them to Git commit.

Q7) What is Git rebase? How can it be used to resolve conflicts in a feature branch before merge?

Ans:Git rebase can be described as a command that merges another branch into the branch where you are currently working. It moves all of the local commits that are ahead of the rebased branch to the top of the history on that branch.

This is an example of how it can be used to resolve conflicts in a feature branch before merge: if a feature branch was created from master, and since then, if the master branch has received new commits, Git rebase can be used to move the feature branch to the tip of master.

What this command does is that it effectively replays the changes made in the feature branch at the tip of master, resolving conflicts in the process. When done rightly, this will allow the feature branch to be merged into master with relative ease. This can sometimes be as simple as a fast-forward operation.

Q8) How do you locate a list of files that has changed in a particular commit?

Ans:git diff-tree -r {hash}

When this list is given the commit hash, it will list all the files that were changed or added in that commit. The -r flag makes the command list individual files, rather than collapsing them into root directory names only.

You could also consider this optional step: The output will also include some extra information, which can be easily suppressed by including two flags:

git diff-tree –no-commit-id –name-only -r {hash}

Here –no-commit-id will suppress the commit hashes from appearing in the output, and –name-only will only print the file names, instead of their paths.

Q9) What do you understand by Git?


  1. Git is a Distributed Version Control system (DVCS) that can track changes to a file and allows reverting to any particular change.
  2. Since its architecture is distributed, it offers many advantages over other Version Control Systems (VCS) like SVN. One major advantage is that it instead of relying on a central server to store all the versions of a project’s files, it allows every developer to “clone” a copy of a repository. The following diagram explains this
  3. There is a central cloud repository as well, into which developers can commit changes and share it with other teammates as you can see in the diagram where all collaborators are committing changes “Remote repository”. 

Q10) Explain the key elements of Continuous Testing tools?

Ans:These are some of them:

  1. Risk Assessment: It Covers risk mitigation tasks, technical debt, quality assessment and test coverage optimization to ensure the build is ready to progress toward next stage.
  2. Policy Analysis: This is done to ensure that all processes align with the organization’s evolving business and that they meet the compliance demands
  3. Requirements Traceability: This is to make sure that the actual requirements are met, and that rework is not required. The requirements are at risk, working as expected or require further validation are identified objectively.
  4. Advanced Analysis: Advanced Analysis uses automation in areas such as static code analysis, change impact analysis and scope assessment/prioritization to prevent defects the first time and accomplishes more with each successive iteration.
  5. Test Optimization: This is for ensuring that tests yield accurate outcomes and provide actionable findings. Test Data Management, Test Optimization Management and Test Maintenance are some of the aspects of Test Optimization.
  6. Service Virtualization: This element ensures access to real-world testing environments. With service visualization, access to the virtual form of the required testing stages is enabled, cutting the waste time to test environment setup and availability.

Q11) Define Chef?

Ans:Chef is a potent automation platform that transforms infrastructure into code. Chef is a tool for which you write scripts that are used to automate processes that could be anything related to IT.

These are what Chef consists of:

Chef Server: This is the central store of your infrastructure’s configuration data. The Chef Server stores the data necessary to configure your nodes and provides search, a powerful tool that allows you to dynamically drive node configuration based on data.

  1. Chef Node: A Node is any host that is configured using Chef-client. Chef-client runs on your nodes, contacting the Chef Server for the information necessary to configure the node. Since a Node is a machine that runs the Chef-client software, nodes are sometimes referred to as “clients”.
  2. Chef Workstation: A Chef Workstation is the host you use to modify your cookbooks and other configuration data.

HR Round:

Describe yourself

Explain your understanding of DevOps

What brings you into a career in DevOps?

What role do you see for yourself in this organization in the next few years?

What have been the challenges and hiccups you have faced while working on DevOps and how did you resolve them?


DevOps is a powerful automation technique that has the potential to bring in dramatic changes into the processes traditionally used by organizations. Like Six Sigma in manufacturing, it is a process rather than being a single action. It has the potential to bring about radical changes into the processes that organizations use for automating a variety of items.

A career in DevOps is the career of the future. DevOps is here to stay, as evidenced by its growing presence in top multinational organizations around the globe. The best time to be in DevOps is today. We hope we have helped you take the steps towards a flourishing career in DevOps!