Top DevOps Interview Questions for 2021

DevOps works on the principle of collaboration between teams with a focus on faster delivery.  It can be understood as a culture among people of the development and operations teams that leverages the power of automation. 

DevOps touches every component of the software life cycle- development, testing, operations, security, and business. Big businesses and small enterprises everyone is embracing DevOps today and hence this becomes an important factor in a Tech-related career.  

We have divided the DevOps interview questions into the below sections:

  1. Basic DevOps questions 
  2. Version Control System
  3. Continuous Integration and Continuous Deployment
  4. Continuous Testing
  5. Configuration Management
  6. Configuration Monitoring

Basic DevOps interview questions:

What is DevOps?

DevOps is a culture where planning, development, operations, testing, delivery, security teams collaborate to provide better and reliable products. 

DevOps and application lifecycle
Image from azurecomcdn.azureedge.net

 

The phases as listed below,are non-exclusive of each other. They all work in tandem. 

  • Plan: DevOps team defines, describes, and tracks the features of the product. 
  • Develop: Development of code and testing. 
  • Deliver: The team deploys the product or application in the production environment. 
  • Operate: Maintenance and monitoring of the application in the production environment. 

What are the differences between DevOps and Agile?

The below table depicts the differences between DevOps and Agile:

Explain the various components of DevOps.

Components or processes of DevOps are:

  • Continuous Integration: CI involves the frequent merger of new code into the existing code. 
  • Continuous Testing: CI is followed by automated Continuous Testing. CT is executed automatically as soon as the new code is committed by developers.
  • Continuous Delivery: CD is the automatic deployment of code into the production environment.
  • Continuous Monitoring: The application performance is monitored in real-time and in case of issues the team takes action quickly.

What are the advantages of DevOps? 

  • Reliability: DevOps reduces the failure rate of new releases. 
  • Adaptive: The changes can be accommodated quickly.
  • Quick Delivery: DevOps provides reliable software faster due to the involvement of the whole team and not just developers.
  • Quick Recovery: In the instance where a new deployment fails, the application is recovered fast.
  • Stability: Infrastructure as a code(IaC) provides a stable application.
  • Security: DevOps provides better risk-mitigation.

What are the popular tools in DevOps? 

  • Jenkins: CI tool 
  • Git: Version Control System(VCS) tool 
  • Selenium: Continuous Testing(CT) tool 
  • Chef, Puppet, Ansible: Configuration  Management and Deployment tools 
  • Nagios, Monit: Continuous Monitoring tools 
  • Docker: Containerization tool 
DevOps popular tools
Image from volansys.com

Version Control System 

What is the Version Control System in DevOps and its advantages? 

A Version Control System(VCS) stores, tracks, and helps in managing the different versions of the code or files. Also, it stores the data related to the changes made e.g., who made changes, when were the changes made, and what are the changes. Additionally, in case of any conflict or failure, the code can be reverted using the VCS. 

Advantages of Version Control System in DevOps are: 

  • Parallel changes: Concurrent changes are accepted by VCS. All the changes can be merged to provide a final version. 
  • Change history: Tracking the change history is very easy using VCS. 
  • Reliability: Better reliability is provided by VCS during the failure of the centralised server. Since in a distributed VCS, we can copy the project version history and use the local repository. 
  • Bug tracking: It is easier to track when a bug got introduced in code with the help of the Version Control System. 

Types of VCS tools:

  • Centralised Version Control System: Uses a central repository(server) to store files. 
  • Distributed Version Control System: Local repository has a clone of files from the central repository. 

What are the VCS tools that you have worked with? 

Top popular VCS tools are below:

What do you know about Git in DevOps? 

Git is an open-source distributed version control system(DVCS). Each workstation/ team member has its local repository cloned from the main repository. 

Features of Git in DevOps: 

  • Open-source
  • High-performance speed 
  • Provides scalability as the number of users increases 
  • Provides reliability in case of central repository crash 
  • Secure data transfer via checksum 
  • Simple architecture because the central server is used only when push/pull happens. 
  • Distributed coding Compatible with SVN, SSH, FTP, HTTP, etc. 

Explain the common Git commands.

Below are the common Git commands and action list:

What is Infrastructure as Code(IaC)? 

IaC means automating the process of infrastructure provisioning and thus it saves manual effort. It helps in automatically provisioning and managing the servers, networks, virtual machines, database connections, and storage, etc. 

Benefits of Infrastructure as Code: 

  • Consistent: IaC provides the same required configuration every time because it uses code for deployment.
  • Faster provision than manual provision. 
  • Faster results: Since the infrastructure provision is quick, consistent, and risk-free therefore all the phases(development, testing, and operations) are provided with the required environments faster. This aids in achieving the final development quickly. 
  • Reduced time of provisioning when compared with the manual process. 

