• Home
  • DevOps
  • Top DevOps Interview Questions and Answers

Top DevOps Interview Questions and Answers

Last updated on Feb 18 2022
Rahul Sharma

Table of Contents

Top DevOps Interview Questions and Answers

What is DevOps?

Answer: DevOps is the value-added practice wherein the development, as well as operation engineers, work together from the initial point of designing a product to deployment in the markets.

 What is the basic premise of DevOps?

Answer: DevOps is a cultural shift wherein a collaboration and operation teams work together throughout the product or service life cycle.

 Which methodology is DevOps related to?

Answer: DevOps is related to Agile methodology.

 What are the priorities in DevOps?

Answer: The priorities in DevOps include resource management, teamwork, and communication.

 What are the benefits of DevOps?

Answer: The varied benefits of DevOps include innovation, stability, functionality, and speed.

 What are the different advantages of Git?

Answer: Git has the following advantages:

  1. It helps in data redundancy and replication.
  2. It is highly available.
  3. It supports collaboration.
  4. It can be used for a variety of projects.
  5. It uses only one Git directory per repository.
  6. It supports disk utilization.
  7. It offers higher network performance.

 What is the difference between Git fetch and Git pull?

Answer: Git pull is common that pulls any new commits from a branch of the central repository to update the target branch. Git fetch pulls any new commits from only the desired branch and then stores them into a new brand of the local repository.

 Can we handle merge conflict in Git?

Answer: Yes, we can handle merge conflict in the following three steps:

  • Step : Developing a clear understanding by checking everything using Git status.
  • Step : Mark and clean up the conflict by applying the merge tool.
  • Step : Performing commit and merging with the current branch along with the master branch.

What do you know about DevOps?

Your answer must be simple and straightforward. Begin by explaining the growing importance of DevOps in the IT industry. Discuss how such an approach aims to synergize the efforts of the development and operations teams to accelerate the delivery of software products, with a minimal failure rate. Include how DevOps is a value-added practice, where development and operations engineers join hands throughout the product or service lifecycle, right from the design stage to the point of deployment.

Which are some of the most popular DevOps tools?

The most popular DevOps tools include:

  1. Selenium
  2. Puppet
  3. Chef
  4. Git
  5. Jenkins
  6. Ansible
  7. Docker

 What are the different phases in DevOps?

The various phases of the DevOps lifecycle are as follows:

  • Plan – Initially, there should be a plan for the type of application that needs to be developed. Getting a rough picture of the development process is always a good idea.
  • Code – The application is coded as per the end-user requirements.
  • Build – Build the application by integrating various codes formed in the previous steps.
  • Test – This is the most crucial step of the application development. Test the application and rebuild, if necessary.
  • Integrate – Multiple codes from different programmers are integrated into one.
  • Deploy – Code is deployed into a cloud environment for further usage. It is ensured that any new changes do not affect the functioning of a high traffic website.
  • Operate – Operations are performed on the code if required.
  • Monitor – Application performance is monitored. Changes are made to meet the end-user requirements.

The above figure indicates the DevOps lifecycle.

How will you approach a project that needs to implement DevOps?

The following standard approaches can be used to implement DevOps in a specific project:

Stage

An assessment of the existing process and implementation for about two to three weeks to identify areas of improvement so that the team can create a road map for the implementation.

Stage

Create a proof of concept (PoC). Once it is accepted and approved, the team can start on the actual implementation and roll-out of the project plan.

Stage

The project is now ready for implementing DevOps by using version control/integration/testing/deployment/delivery and monitoring followed step by step.

By following the proper steps for version control, integration, testing, deployment, delivery, and monitoring, the project is now ready for DevOps implementation.

 What is the difference between continuous delivery and continuous deployment?

d1 1

d2

What is the role of AWS in DevOps?

AWS has the following role in DevOps:

  • Flexible services – Provides ready-to-use, flexible services without the need to install or set up the software.
  • Built for scale – You can manage a single instance or scale to thousands using AWS services.
  • Automation – AWS lets you automate tasks and processes, giving you more time to innovate
  • Secure – Using AWS Identity and Access Management (IAM), you can set user permissions and policies.
  • Large partner ecosystem – AWS supports a large ecosystem of partners that integrate with and extend AWS services.

 Name three important DevOps KPIs.

The three important KPIs are as follows:

  • Meantime to failure recovery – This is the average time taken to recover from a failure.
  • Deployment frequency – The frequency in which the deployment occurs.
  • Percentage of failed deployments – The number of times the deployment fails.

Why Has DevOps Gained Prominence over the Last Few Years?

Before talking about the growing popularity of DevOps, discuss the current industry scenario. Begin with some examples of how big players such as Netflix and Facebook are investing in DevOps to automate and accelerate application deployment and how this has helped them grow their business. Using Facebook as an example, you would point to Facebook’s continuous deployment and code ownership models and how these have helped it scale up but ensure the quality of experience at the same time. Hundreds of lines of code are implemented without affecting quality, stability, and security.

Your next use case should be Netflix. This streaming and on-demand video company follow similar practices with fully automated processes and systems. Mention the user base of these two organizations: Facebook has  billion users while Netflix streams online content to more than  million users worldwide.

These are great examples of how DevOps can help organizations to ensure higher success rates for releases, reduce the lead time between bug fixes, streamline and continuous delivery through automation, and an overall reduction in manpower costs.

 Explain the difference between a centralized and distributed version control system (VCS).

Centralized Version Control System

  • All file versions are stored on a central server
  • No developer has a copy of all files on a local system
  • If the central server crashes, all data from the project will be lost

Distributed Control System

  • Every developer has a copy of all versions of the code on their systems
  • Enables team members to work offline and does not rely on a single location for backups
  • There is no threat, even if the server crashes

What is the git command that downloads any repository from GitHub to your computer?

The git command that downloads any repository from GitHub to your computer is git clone.

How do you find a list of files that have been changed in a particular commit?

The command to get a list of files that have been changed in a particular commit is:

git diff-tree –r {commit hash}

Example: git diff-tree –r efb

  • -r flag instructs the command to list individual files
  • commit hash will list all the files that were changed or added in that commit

Explain the master-slave architecture of Jenkins.

  • Jenkins master pulls the code from the remote GitHub repository every time there is a code commit.
  • It distributes the workload to all the Jenkins slaves.
  • On request from the Jenkins master, the slaves carry out, builds, test, and produce test reports.

 What is Jenkinsfile?

Jenkinsfile contains the definition of a Jenkins pipeline and is checked into the source control repository. It is a text file.

  • It allows code review and iteration on the pipeline.
  • It permits an audit trail for the pipeline.
  • There is a single source of truth for the pipeline, which can be viewed and edited.

 Which of the following commands runs Jenkins from the command line?

  1. java –jar Jenkins.war
  2. java –war Jenkins.jar
  3. java –jar Jenkins.jar
  4. java –war Jenkins.war

The correct answer is A) java –jar Jenkins.war

Explain the two types of pipeline in Jenkins, along with their syntax.

Jenkins provides two ways of developing a pipeline code: Scripted and Declarative.

  1. Scripted Pipeline: It is based on Groovy script as their Domain Specific Language. One or more node blocks do the core work throughout the entire pipeline.

Syntax:

  1. Executes the pipeline or any of its stages on any available agent
  2. Defines the build stage
  3. Performs steps related to building stage
  4. Defines the test stage
  5. Performs steps related to the test stage
  6. Defines the deploy stage
  7. Performs steps related to the deploy stage
  8. Declarative Pipeline: It provides a simple and friendly syntax to define a pipeline. Here, the pipeline block defines the work done throughout the pipeline.

Syntax:

  1. Executes the pipeline or any of its stages on any available agent
  2. Defines the build stage
  3. Performs steps related to building stage
  4. Defines the test stage
  5. Performs steps related to the test stage
  6. Defines the deploy stage
  7. Performs steps related to the deploy stage

How do you create a backup and copy files in Jenkins?

In order to create a backup file, periodically back up your JENKINS_HOME directory.

In order to create a backup of Jenkins setup, copy the JENKINS_HOME directory. You can also copy a job directory to clone or replicate a job or rename the directory.

Name three security mechanisms Jenkins uses to authenticate users.

  • Jenkins uses an internal database to store user data and credentials.
  • Jenkins can use the Lightweight Directory Access Protocol (LDAP) server to authenticate users.
  • Jenkins can be configured to employ the authentication mechanism that the deployed application server uses.

 How is a custom build of a core plugin deployed?

Steps to deploy a custom build of a core plugin:

  • Copy the .hpi file to $JENKINS_HOME/plugins
  • Remove the plugin’s development directory
  • Create an empty file called <plugin>.hpi.pinned
  • Restart Jenkins and use your custom build of a core plugin

 How can you temporarily turn off Jenkins security if the administrative users have locked themselves out of the admin console?

  • When security is enabled, the Config file contains an XML element named useSecurity that will be set to true.
  • By changing this setting to false, security will be disabled the next time Jenkins is restarted.

Can Selenium test an application on an Android browser?

Selenium is capable of testing an application on an Android browser using an Android driver. You can use the Selendroid or Appium framework to test native apps or web apps in the Android browser. The following is a sample code:

 What are the different test types that Selenium supports?

Functional – This is a type of black-box testing in which the test cases are based on the software specification.

Regression – This testing helps to find new errors, regressions, etc. in different functional and non-functional areas of code after the alteration.

Load Testing – This testing seeks to monitor the response of a device after putting a load on it. It is carried out to study the behavior of the system under certain conditions.

How can you handle keyboard and mouse actions using Selenium?

You can handle keyboard and mouse events with the advanced user interaction API. The advanced user interactions API contains actions and action classes.

d3

 Which of these options is not a WebElement method?

  1. getText()
  2. size()
  3. getTagName()
  4. sendKeys()

The correct answer is B) size()

 When do we use findElement() and findElements()?

  1. findElement()

It finds the first element in the current web page that matches the specified locator value.

Syntax:

WebElement element=driver.findElements(By.xpath(“//div[@id=‘example’]//ul//li”));

  1. findElements()

It finds all the elements in the current web page that matches the specified locator value.

Syntax:

List elementList=driver.findElements(By.xpath(“//div[@id=‘example’]//ul//li”));

Why are SSL certificates used in Chef?

  • SSL certificates are used between the Chef server and the client to ensure that each node has access to the right data.
  • Every node has a private and public key pair. The public key is stored at the Chef server.
  • When an SSL certificate is sent to the server, it will contain the private key of the node.
  • The server compares this against the public key in order to identify the node and give the node access to the required data.

What is Test Kitchen in Chef?

Test Kitchen is a command-line tool in Chef that spins up an instance and tests the cookbook on it before deploying it on the actual nodes.

Here are the most commonly used kitchen commands:

 How does chef-apply differ from chef-client?

  • chef-apply is run on the client system.chef-apply applies the recipe mentioned in the command on the client system.$ chef-apply recipe_name.rb
  • chef-client is also run on the client system.chef-client applies all the cookbooks in your server’s run list to the client system.$ knife chef-client

What is a class in Puppet?

Classes are named blocks in your manifest that configure various functionalities of the node, such as services, files, and packages.

The classes are added to a node’s catalog and are executed only when explicitly invoked.

Class apache (String $version = ‘latest’) {

package{

‘httpd’: ensure => $version,

before => File[‘/etc/httpd.conf’],}

 What is an Ansible role?

An Ansible role is an independent block of tasks, variables, files, and templates embedded inside a playbook.

This playbook installs tomcat on node.

Explain the architecture of Docker.

  • Dockeruses a client-server architecture.
  • Docker Client is a service that runs a command. The command is translated using the REST API and is sent to the Docker Daemon (server).
  • Docker Daemon accepts the request and interacts with the operating system to build Docker images and run Docker containers.
  • A Docker image is a template of instructions, which is used to create containers.
  • Docker containeris an executable package of an application and its dependencies together.
  • Docker registry is a service to host and distribute Docker images among users.

d4

How do we share Docker containers with different nodes?

d5

  • It is possible to share Docker containers on different nodes with Docker Swarm.
  • Docker Swarm is a tool that allows IT administrators and developers to create and manage a cluster of swarm nodes within the Docker platform.
  • A swarm consists of two types of nodes: a manager node and a worker node.

What are the commands used to create a Docker swarm?

  • Create a swarm where you want to run your manager node.Docker swarm init –advertise-addr <MANAGER-IP>
  • Once you’ve created a swarm on your manager node, you can add worker nodes to your swarm.
  • When a node is initialized as a manager, it immediately creates a token. In order to create a worker node, the following command (token) should be executed on the host machine of a worker node.docker swarm join \ –token SWMTKN–njcmqljkzsyioexnedyzfbxxietrtiwxv-vxvrssmkojnwacrrec \ :

 How do you run multiple containers using a single service?

  • It is possible to run multiple containers as a single service with Docker Compose.
  • Here, each container runs in isolation but can interact with each other.
  • All Docker Compose files are YAML files.

Explain the differences between Docker images and Docker containers.

d6

 Instead of YAML, what can you use as an alternate file for building Docker compose?

To build a Docker compose, a user can use a JSON file instead of YAML. In case a user wants to use a JSON file, he/she should specify the filename as given:

Docker-compose -f Docker-compose.json up

What are the cloud platforms that support Docker?

The following are the cloud platforms that Docker runs on:

  • Amazon Web Services
  • Microsoft Azure
  • Google Cloud Platform
  • Rackspace

 What is the purpose of the expose and publish commands in Docker?

Expose

  • Expose is an instruction used in Dockerfile.
  • It is used to expose ports within a Docker network.
  • It is a documenting instruction used at the time of building an image and running a container.
  • Expose is the command used in Docker.
  • Example: Expose

Publish

  • Publish is used in a Docker run command.
  • It can be used outside a Docker environment.
  • It is used to map a host port to a running container port.
  • –publish or –p is the command used in Docker.
  • Example: docker run –d –p :

Now, let’s have a look at the DevOps interview questions for continuous monitoring.

 What do you mean by Nagios Remote Plugin Executor (NPRE) of Nagios?

Nagios Remote Plugin Executor (NPRE) enables you to execute Nagios plugins on Linux/Unix machines. You can monitor remote machine metrics (disk usage, CPU load, etc.)

  • The check_npre plugin that resides on the local monitoring machine
  • The NPRE daemon that runs on the remote Linux/Unix machine

 What are the port numbers that Nagios uses for monitoring purposes?

Usually, Nagios uses the following port numbers for monitoring:

What are active and passive checks in Nagios?

Active Checks:

  • The check logic in the Nagios daemon initiates active checks.
  • Nagios will execute a plugin and pass the information on what needs to be checked.
  • The plugin will then check the operational state of the host or service, and report results back to the Nagios daemon.
  • It will process the results of the host or service check and send notifications.

Passive Checks:

  • In passive checks, an external application checks the status of a host or service.
  • It writes the results of the check to the external command file.
  • Nagios reads the external command file and places the results of all passive checks into a queue for later processing.
  • Nagios may send out notifications, log alerts, etc. depending on the check result information.

Explain the main configuration file and its location in Nagios.

The main configuration file consists of several directives that affect how Nagios operates. The Nagios process and the CGIs read the config file.

A sample main configuration file will be placed into your settings directory:

/usr/local/Nagios/etc/resource.cfg

 What is the Nagios Network Analyzer?

  • It provides an in-depth look at all network traffic sources and security threats.
  • It provides a central view of your network traffic and bandwidth data.
  • It allows system admins to gather high-level information on the health of the network.
  • It enables you to be proactive in resolving outages, abnormal behavior, and threats before they affect critical business processes.

 What are the benefits of HTTP and SSL certificate monitoring with Nagios?

HTTP certificate monitoring

  • Increased server, services, and application availability.
  • Fast detection of network outages and protocol failures.
  • Enables web transaction and web server performance monitoring.

SSL certificate monitoring

  • Increased website availability.
  • Frequent application availability.
  • It provides increased security.

 Explain virtualization with Nagios.

Nagios can run on different virtualization platforms, like VMware, Microsoft Visual PC, Xen, Amazon EC, etc.

  • Provides the capabilities to monitor an assortment of metrics on different platforms
  • Ensures quick detection of service and application failures
  • Has the ability to monitor the following metrics:
  • CPU Usage
  • Memory
  • Networking
  • VM status
  • Reduced administrative overhead

Why is Nagios said to be object-oriented?

Using the object configuration format, you can create object definitions that inherit properties from other object definitions. Hence, Nagios is known as object-oriented.

Types of Objects:

  • Services
  • Hosts
  • Commands
  • Time Periods

 Explain what state stalking is in Nagios.

  • State stalking is used for logging purposes in Nagios.
  • When stalking is enabled for a particular host or service, Nagios will watch that host or service very carefully.
  • It will log any changes it sees in the output of check results.
  • This helps in the analysis of log files.

 Explain what DevOps is?

It is a newly emerging term in the IT field, which is nothing but a practice that emphasizes the collaboration and communication of both software developers and deployment(operations) team. It focuses on delivering software product faster and lowering the failure rate of releases.

Explain which scripting language is most important for a DevOps engineer?

A simpler scripting language will be better for a DevOps engineer. Python seems to be very popular.

 Explain how DevOps is helpful to developers?

DevOps can be helpful to developers to fix the bug and implement new features quickly. It also helps for clearer communication between the team members.

 List out some popular tools for DevOps?

Some of the popular tools for DevOps are

  • Jenkins
  • Nagios
  • Monit
  • ELK (Elasticsearch, Logstash, Kibana)
  • Jenkins
  • Docker
  • Ansible
  • Git

 Mention at what instance have you used the SSH?

I have used SSH to log into a remote machine and work on the command line. Beside this, I have also used it to tunnel into the system in order to facilitate secure encrypted communications between two untrusted hosts over an insecure network.

What are the key components of DevOps?

The most important components of DevOps are:

  • Continuous Integration
  • Continuous Testing
  • Continuous Delivery
  • Continuous Monitoring

 Name a few cloud platform which are used for DevOps Implementation

Popular Cloud computing platform used for DevOps implementation are:

  1. Google Cloud
  2. Amazon Web Services
  3. Microsoft Azure

What types of testing is important to ensure that new service is ready for production?

You need to conduct continuous testing to ensure that the new service is ready for production.

 What is Vagrant?

A vagrant is a tool which can create and manage virtualized environments for testing and developing software.

 What is the use of PTR in DNS?

Pointer record which is also known as (PTR) is used for reverse DNS lookup.

 What is Chef?

It is a powerful automation platform which transforms infrastructure into code. In this tool, you can use write scripts that are used to automate processes.

 What are the prerequisites for the implementation of DevOps?

Following are the useful prerequisites for DevOps Implementation:

  • At least one Version Control Software
  • Proper communication between the team members
  • Automated testing
  • Automated deployment

What is the quickest way to open an Ubuntu terminal in a particular directory?

To open an Ubuntu terminal in a particular directory, you can use custom keyboard short cut.

To do that, in the command field of a new custom keyboard, type genome – terminal – – working – directory = /path/to/dir.

 Explain how you can get the current color of the current screen on the Ubuntu desktop?

You can open the background image in The Gimp (image editor) and then use the dropper tool to select the color on a specific point. It gives you the RGB value of the color at that point.

 Explain how you create launchers on a desktop in Ubuntu?

To create launchers on a desktop in Ubuntu you can use

ALT+F then type ” gnome-desktop-item-edit –create-new~/desktop,” it will launch the old GUI dialog and create a launcher on your desktop

 Explain what Memcached is?

Memcached is a free and open source, high-performance, distributed memory object caching system. The primary objective of Memcached is to enhance the response time for data that can otherwise be recovered or constructed from some other source or database. It is used to avoid the need to operate SQL database or another source repetitively to fetch data for a concurrent request.

Memcached can be used for

  • Social Networking->Profile Caching
  • Content Aggregation-> HTML/ Page Caching
  • Ad targeting-> Cookie/profile tracking
  • Relationship->Session caching
  • E-commerce -> Session and HTML caching
  • Location-based services-> Database query scaling
  • Gaming and entertainment->Session caching

Memcache helps in

  • Speed up application processes
  • It determines what to store and what not to
  • Reduce the number of retrieval requests to the database
  • Cuts down the I/O ( Input/Output) access (hard disk)

Drawback of Memcached is

  • It is not a persistent data store
  • Not a database
  • It is not an application specific
  • It cannot cache large object

 Mention some important features of Memcached?

Important features of Memcached includes

  • CAS Tokens:A CAS token is attached to an object retrieved from a cache. You can use that token to save your updated object.
  • Callbacks:It simplifies the code
  • getDelayed: It reduces the delay time of your script which is waiting for results to come back from a server
  • Binary protocol: You can use binary protocol instead of ASCII with the newer client
  • Igbinary: Previously, a client always used to do serialization of the value with complex data, but with Memcached, you can use igbinary option.

Explain whether it is possible to share a single instance of a Memcache between multiple projects?

Yes, it is possible to share a single instance of Memcache between multiple projects. Memcache is a memory store space, and you can run memcache on one or more servers. You can also configure your client to speak to a particular set of instances. So, you can run two different Memcache processes on the same host and yet they are completely independent. Unless, if you have partitioned your data, then it becomes necessary to know from which instance to get the data from or to put into.

 You are having multiple Memcache servers, in which one of the memcache servers fails, and it has your data, will it ever try to get key data from that one failed server?

The data in the failed server won’t get removed, but there is a provision for auto-failure, which you can configure for multiple nodes. Fail-over can be triggered during any socket or Memcached server level errors and not during standard client errors like adding an existing key, etc.

 Explain how you can minimize the Memcached server outages?

  • When one instance fails, several of them go down, and this will put a larger load on the database server when lost data is reloaded as a client make a request. To avoid this, if your code has been written to minimize cache stampedes then it will leave a minimal impact
  • Another way is to bring up an instance of Memcached on a new machine using the lost machines IP address
  • The code is another option to minimize server outages as it gives you the liberty to change the Memcached server list with minimal work
  • Setting timeout value is another option that some Memcached clients implement for Memcached server outage. When your Memcached server goes down, the client will keep trying to send a request till the time-out limit is reached

Explain how Memcached should not be used?

  • Memcached common misuse is to use it as a data store, and not as a cache
  • Never use Memcached as the only source of the information you need to run your application. Data should always be available through another source as well
  • Memcached is just a key or value store and cannot perform a query over the data or iterate over the contents to extract information
  • Memcached does not offer any form of security either in encryption or authentication

 When a server gets shut down does data stored in Memcached is still available?

Data stored in Memcached is not durable, so if a server is shut down or restarted, then all the data stored in Memcached is deleted.

 Mention what the difference between Memcache and Memcached?

  • Memcache: It is an extension that allows you to work through handy object-oriented (OOP’s) and procedural interfaces. It is designed to reduce database load in dynamic web applications.
  • Memcached: It is an extension that uses the libmemcached library to provide API for communicating with Memcached servers. It is used to increase the dynamic web applications by alleviating database load. It is the latest API.

What are the containers?

Containers are from of lightweight virtualization. They offer isolation among processes.

 What is post mortem meeting with reference to DevOps?

Post mortem meeting is done to discuss what went wrong and what steps you need to take in order to avoid failures.

 What is the easiest method to build a small cloud?

VMfres is one of the most effective options for making IaaS cloud from Virtual Box VMs in no time. However, if you want lightweight PaaS, then Dokku is a good option because bash script can be PaaS out of Dokku containers.

 Name two tools which are used for docker networking.

For docker networking, you can use Kubernetes and Docker swarm.

What is CBD’?

CBD or Component-Based Development is a unique way to approach product development. In this method, developers always look for existing well defined, tested, and verified components to compose and assemble them to a product instead of developing from scratch.

 Explain Pair Programming with reference to DevOps

Pair programming is an engineering practice of Extreme Programming Rules. In this method, two programmers work on the same system, on the same design/algorithm/code.

One programmer act as a “driver.” Other acts as an “observer” who continuously monitor the progress of a project to identify problems. The roles can be reversed at any point of time without any prior intimation.

 Explain Resilience Test

Test that ensures recovery without data and functionality loss after a failure is called Resiliency tests.

 Name three important DevOps KPIs

Three most common DevOps KPIs are:

  • Meantime to failure recovery
  • Deployment frequency
  • Percentage of failed deployments

 What are the different phases in DevOps?

Answer: DevOps is mainly classified into  phases. Its phases are in a particular cycle. However, all the phases are not separated by boundaries, and no phase begins even if the previous one has ended completely. Now, let’s study the DevOps cycle phase in more detail.

. Planning

Planning and software development is the first phase of the DevOps lifecycle. This phase involves understanding the project properly for the ultimate work goal of its participants. This also feeds the various phases of development and operations. It’s also important that organizations are trained on tools and metrics to have enough clarity of the project’s management.

. Development

In this phase, the project gets built by designing infrastructure, writing codes, defining tests, or by automation process. Evidence is important in this phase. In managing applications, operations with data, developers store codes in code manager, which allows viewing, versioning, and much more.

 Continuous Integration

This phase automates the mechanism of validation, testing. This has a unique feature that ensures the development environment is properly and then published in a service that integrates it with the remaining applications.

 Automated Deployment

DevOps stimulates the automation of deployments by tools and scripts with the ultimate goal of solving the whole process with the activation of a feature. The most important aspect of this phase is the arrival of the cloud, as a code that forces a change from finite infrastructure management to permanent cost optimization management.

 Operations

Usually, all operations related to DevOps happen continuously throughout the life of software, as there is a dynamic change in the infrastructure. This platform provides opportunities for transformation, availability, and scalability.

 Monitoring

This phase is a permanent phase of the DevOps process. DevOps monitors and analyzes information that displays the current status of the application.

What are the benefits of using the Version Control System (VCS)?

Answer: The key benefits of Version Control are as follows:

  1. With the Version Control System (VCS), all the workers are allowed to access the file freely at any time. It also allows merging all the changes that are made in a common version.
  2. It is designed to help multiple people by collaboratively edit text files, which makes sharing comparatively easy between multiple computers.
  3. It is important for documents that require a lot of redrafting and revision as they provide an audit trail for redrafting and updating final versions.
  4. It permits all the team members to have access to the complete history of the project so that in case of any breakdown in the central server, we can use any teammate’s storehouse.
  5. All the previous versions and variants are smartly packed up inside the VCS. Any version is requested at any time to get information about the previous complete projects.

 What are the different components of Selenium?

Answer: Selenium is an open-source tool that is used for automating different web applications. It has mainly four major components that help to run multiple test cases and provides services of using various browsers and languages for automation. The components of Selenium are as follows:

. Selenium IDE

Selenium IDE (Integrated Development Environment) is one of the simplest frameworks in the selenium suite. It has an easy record and playback function, which helps in figuring the tool that provides easy learning. If the tester is aware of the basics of HTML, JavaScript, and DOM, it is easier to utilize Selenium IDE. It enters the commands quickly and reduces the possibility of entering invalid commands.

. Selenium RC

Selenium RC (Remote Control) is a tool that helps in understanding test scripts and providing support for different programming languages like Ruby, PHP, Java, etc. It mainly depends upon JavaScript for automation and does not support record and playback features.

 Selenium WebDriver

It is mainly the extension of selenium RC, but it supports all the latest browsers and various platforms. It is created to support vital web pages in which elements present on the page can change without reloading the page, and it directly calls the browser for automation.

 Selenium GRID

Selenium GRID is a tool that runs multiple test cases against different browsers and machines in parallel. Several nodes are not fixed in the grid, and it can be launched on various browsers and platforms. It is used together with selenium RC.

What is the purpose of configuration management in DevOps?

Answer: Configuration management helps in automating tasks that are otherwise time-consuming and tedious and enhances an organization’s agility. It brings consistency and improves the process of a product/service by streamlining design, documentation, control, and implementation of changes during various phases of the project.

 What is the purpose of AWS in DevOps?

Answer: AWS services support the automation of manual tasks and processes that help developers build applications faster and more efficiently. These processes can be deployment, development, test workflows, configuration management and container management.

 What is the difference between a centralized and distributed version control system (VCS)?

Answer: In a centralized repository system, the repository is located in a central location, and clients access this system when they need something. In such a version control system, the repository is always updated with the latest changes as the changes are directly committed to the central system; therefore, all the clients always have access to the latest code. CVS and SVN are examples of centralized VCS.

In a distributed VCS, everyone in the team has their repository, which is a mirror of the central repository. It provides flexibility, as one can work offline. Only when the changes have to be committed to the central system, you need to be online. This makes distributed VCS faster. Git and Mercurial are distributed VCS.

 Can you tell us the fundamental differences between DevOps & Agile?

Answer: Although DevOps shares some similarities with the Agile methodology, which is one of the most popular SDLC methodologies, both are fundamentally different approaches to software development. Following are the various fundamental differences between the two:

  • Agile Approach – The agile approach is only meant for development in Agile while the agile approach is meant for both development and operations in DevOps.
  • Practices and Processes – While agile involves practices such as Agile Scrum and Agile Kanban, DevOps involves processes such as CD (Continuous Delivery), CI (Continuous Integration), and CT (Continuous Testing).
  • Priority – Agile prioritizes timeliness whereas, DevOps gives equal priority to timeliness and quality.
  • Release Cycles – DevOps offers smaller release cycles with immediate feedback while Agile offers only smaller release cycles without immediate feedback.
  • Feedback Source – Agile relies on feedback from customers while feedback from self (monitoring tools) is involved in DevOps.
  • Scope of Work – For Agile, the scope of work is agility only but for DevOps, it is agility and the need for automation.

 Why do we need DevOps?

Answer: Organizations these days are trying to transport small features to customers via a series of release trains instead of releasing big feature sets. There are several benefits of doing so, including better software quality and quick customer feedback.

All such benefits lead to a higher level of customer satisfaction, which is the most important goal for any product development project. To do so, companies need to:

  • Increase deployment frequency
  • Lessen lead time between fixes
  • The lower failure rate of new releases
  • In case of new release crashing, have a faster mean time to recovery

DevOps helps in fulfilling all these requirements and thus, achieving seamless software delivery. Full-fledged organizations like Amazon, Etsy, and Google have adopted DevOps methodology resulting in achieving performance levels that were previously uncharted.

With the adoption of DevOps methodology, organizations are able to accomplish tens to thousands of deployments in a single day. Moreover, doing so while offering first-rate reliability, security, and stability.

Can you name some of the most-used DevOps tools?

Answer: Following is a list of some of the most widely used DevOps tools:

  • Ansible – A configuration management and application deployment tool
  • Chef – A configuration management and application deployment tool
  • Docker – A containerization tool
  • Git – A version control system (VCS) tool
  • Jenkins – A continuous integration (CI) tool
  • Jira – An agile team collaboration tool
  • Nagios – A continuous monitoring tool
  • Puppet – A configuration management and application deployment tool
  • Selenium – A continuous testing (CT) tool

 What is Selenium used for?

AnswerSelenium is used for continuous testing in DevOps. The tool specializes in functional and regression forms of testing.

What do you understand by anti-patterns of DevOps?

Answer: When a DevOps pattern commonly adopted by other organizations doesn’t work in a specific context and still the organization continues using it, it leads to the adoption of an anti-pattern. In other words, anti-patterns are myths about DevOps. Some of the notable anti-patterns are:

  • An organization needs to have a separate DevOps group
  • Agile equals DevOps
  • DevOps is a process
  • DevOps is development-driven release management
  • DevOps is not possible because the organization is unique
  • DevOps is not possible because the people available are unsuitable
  • DevOps means Developers Managing Production
  • DevOps will solve all problems
  • Failing to include all aspects of the organization in an ongoing DevOps transition
  • Not defining KPIs at the start of a DevOps transition
  • Reduce the silo-based isolation of development and operations with a new DevOps team that silos itself from other parts of the organization

 DevOps has something called CI. What is it and what is its purpose?

Answer: CI in DevOps stands for Continuous Integration. CI is a development practice in which developers integrate code into a shared repository multiple times in a single day.

Continuous Integration of development and testing enhances the quality of the software as well as reducing the total time required for delivery.

The developer has broken the build if a team member checking in code runs into a compilation failure. As such, other developers are not able to sync with the shared source code repository without introducing compilation errors into their own workspaces.

This disrupts the collaborative and shared development process. Hence, as soon as a CI build breaks, it’s important to identify and correct the problem immediately.

Typically, a CI process includes a suite of unit, integration, and regression tests that run each time the compilation succeeds. In case any of the aforesaid tests fail, the CI build is considered unstable (which is common during an Agile sprint when development is ongoing) and not broken.

More often than not we hear shift left in DevOps. What is it?

Answer: The traditional software development lifecycle when graphed on a paper has two sides, left and right. While the left side of the graph includes design and development, the right side includes production staging, stress testing, and user acceptance.

To shift left in DevOps simply means the necessity of taking as many tasks on the right i.e. that typically happens toward the end of the application development process and incorporates them into earlier stages of a DevOps methodology.

There are several ways of accomplishing a shit left in DevOps, most notably:

  • Create production-ready artifacts at the end of every Agile sprint
  • Incorporating static code analysis routines in every build

The level of doing the DevOps the right way is directly dependent on the degree of shifting left as much as possible.

 What does CAMS in DevOps stand for?

Answer: The acronym CAMS is usually used for describing the core creeds of DevOps methodology. It stands for:

  • Culture
  • Automation
  • Measurement
  • Sharing

Git is a popular DevOps tool. Tell us how you will revert a commit that has already been pushed and made public.

Answer: There are two ways of doing so:

  • By creating a new commit to undo all changes made by the commit that has already been pushed and made public. Following command is used for doing so:
    git revert
  • By fixing or removing the bad file in a new commit and then pushing it to the remote repository. After making necessary changes to the file, commit it to the remote repository using the command:
    git commit -m “commit message”

 What are post mortem meetings?

Answer: Many times there is a need to discuss what went wrong during a DevOps process. For this, post mortem meetings are arranged. These meetings yield steps that should be taken to avoid the same failure or set of failures in the future for which the meeting was arranged in the first place.

How is Git rebase different from Git merge?

Answer: Git rebase is different from Git merge because, in the case of Git rebase, the feature branch is transferred to the master branch’s ending point. However, in the case of Git merge, the merging adds to a new commit in the history wherein history does not change, but the master branch is changed.

 Can we move or copy Jenkins from one server to another?

Answer: Yes, we can move or copy the Jenkins from one server to other. For instance, by copying the Jenkins jobs directory can be moved from the older server to the new server. This way, installation can be moved from one installation to another by copying in the corresponding job directory.

 Can we make a new copy of an existing Jenkins job?

Answer: Yes, we can make a new copy of an existing Jenkins job by creating a clone of the directory in a different name.

 What is the difference between continuous testing and automation testing?

Answer: In continuous testing, the process of executing the automated test is part of the software delivery process. In contrast, automation testing is a process wherein the manual process of testing is applied wherein the separate testing tool helps the developers in creating test scripts that can be executed again and again without any kind of manual intervention.

What is Jenkins Pipeline?

Answer: Jenkins pipeline is a suite of plugins that supports the implementation and integration of Jenkins’s continuous delivery pipeline.

 What is continuous integration?

Answer: Continuous integration, also known as a continuous delivery pipeline, includes functions of build, deploy, test, and release. It is a time-saving feature and builds jobs that are integrated and chain into a particular sequence.

 What is a Puppet Module?

Answer: Puppet Module is a collection of manifest and data, including files, templates, and facts that have a specific directory structure.

 How is the Puppet Module different from Puppet Manifest?

Answer: Puppet Manifests use the .pp extension. They are Puppet programs, which consist of the Puppet Code. On the other hand, Puppet Modules organizes various kinds of Puppet Manifests that can split the Puppet code with it.

 What is Ansible work in DevOps?

Answer: Ansible work is an open-source automation tool used in DevOps.

 What are the categories of Ansible in DevOps?

Answer: There are two categories of Ansible in DevOps which include,

  1. Controlling machines.
  2. Nodes.

How is DevOps different from agile methodology?

DevOps is a culture that allows the development and the operations team to work together. This results in continuous development, testing, integration, deployment, and monitoring of the software throughout the lifecycle.

d7

Agile is a software development methodology that focuses on iterative, incremental, small, and rapid releases of software, along with customer feedback. It addresses gaps and conflicts between the customer and developers.

d8

DevOps addresses gaps and conflicts between the Developers and IT Operations.

d9

 Mention some of the core benefits of DevOps.

The core benefits of DevOps are as follows:

Technical benefits

  • Continuous software delivery
  • Less complex problems to manage
  • Early detection and faster correction of defects

Business benefits

  • Faster delivery of features
  • Stable operating environments
  • Improved communication and collaboration between the teams

  What is the role of configuration management in DevOps?

  • Enables management of and changes to multiple systems.
  • Standardizes resource configurations, which in turn, manage IT infrastructure.
  • It helps with the administration and management of multiple servers and maintains the integrity of the entire infrastructure.

 How does continuous monitoring help you maintain the entire architecture of the system?

Continuous monitoring in DevOps is a process of detecting, identifying, and reporting any faults or threats in the entire infrastructure of the system.

  • Ensures that all services, applications, and resources are running on the servers properly.
  • Monitors the status of servers and determines if applications are working correctly or not.
  • Enables continuous audit, transaction inspection, and controlled monitoring.

Explain the term “Infrastructure as Code” (IaC) as it relates to configuration management.

  • Writing code to manage configuration, deployment, and automatic provisioning.
  • Managing data centers with machine-readable definition files, rather than physical hardware configuration.
  • Ensuring all your servers and other infrastructure components are provisioned consistently and effortlessly.
  • Administering cloud computing environments, also known as infrastructure as a service (IaaS).

 How is IaC implemented using AWS?

Start by talking about the age-old mechanisms of writing commands onto script files and testing them in a separate environment before deployment and how this approach is being replaced by IaC. Similar to the codes written for other services, with the help of AWS, IaC allows developers to write, test, and maintain infrastructure entities in a descriptive manner, using formats such as JSON or YAML. This enables easier development and faster deployment of infrastructure changes.

How do you push a file from your local system to the GitHub repository using Git?

First, connect the local repository to your remote repository:

git remote add origin [copied web address]

Second, push your file to the remote repository:

git push origin master

 How is a bare repository different from the standard way of initializing a Git repository?

Using the standard method:

git init

  • You create a working directory with git init
  • A .git subfolder is created with all the git-related revision history

Using the bare way

git init –bare

  • It does not contain any working or checked out a copy of source files
  • Bare repositories store git revision history in the root folder of your repository, instead of the .git subfolder

 Which of the following CLI commands can be used to rename files?

  1. git rm
  2. git mv
  3. git rm -r
  4. None of the above

The correct answer is B) git mv

 What is the process for reverting a commit that has already been pushed and made public?

There are two ways that you can revert a commit:

  1. Remove or fix the bad file in a new commit and push it to the remote repository. Then commit it to the remote repository using:git commit –m “commit message”
  2. Create a new commit that undoes all the changes that were made in the bad commit. Use the following command:git revert <commit id>

Example: git revert def

  What is the difference between Git Merge and Git Rebase?

Suppose you are working on a new feature in a dedicated branch, and another team member updates the master branch with new commits. You can use these two functions:

Git Merge

To incorporate the new commits into your feature branch, use Git merge.

  • Creates an extra merge commit every time you need to incorporate changes
  • But, it pollutes your feature branch history

Git Rebase

As an alternative to merging, you can rebase the feature branch on to master.

  • Incorporates all the new commits in the master branch
  • It creates new commits for every commit in the original branch and rewrites project history

 What is a merge conflict in Git, and how can it be resolved?

Git merge conflict happens when you have merge branches with competing for commits, and Git needs your help to decide which changes to incorporate in the final merge.

Manually edit the conflicted file to select the changes that you want to keep in the final merge.

Resolve using GitHub conflict editor

This is done when a merge conflict is caused after competing for line changes. For example, this may occur when people make different changes to the same line of the same file on different branches in your Git repository.

  • Resolving a merge conflict using conflict editor:
  • Under your repository name, click “Pull requests.”
  • In the “Pull requests” drop-down, click the pull request with a merge conflict that you’d like to resolve
  • Near the bottom of your pull request, click “Resolve conflicts.”

 

  • Decide if you only want to keep your branch’s changes, the other branch’s changes, or make a brand new change, which may incorporate changes from both branches.
  • Delete the conflict markers <<<<<<<, =======, >>>>>>> and make changes you want in the final merge.
  • If you have more than one merge conflict in your file, scroll down to the next set of conflict markers and repeat steps four and five to resolve your merge conflict.
  • Once you have resolved all the conflicts in the file, click Mark as resolved.
  • If you have more than one file with a conflict, select the next file you want to edit on the left side of the page under “conflicting files” and repeat steps four to seven until you’ve resolved all of your pull request’s merge conflicts.
  • Once you’ve resolved your merge conflicts, click Commit merge. This merges the entire base branch into your head branch.
  • To merge your pull request, click Merge pull request.
  • A merge conflict is resolved using the command line.
  • Open Git Bash.
  • Navigate into the local Git repository that contains the merge conflict.
  • Generate a list of the files that the merge conflict affects. In this example, the file styleguide.md has a merge conflict.
  • Open any text editor, such as Sublime Text or Atom, and navigate to the file that has merge conflicts.
  • To see the beginning of the merge conflict in your file, search the file for the conflict marker “<<<<<<<. ” Open it, and you’ll see the changes from the base branch after the line “<<<<<<< HEAD.”
  • Next, you’ll see “=======”, which divides your changes from the changes in the other branch, followed by “>>>>>>> BRANCH-NAME”.
  • Decide if you only want to keep your branch’s changes, the other branch’s changes, or make a brand new change, which may incorporate changes from both branches.
  • Delete the conflict markers “<<<<<<<“, “=======”, “>>>>>>>” and make the changes you want in the final merge.

In this example, both the changes are incorporated into the final merge:

  • Add or stage your changes.
  • Commit your changes with a comment.

Now you can merge the branches on the command line, or push your changes to your remote repository on GitHub and merge your changes in a pull request.

What concepts are key aspects of the Jenkins pipeline?

  • Pipeline: User-defined model of a CD pipeline. The pipeline’s code defines the entire build process, which includes building, testing and delivering an application
  • Node: A machine that is part of the Jenkins environment and capable of executing a pipeline
  • Step: A single task that tells Jenkins what to do at a particular point in time
  • Stage: Defines a conceptually distinct subset of tasks performed through the entire pipeline (build, test, deploy stages)

 Which file is used to define dependency in Maven?

  1. xml
  2. xml
  3. xml
  4. xml

The correct answer is B) pom.xml

  How can you copy Jenkins from one server to another?

  • Move the job from one Jenkins installation to another by copying the corresponding job directory.
  • Create a copy of an existing job by making a clone of a job directory with a different name.
  • Rename an existing job by renaming a directory.

What are the ways in which a build can be scheduled/run in Jenkins?

  • By source code management commits.
  • After completion of other builds.
  • Scheduled to run at a specified time.
  • Manual build requests.

 What are the commands that you can use to restart Jenkins manually?

Two ways to manually restart Jenkins:

  1. (Jenkins_url)/restart            // Forces a restart without waiting for builds to complete
  2. (Jenkins_url)/safeRestart    // Allows all running builds to complete before it restarts

 What are the different Selenium components?

Selenium has the following components:

Selenium Integrated Development Environment (IDE)

  • It has a simple framework and should be used for prototyping.
  • It has an easy-to-install Firefox plug-in.

Selenium Remote Control (RC)

  • Testing framework for a developer to write code in any programming language (Java, PHP, Perl, C#, etc.).

Selenium WebDriver

  • Applies a better approach to automate browser activities.
  • It does not rely on JavaScript.

Selenium Grid

  • Works with Selenium RC and runs tests on different nodes using browsers.

 What are the different exceptions in Selenium WebDriver?

Exceptions are events that occur during the execution of a program and disrupt the normal flow of a program’s instructions. Selenium has the following exceptions:

  • TimeoutException – It is thrown when a command performing an operation does not complete in the stipulated time.
  • NoSuchElementException – It is thrown when an element with specific attributes is not found on the web page.
  • ElementNotVisibleException – It is thrown when an element is present in Document Object Model (DOM) but is not visible. Ex: Hidden Elements defined in HTML using type=“hidden”.
  • SessionNotFoundException – The WebDriver is performing the action immediately after quitting the browser.

 How can you access the text of a web element?

Get command is used to retrieve the text of a specified web element. The command does not return any parameter but returns a string value.

Used for:

  • Verification of messages
  • Labels
  • Errors displayed on the web page

Syntax:

String Text=driver.findElement(By.id(“text”)).getText();

 What are driver.close() and driver.quit() in WebDriver?

These are two different methods used to close the browser session in Selenium WebDriver:

  • close() – This is used to close the current browser window on which the focus is set. In this case, there is only one browser open.
  • quit() – It closes all the browser windows and ends the WebDriver session using the driver.dispose method.

 How can you submit a form using Selenium?

The following lines of code will let you submit a form using Selenium:

WebElement el = driver.findElement(By.id(“ElementID”));

el.submit();

 Which of the following commands would you use to stop or disable the ‘httpd’ service when the system boots?

  1. # systemctl disable httpd.service
  2. # system disable httpd.service
  3. # system disable httpd
  4. # systemctl disable httpd.service

The correct answer is A) # systemctl disable httpd.service

  What is the command to sign the requested certificates?

  • For Puppet version .:# puppetca –sign hostname-of-agentExample:# puppetca –sign ChefAgent# puppetca sign hostname-of-agent

    Example:

    # puppetca sign ChefAgent

  • For Puppet version .:# puppetca –sign hostname-of-agentExample:# puppetca –sign ChefAgent# puppetca sign hostname-of-agent

    Example:

    # puppetca sign ChefAgent

 Which open source or community tools do you use to make Puppet more powerful?

  • Changes in the configuration are tracked using Jira, and further maintenance is done through internal procedures.
  • Version control takes the support of Git and Puppet’s code manager app.
  • The changes are also passed through Jenkin’s continuous integration pipeline.

 What are the resources in Puppet?

  • Resources are the basic units of any configuration management tool.
  • These are the features of a node, like their software packages or services.
  • A resource declaration, written in a catalog, describes the action to be performed on or with the resource.
  • When the catalog is executed, it sets the node to the desired state.

  What is the best way to make content reusable/redistributable?

There are three ways to make content reusable or redistributable in Ansible:

  • Roles are used to managing tasks in a playbook. They can be easily shared via Ansible Galaxy.
  • “include” is used to add a submodule or another file to a playbook. This means a code written once can be added to multiple playbooks.
  • “import” is an improvement of “include,” which ensures that a file is added only once. This is helpful when a line is run recursively.

  What are the advantages of Docker over virtual machines?

d9 1 d10

 What is a Dockerfile used for?

  • A Dockerfile is used for creating Docker images using the build command.
  • With a Docker image, any user can run the code to create Docker containers.
  • Once a Docker image is built, it’s uploaded in a Docker registry.
  • From the Docker registry, users can get the Docker image and build new containers whenever they want.

  How do you create a Docker container?

Task: Create a MySQL Docker container

A user can either build a Docker image or pull an existing Docker image (like MySQL) from Docker Hub.

Now, Docker creates a new container MySQL from the existing Docker image. Simultaneously, the container layer of the read-write filesystem is also created on top of the image layer.

  • Command to create a Docker container: Docker run -t –i MySQL
  • Command to list down the running containers: Docker ps

 What is the difference between a registry and a repository?

d11

 How does Nagios help in the continuous monitoring of systems, applications, and services?

Nagios enables server monitoring and the ability to check if they are sufficiently utilized or if any task failures need to be addressed.

  • Verifies the status of the servers and services
  • Inspects the health of your infrastructure
  • Checks if applications are working correctly and web servers are reachable

What are active and passive checks in Nagios?

Nagios is capable of monitoring hosts and services in two ways:

Actively

  • Active checks are initiated as a result of the Nagios process
  • Active checks are regularly scheduled

Passively

  • Passive checks are initiated and performed through external applications/processes
  • Passive checks results are submitted to Nagios for processing

 Name the three variables that affect recursion and inheritance in Nagios.

name – Template name that can be referenced in other object definitions so it can inherit the object’s properties/variables.

use – Here, you specify the name of the template object that you

want to inherit properties/variables from.

register – This variable indicates whether or not the object definition

should be registered with Nagios.

define someobjecttype{

object-specific variables ….

name template_name

use name_of_template

register [/]

}

 Mention what the key aspects or principle behind DevOps are?

The key aspects or principle behind DevOps is

  • Infrastructure as code
  • Continuous deployment
  • Automation
  • Monitoring
  • Security

 What are the core operations of DevOps with application development and with infrastructure?

The core operations of DevOps are

Application development

  • Code building
  • Code coverage
  • Unit testing
  • Packaging
  • Deployment

Infrastructures Software Testing Why Testing is Important

  • Provisioning
  • Configuration
  • Orchestration
  • Deployment

 Explain how “Infrastructure code” is processed or executed in AWS?

In AWS,

  • The code for infrastructure will be in simple JSON format
  • This JSON code will be organized into files called templates
  • This template can be deployed on AWS devops and then managed as stacks
  • Later the CloudFormation service will do the Creating, deleting, updating, etc. operation in the stack

 Explain how you would handle revision (version) control?

My approach to handling revision control would be to post the code on SourceForge or GitHub so everyone can view it. Also, I will post the checklist from the last revision to make sure that any unsolved issues are resolved.

 What are the types of Http requests?

The types of Http requests are

  • GET
  • HEAD
  • PUT
  • POST
  • PATCH
  • DELETE
  • TRACE
  • CONNECT
  • OPTIONS

 Explain what you would check If a Linux-build-server suddenly starts getting slow?

If a Linux-build-server suddenly starts getting slow, you will check for the following three things

  • Application Level troubleshooting
RAM related issues, Disk I/O read-write issues, Disk Space related Issues, etc.
  • System Level troubleshooting
Check for Application log file OR application server log file, system performance issues, Web Server Log – check HTTP, tomcat lo, jboss, or WebLogic logs to see if the application server response/receive time is the issues for slowness, Memory Leak of any application
  • Dependent Services troubleshooting
Antivirus related issues, Firewall related issues, Network issues, SMTP server response time issues, etc.

  Give some benefits of using Version Control system

  • The version Control system allows team members to work freely on any file at any time.
  • All the past versions and variants are closely packed up inside the VCS.
  • A distributed VCS like helps you to store the complete history of the project so in case of a breakdown in the central server you can use your team member’s local Git repository.
  • Allows you to see what exact changes are made in the file’s content

 Explain Git Bisect

Git bisect helps you to find the commit which introduced a bug using binary search.

 Name some best practices which should be followed for DevOps success.

Here, are essential best practices for DevOps implementation:

  • The speed of delivery means time taken for any task to get them into the production environment.
  • Track how many defects are found in the various
  • It’s important to measure the actual or the average time that it takes to recover in case of a failure in the production environment.
  • The number of bugs being reported by the customer also impact the quality of the application.

 Explain SubGIt tool

SubGit helps you to migrate SVN to Git. It also allows you to build a writable Git mirror of a local or remote Subversion repository.

 Name some important network monitoring tools

Some most prominent network monitoring tools are:

  • Splunk
  • Icinga
  • Wireshark
  • Nagios
  • OpenNMS

 Whether your video card can run Unity how would you know?

When you use a command

/usr/lib/Linux/unity_support_test-p

it will give detailed output about Unity’s requirements, and if they are met, then your video card can run unity.

 Explain how to enable startup sound in Ubuntu?

To enable startup sound

  • Click control gear and then click on Startup Applications
  • In the Startup Application Preferences window, click Add to add an entry
  • Then fill the information in comment boxes like Name, Command, and Comment

/usr/bin/canberra-gtk-play—id= “desktop-login”—description= “play login sound”

  • Logout and then login once you are done

You can also open it with shortcut key Ctrl+Alt+T.

 Explain how you can update Memcached when data changes?

When data changes you can update Memcached by

  • Clearing the Cache proactively: Clearing the cache when an insert or update is made
  • Resetting the Cache:It is similar to the first method but rather than just deleting the keys and waiting for the next request for the data to refresh the cache, reset the values after the insert or update.

 Explain what Dogpile effect is? How can you prevent this effect?

Dogpile effect is referred to the event when a cache expires, and websites are hit by the multiple requests made by the client at the same time. This effect can be prevented by using a semaphore lock. In this system when value expires, the first process acquires the lock and starts generating new value.

 Explain Blue/Green Deployment Pattern

Blue/Green coloring pattern addresses the most important challenges faced during the automatic deployment process. In Blue/ Green Deployment approach, you need to ensure two identical production environment. However, only one among them is LIVE at any given point of time. The LIVE environment is called Blue environment.

When the team prepares the next release of their software, they conduct their final stage of testing in an environment which is known as Green environment. Once verified, the traffic is routed to the Green environment.

 Name some of the areas where DevOps are Implemented

DevOps are used for Production, IT operations, production feedback, and its software development.

 Why has DevOps gained popularity over the past few years?

Answer: Nowadays, DevOps are in great demand in the current industry, and many businesses are eagerly wanting to invest in DevOps talent. Some of the huge multi-national companies such as Facebook and Netflix are investing their money and time in DevOps for automation and pacing up application deployment as every large industry wants to see some automation in the coming years. It helps the organizations to grow and expand their businesses to generate large revenues. Its popularity continues to grow in demand as tech competition increases as most companies start adopting DevOps practices; then, it becomes even more important for the competitors to invest in similar or better development practices, increasing demand.

DevOps implementation has given provable results in businesses which contend higher efficiency, with its new technology standards; tech workers can implement codes faster than ever before, and with lesser errors. As now, more consumers and businesses rely on cloud software as it requires fast deployments to meet the consumer needs without interrupting services; this increases user adoption of cloud software like DevOps over the years.

 What is the difference between Ansible and Puppet?

Answer: Today, DevOps professionals have to manage and control a huge number of servers hosting, so for this, they need exponential growth in computing as well as new technology such as virtualization and cloud computing. Thus Puppet and Ansible are the tools that are used for managing a large number of servers.

These are also called Remote Execution and Configuration Management tools, and it allows the admin to perform or execute the commands on many servers simultaneously. Its main feature is generally to maintain and configure thousands of servers at a single time. Apart from this, Ansible and Puppet has major differences right from the moment and can be differentiated concerning many mechanisms as shown below:

Category

  1. Ansible
  2. Puppet

Scalability

  1. Scalability in Ansible is very convenient and simple.
  2. Puppet also offers scalability but somewhere lacks as compared to ansible

Management and Scheduling

  1. In ansible, configuration gets pushed to the nodes from the server for better employment of code.
  2. In puppet, configuration gets pulled from the selected server.

Language

  1. It is fully published in Python and uses YAML syntax to convey or write configurations.
  2. It is written in Ruby and uses declarative language to form the configurations.

Availability in case of failures

  1. In this case, availability will have lesser worries as the subordinate node is present in case of any nodal failure.
  2. In this case, many multiple master servers are present so that if the original master fails, it does not stop the ongoing task.

Repository

  1. The repository of Ansible is Ansible Galaxy, where all the information is stored.
  2. A storehouse of the puppet is Puppet forge, which has  modules.

Setting up and Usage

  1. Ansible has a master that runs the client machine and writes the configuration to manage tasks.
  2. Puppet uses a client-server architecture to manage complex tasks.

 What are the important business and technical benefits of using DevOps?

Answer: DevOps brings a lot of business and technical benefits to the table. Some of the most important ones are listed down as follows:

Business benefits

  • Enhanced operating environment stability
  • Faster delivery of features
  • More time for adding value to the product

Technical benefits

  • Continuous software delivery
  • Faster problem resolution
  • Lesser complex problems

 What are the several KPIs used to gauge DevOps success?

Answer: KPIs is a contracted form of Key Performance Indicators. In order to measure the success of a DevOps process, several KPIs can be used. Some of the most popular ones are:

  • Application performance
  • Application usage and traffic
  • The automated test pass percentage
  • Availability
  • Change volume
  • Customer tickets
  • Defect escape rate
  • Deployment frequency
  • Deployment time
  • Error rates
  • Failed deployments
  • Lead time
  • Mean time to detection (MTTD)
  • Meantime to recovery (MTTR)

 In your opinion, what are the major benefits of implementing DevOps automation?

Answer: Following are the major benefits of implementing DevOps automation:

  • Removal of the possibility of human error from the CD equation (Core benefit).
  • As tasks become more predictable and repeatable, it is easy to identify and correct when something goes wrong. Hence, it results in producing more reliable and robust systems.
  • Removes bottlenecks from the CI pipeline. It results in increased deployment frequency and decreased number of failed deployments. Both of them are important DevOps KPIs.

 What do you understand by containers?

Answer: Containers are a form of lightweight virtualization that help in providing isolation among processes. Containers are heavier than a chroot but lighter than a hypervisor.

 Microservices are a core part of DevOps. Can you name any two popular Java development frameworks for creating microservices?

Answer: There are several Java frameworks that allow creating microservices. However, Eclipse MicroProfile and Spring Boot stand out from the herd as the two leading Java development frameworks used in DevOps for creating microservices.

 What do you understand by a Version Control System (VCS)? Define its uses.

Answer: A Version Control System or VCS is a system that is capable of recording changes made to a file or a group of files over time. Git and Mercurial are two of the most popular version control systems. Important uses of a VCS are:

  • Check what was the last modification that caused a problem
  • Compare the changes made over time
  • Identifying who introduced a new issue and at what time
  • Revert a file or files to some earlier state
  • Revert the complete project to a previous state

 Draw a comparison between Asset Management and Configuration Management.

Answer: The process of monitoring as well as maintaining things of value to an entity or group is called an Asset Management.

Configuration Management refers to the process of controlling, identifying, planning for, and verifying the configuration items within service in support of Change Management.

 Can you state and explain various key elements of continuous testing?

Answer: Various key elements of continuous testing are:

  • Advanced analysis – Used for forecasting and predicting unknown future events
  • Policy analysis – Meant for improving the testing process
  • Requirement traceability – Refers to the ability to describe as well as follow the life of a requirement, from its origin to deployment
  • Risk assessment – The method or process of identifying hazards and risk factors that can cause potential damage
  • Service virtualization – Allows using virtual services instead of production services. Emulates software components for simple testing
  • Test optimization – Improve the overall testing process

 Please explain the core operations of DevOps in terms of development and infrastructure.

Answer: Core operations of DevOps in terms of development and infrastructure are:

  • Application development – Developing a product that is able to meet all customer requirements and offers a remarkable level of quality
  • Code coverage – a measurement of the total number of blocks or lines or arcs of the code executed while the automated tests are running
  • Code developing – Prepare the codebase required for the product development
  • Configuration – Allowing the product to be used in an optimum way
  • Deployment – Installing the software to be used by the end-user
  • Orchestration – Arrangement of several automated tasks
  • Packaging – Activities involved when the release is ready for deployment
  • Provisioning – Ensuring that the infrastructure changes arrive just-in-time with the code that requires it
  • Unit testing – Meant for testing individual units or components

  What is Forking Workflow?

Answer: Forking Workflow gives every developer with their service side repositories, thereby supporting open source projects.

 How is Forking Workflow better than Git Workflow?

Answer: Forking Workflow is better than Git Workflow because it helps in integrating the contributions of different developers without needing everyone to push to a single central repository for cleaning project history. Thus the developers are allowed to push their server-side repositories, and thereby on the project maintainer will push to the official repository.

 What is Git rebase?

Answer: Git rebase is a command which is designed to integrate the changes from one branch to another brand.

What is the role of a Selenium Grid?

Answer: The role of a Selenium Grid is to execute the same or different test scripts and that too on different platforms and browsers so that the distributed test execution can be made. It helps in testing under various environments and offers an ability to save execution time.

 Can we secure Jenkins?

Answer: Yes, we can secure Jenkins in the following ways:

  1. Ensuring that global security is on
  2. Checking if Jenkins is integrated
  3. Making sure that the project matrix is enabled
  4. Automating the process of setting up rights and privileges
  5. Limiting physical access to Jenkins data
  6. Applying security audits regularly

  Can we install Ansible on the controlling machines?

Answer: Yes, we can install Ansible on the controlling machine by using the machine nodes that are managed with the help of SSH.

 Are Ansible agentless tool? What are its benefits?

Answer: Yes, Ansible is an agentless tool because it does not require any kind of mandatory installations on the remote nodes. The benefits of the Ansible tool include the following:

  1. Task automation
  2. Configuration management
  3. Application deployment

So, this brings us to the end of the DevOps Interview Questions blog.This Tecklearn ‘Top DevOps Interview Questions and Answers’ helps you with commonly asked questions if you are looking out for a job in DevOps Domain. If you wish to learn DevOps and build a career in DevOps domain, then check out our interactive DevOps Training, that comes with 24*7 support to guide you throughout your learning period.

https://www.tecklearn.com/course/devops-training/

DevOps Training

About the Course

IT Experts have immense pressure to improve the business efficiency by developing, testing and deploying a product securely, so DevOps has become a software development methodology. Tecklearn’s DevOps Training program will prepare you for a career in DevOps, the fast-growing field that bridges the gap between software developers and operations. The DevOps Certification Training Program will provide you with in-depth knowledge of various DevOps tools including Git and GitHub, Maven, Jenkins, Docker, Ansible, Puppet, Chef, Kubernetes and Nagios. This training is completely hands-on and you will become an expert in the principles of continuous development and deployment, automation of configuration management, inter-team collaboration and IT service agility.

Why Should you take DevOps Training?

  • The DevOps market is expected to grow from USD 3.42 Billion in 2018 to USD 10.31 Billion by 2023, at a Compound Annual Growth Rate (CAGR) of 24.7% during the forecast period. The demand for DevOps is expected to be driven by several factors, such as lower costs, flexibility, agility, and fast application delivery.
  • Average salary given to a DevOps Engineer is around $122,969 per annum – Indeed.com
  • Amazon, Netflix, NASA, eBay, GE, ING, Intuit, PayPal, Splunk, Uber & other MNCs worldwide use DevOps

What you will Learn in this Course?

Introduction to DevOps

  • What is Software Development
  • Software Development Life Cycle
  • Why DevOps?
  • What is DevOps?
  • DevOps Lifecycle
  • DevOps Tools
  • Benefits of DevOps
  • How DevOps is related to Agile Delivery
  • DevOps Implementation

Git and GitHub

  • What is version control
  • Version Control System (VCS) Products
  • Types of VCS
  • What is Git
  • Why Git for your organization
  • Install Git
  • Common commands in Git
  • Working with Remote Repositories
  • GitHub
  • Git Installation
  • Git Lifecycle
  • GitHub (Push, Pull Request)
  • GitHub Workflow

Maven

  • Maven
  • Maven Directory
  • Maven Lifecycle
  • Maven Dependencies
  • Maven Repositories
  • Phases and Goals

Continuous Integration with Jenkins

  • Introduction to Continuous Integration and Jenkins
  • Jenkins Management
  • Jenkins Master Slave Architecture
  • Tools Required for CI
  • Understanding CI/CD Pipelines
  • Creating an end to end automated CI/CD Pipeline
  • Jenkins Versions

Containerization using Docker – Part 1

  • Introduction to Docker
  • Understanding Docker Lifecycle
  • Docker Architecture
  • Components of Docker Ecosystem
  • Common Docker Operations
  • Committing changes in a Container
  • Hands On

Containerization using Docker – Part 2

  • Building Custom Docker Images
  • Docker Image
  • Introduction to Docker Swarm
  • Deploying a 2-Node Cluster using Docker Swarm
  • Hands on

Configuration Management using Ansible

  • What is Ansible?
  • Ansible vs Puppet
  • Ansible Architecture
  • Ansible Installation
  • Setting up Master Slave using Ansible
  • Configuring Ansible Roles
  • Write Playbooks
  • Applying configuration using Ansible
  • Hands on

Continuous Deployment: Configuration Management using Puppet

  • Need of Configuration Management
  • What is Puppet
  • Puppet Architecture
  • Puppet Components
  • Puppet Lifecycle
  • Setting up Master Slave using Puppet
  • Puppet Manifests
  • Puppet Modules
  • Applying configuration using Puppet
  • Puppet File Server
  • Hands On

Continuous Delivery using Chef

  • Continuous Delivery
  • What is Chef
  • Chef Framework
  • How Chef Works
  • Chef Advantages
  • Chef Installation
  • Hands on

Continuous Monitoring using Nagios

 

  • Introduction to Continuous Monitoring
  • Introduction to Nagios
  • Nagios Architecture
  • Monitoring Services in Nagios
  • Installing Nagios
  • Nagios Plugins (NRPE) and Objects
  • Nagios Commands and Notification
  • Monitoring of different servers using Nagios

Continuous Orchestration using Kubernetes

  • Introduction to Kubernetes
  • Docker Swarm vs Kubernetes
  • Kubernetes Architecture
  • Deploying Kubernetes using Kubeadms
  • Alternate ways of deploying Kubernetes
  • Understanding YAML
  • Creating a Deployment in Kubernetes using YAML
  • Creating a Service in Kubernetes
  • Installing Kubernetes Dashboard
  • Deploying an App using Dashboard
  • Using Rolling Updates in Kubernetes
  • Containers and Container Orchestration

Got a question for us? Please mention it in the comments section and we will get back to you.

 

 

 

 

 

0 responses on "Top DevOps Interview Questions and Answers"

Leave a Message

Your email address will not be published. Required fields are marked *