CI/CD 

This section has DevOps interview questions related to Continuous Integration, its advantages, CI/CD pipeline, Continuous Deployment and Continuous Delivery, IaC, containers. 

What is DevOps CI? 

It is a process of automatically integrating code from different developers into one central repository. It is a continuous process repeated many times a day to maintain consistency. After CI, automated test runs are executed to catch the bugs as early as possible. 

What are the advantages of Continuous Integration? 

  • Smaller code integrations are faster 
  • Reduced integration problems 
  • Early bug detection results in quicker resolution of defects
  • Early bug resolution is economical in terms of money and time 
  • Facilitates more time for feature development 
  • Faster delivery due to fewer issues faced by teams 

What is a CI/CD pipeline? 

CI/CD pipeline is a set of steps to automate the whole software delivery process starting from coding. In detail this pipeline contains automated steps to code(commit), build, test, and deploy. However, it can differ from team to team since the teams define the steps themselves. The diagram below depicts an example of a standard CI/CD pipeline flow. 

Stages of CI/CD pipeline

What are the success factors for CI/CD pipeline? 

Below are the success factors for the CI/CD pipeline: 

  • Multi-skilled teams: Reduces dependency on resources and enhances knowledge sharing and learning. 
  • Understanding DevOps: The people of the team should have a thorough understanding of DevOps and its practices. 
  • DevOps automation tools: The selection of the right DevOps automation tools is an important decision while creating an automation strategy. 
  • Metrics to monitor: Metrics should be defined to monitor the team members, cycle time, defects, lead time, process flow, etc.  
  • Define achievable goals: The DevOps goals should be practical and achievable to reduce the risk in the production environment. 

Explain Continuous Delivery vs Continuous Deployment. 

Continuous Delivery vs Continuous Deployment
Image from blog.crisp.se

Explain IaC and Configuration Management. 

Infrastructure as Code(IaC) is a form of Configuration Management that has the below steps: 

  • Coding the infrastructure structure, resources, and topology into text files. 
  • These files are then stored and committed into a Version Control System e.g. Git. 
  • Since the files are present in the Version Control System the CI/CD commands of pull/push can be applied to them. 
  • Whenever there is an instance of an edit in the infrastructure file, it can be pulled for review. Then audit and review verify the correctness of the edit. 

More details here.

Difference between orchestration and classic automation to know for DevOps interview questions? 

How are Containers being used in CI/CD? 

Containers are standalone packages that are ready to run. They contain code, libraries, configuration, system tools, and other dependencies packaged into a single package of software. They do not include the Operating System in the package as is the case with virtualization. 

Example of container technology: Docker 

Dockerfile has all the properties, permissions, libraries, and configuration a particular software requires to run. This Dockerfile provides a ‘container image’ which can be run on a ‘container host’. This container image can be run on the developer’s system, tester’s system, and production environment. 

  • During Continuous Integration the developer writes the ‘Dockerfile’ together with code. 
  • During Continuous Deployment, we can run this container image on systems to make them ‘container hosts’ so that the software application runs on them seamlessly. 

 

Continuous Testing

In this section, we have compiled the DevOps interview questions related to Continuous Testing. 

Explain the testing phase in DevOps:

Code, deliver, test, and deploy are continuous tasks in DevOps. Where the testing is performed during the whole development and deployment cycles. Hence, testing is not confined to functional and unit tests alone. This means performance, operations, security, data analysis all are part of testing activities. So, Continuous testing helps in gaining continuous feedback and thus improves the quality of software. 

  

For example- when a new code is committed by a developer immediately automated test runs are executed. Subsequently, if the test runs are successful it means the build is successful and then the code is deployed. However, if the test runs fail then the build is unsuccessful and notification is sent to the developer. After this, the developer makes code changes and the test run is executed automatically after the commit. 

Tools often used: 

  • Selenium- For writing automated test scripts 
  • TestNG- For reporting, logs, etc. 
  • Jenkins- CI tool for automating the whole Continuous Integration process 
  • Docker containers- To replicate the environment for testing 

Explain the features of Continuous testing tools:

  • Automated test creation or Codeless automation 
  • Parallel test execution 
  • Integration with CI tools 
  • Integration with defect tracking tools 
  • Scalability to add new environments or tests 
  • Robust reporting 
  • Test result analysis 
  • Cloud-based test environments 

Configuration management

This section explains DevOps interview questions related to Configuration Management, Chef, Puppet, Ansible. 

Explain the difference between Asset Management and Configuration Management:

What is Puppet and its advantages? 

Puppet tool performs automated configuration management and deployment. It works on master-slave architecture. 

Puppet performs the below tasks: 

  • Helps us to provide different configurations to servers/ hosts. 
  • Monitors server for configuration change if there is a change, modifies hosts configuration automatically. 
  • Provides centralised configuration management. 
  • Provides automated deployment. 
  • Uses IaC and model-based approach. 

Advantages of Puppet:

  • Puppet has a free open-source version to use.  
  • It provides automated deployment, configuration management, and monitoring hence it is less error-prone. 
  • It frees human resources from mundane, complex, and repeated tasks. 
  • Puppet provides resource abstraction to system administrators so they do not need to check the configuration needs for different resources. 

 More about Puppet here.

Explain the architecture of Chef:

Chef is a configuration management technology that provides a base to define Infrastructure as Code. Chef uses Ruby language and creates domain-specific language(DSL). 

The architecture of Chef: 

Chef works on a three-tier client-server architecture.  

Chef architecture
Image from logz.io

The three components of the architecture are:

1. Chef workstation:

It is a workstation of the system administrator which interacts with the server and nodes.

The subcomponents of the workstation are:

  • Deployment and downloading cookbooks. 
  • Development kit: the package has all requirements to use Chef 
  • Chef-Repo: the directory where cookbooks are stored 
  • Knife: Chef-Repo content is shared with the server using the Knife command 
  • Test kitchen: Environment to create and test the test cookbooks 

2. Chef server

Works between workstation and nodes. Storage of cookbooks and metadata. 

3. Chef nodes 

They are managed by the Chef server using Chef client. Nodes can be storage devices, network devices, servers, etc. 

 

 Read more about Chef here.

What is Continuous Delivery? 

According to AWS – Continuous delivery is a software development practice where code changes are automatically prepared for a production release. 

  • It is a DevOps practice that is an extension of Continuous Integration. 
  • It ensures the readiness of a tested build for production deployment.  
  • Includes Black box and White box tests – Unit tests, User Interface tests, Load tests, Integration tests, Stress tests, Functional tests, etc.  
  • The software is developed in shorter cycles thus helps the developers to build and release software faster. 

What is the use of Ansible? 

Ansible is an automation tool that covers the following  in the DevOps process: 

  • Infrastructure Provisioning 
  • Deployment 
  • Configuration Management 
  • Infrastructure Orchestration 
  • Network automation
  • Security automation 
  • Compliance 

List a few tools which are used for configuration management:

  • Ansible
  • Puppet
  • Chef 
  • CFEngine 
  • Salt 

Configuration monitoring 

This section has DevOps interview questions based on Configuration Monitoring, Kibana, Splunk, and Sentry. 

What is the purpose of Configuration Monitoring? 

With the evolution of CI and CD processes,  Configuration Monitoring has also evolved. We need to monitor the performance of infrastructure and applications. So that we can identify the issues and resolve them before causing any impact on end-users. 

The purpose of Configuration Monitoring is to monitor below: 

  • Infrastructure monitoring- CPU usage, user permissions, storage, etc. 
  • Network monitoring- bandwidth, latency, hosts’ CPU usage, etc. 
  • Performance monitoring- page loads, browser speed, error, etc. 

What is Kibana and how is it used? 

Kibana is a visualisation tool that helps to visualize and create a dashboard using log data. The visualization feature helps to visualise data in the form of charts, graphs, scatter plots, data tables, donuts, and maps, etc. Kibana supports dynamic and adaptive dashboards based on data queries. 

Kibana is used in conjunction with the other two products of the same company ‘Elastic’. These two products are Elasticsearch(database for data) and Logstash(collects, parses, and stores logs). 

How can we create a Kibana dashboard?

  • Go to side navigation and click – Dashboard
  • Click- Create a new dashboard
  •  Click- Add
  • Click on Add Panels to add visualisations
  • Click Save and provide a name to the dashboard
  • Click Save

Full tutorial with screenshots here.

What are the advantages of Splunk?

Splunk is a centralised tool for log analysis. It analyses the data log for machine learning, fraud analysis, security, user behaviour, business analysis, etc. The data can be structured, unstructured, and complex. 

The advantages of Splunk are: 

  • It can work with a huge log of data. 
  • Easy to set-up and requires minimum hardware setup. 
  • Provides dashboard in real-time. 
  • The GUI provides a greater user experience. 
  • Provides reports and alerts. 
  • It provides features of reporting, analysis, and monitoring tools. 
  • We can work on different data types. 
  • Monitoring of AWS infrastructure is possible. 

Related Articles

Responses