DEVOPS
*. 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.
2. 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.
3. 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.
4. 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.
5. 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).
6 . Are there any technical challenges with Selenium?
It supports only web-based applications.
It does not support the Bitmap comparison.
No vendor support is available for Selenium compared to commercial tools like HP UFT.
As there is no object repository concept, maintainability of objects becomes very complex.
7. What are the benefits of using version control?
Here are the benefits of using Version Control:
All team members are free to work on any file at any time with the Version Control System (VCS). Later on, VCS will allow the team to integrate all of the modifications into a single version.
The VCS asks to provide a brief summary of what was changed every time we save a new version of the project. We also get to examine exactly what was modified in the content of the file. As a result, we will be able to see who made what changes to the project.
Inside the VCS, all the previous variants and versions are properly stored. We will be able to request any version at any moment, and we will be able to retrieve a snapshot of the entire project at our fingertips.
8. Describe the branching strategies you have used.
Release branching - We can clone the develop branch to create a Release branch once it has enough functionality for a release. This branch kicks off the next release cycle, thus no new features can be contributed beyond this point.
Feature branching - This branching model maintains all modifications for a specific feature contained within a branch. The branch gets merged into master once the feature has been completely tested and approved by using tests that are automated.
Task branching - In this branching model, every task is implemented in its respective branch. The task key is mentioned in the branch name. We need to simply look at the task key in the branch name to discover which code implements which task.
9. What is the Blue/Green Deployment Pattern?
This is a method of continuous deployment that is commonly used to reduce downtime. This is where traffic is transferred from one instance to another. In order to include a fresh version of code, we must replace the old code with a new code version.
10. What is Continuous Testing?
Continuous Testing constitutes the running of automated tests as part of the software delivery pipeline to provide instant feedback on the business risks present in the most recent release. In order to prevent problems in step-switching in the Software delivery life-cycle and to allow Development teams to receive immediate feedback, every build is continually tested in this manner.
11. What is Automation Testing?
Test automation or manual testing Automation is the process of automating a manual procedure in order to test an application or system. Automation testing entails the use of independent testing tools that allow you to develop test scripts that can be run repeatedly without the need for human interaction.
12. How to automate Testing in the DevOps lifecycle?
Developers are obliged to commit all source code changes to a shared DevOps repository.
Every time a change is made in the code, Jenkins-like Continuous Integration tools will grab it from this common repository and deploy it for Continuous Testing, which is done by tools like Selenium.
13. Why is Continuous Testing important for DevOps?
Any modification to the code may be tested immediately with Continuous Testing. This prevents concerns like quality issues and release delays that might occur whenever big-bang testing is delayed until the end of the cycle. In this way, Continuous Testing allows for high-quality and more frequent releases.
14. 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
15. 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
16. Which CLI commands can be used to rename files?
git mv
17. What is Git stash?
A developer working with a current branch wants to switch to another branch to work on something else, but the developer doesn't want to commit changes to your unfinished work. The solution to this issue is Git stash. Git stash takes your modified tracked files and saves them on a stack of unfinished changes that you can reapply at any time.
18. Explain the concept of branching in Git.
Suppose you are working on an application, and you want to add a new feature to the app. You can create a new branch and build the new feature on that branch.
By default, you always work on the master branch
The circles on the branch represent various commits made on the branch
After you are done with all the changes, you can merge it with the master branch
19. 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.
20. 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.
21. What is Jenkins file?
Jenkins file 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.
22. 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, and deploy stages).
23. Which file is used to define dependency in Maven?
pom.xml
24. 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.
25. What are driver.close and driver.quit in WebDriver?
These are two different methods used to close the browser session in Selenium WebDriver:
driver.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.
driver.quit - It closes all the browser windows and ends the WebDriver session using the driver.dispose method.
26. What are the Testing types supported by Selenium?
There are two types of testing that are primarily supported by Selenium:
Functional Testing - Individual testing of software functional points or features.
Regression Testing - Wherever a bug is fixed, a product is retested and this is called Regression Testing.
27. What is Selenium IDE?
Selenium integrated development environment (IDE) is an all-in-one Selenium script development environment. It may be used to debug tests, alter and record and is also available as a Firefox extension. Selenium IDE comes with the whole Selenium Core that allows us to rapidly and easily replay and record tests in the exact environment where they will be conducted.
28. 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.
29. 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.
30. 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.
31. What is an Ansible role?
An Ansible role is an independent block of tasks, variables, files, and templates embedded inside a playbook.
32. 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 sub module 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.
33. 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.
34. What are the cloud platforms that support Docker?
The cloud platforms that Docker runs on:
Amazon Web Services
Microsoft Azure
Google Cloud Platform
Rackspace
35. 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
36. What are the port numbers that Nagios uses for monitoring purposes?
Usually, Nagios uses the following port numbers for monitoring:
5666
5667
5668
37. 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
38. 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.
39. 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.
40. Can you tell me something about Memcached?
Memcached is a Free & open-source, high-performance, distributed memory object caching system.
This is generally used in the management of memory in dynamic web applications by caching the data in RAM. This helps to reduce the frequency of fetching from external sources. This also helps in speeding up the dynamic web applications by alleviating database load.
41. Do you know about post mortem meetings in DevOps?
By the name, we can say it is a type of meeting which is conducted at the end of the project. In this meeting, all the teams come together and discuss the failures in the current project. Finally, they will conclude how to avoid them and what measures need to be taken in the future to avoid these failures.
42. What does CAMS stand for in DevOps?
In DevOps, CAMS stands for Culture, Automation, Measurement, and Sharing.
Culture: Culture is like a base of DevOps. It is implementing all the operations between the operations team and development team in a particular manner to make things comfortable for the completion of the software production.
Automation: Automation is one of the key features of DevOps. It is used to reduce the time gap between the processes like testing and deployment.
Measurement: Measurement in the CAMS model of DevOps is related to measuring crucial factors in the software development process, which can indicate the overall performance of the team.
Sharing: This Sharing Culture plays a key role in DevOps as this helps in sharing the knowledge with other people of the team.
43. What is Docker image?
Docker image is the source of Docker container. In other words, Docker images are used to create containers. Images are created with the build command, and they’ll produce a container when started with run. Images are stored in a Docker registry such as registry.hub.docker.com because they can become quite large, images are designed to be composed of layers of other images, allowing a minimal amount of data to be sent when transferring images over the network.
44. What is Docker hub?
Docker hub is a cloud-based registry service which allows you to link to code repositories, build your images and test them, stores manually pushed images, and links to Docker cloud so you can deploy images to your hosts. It provides a centralized resource for container image discovery, distribution and change management, user and team collaboration, and workflow automation throughout the development pipeline.
45. What is Docker Swarm?
It is native clustering for Docker which turns a pool of Docker hosts into a single, virtual Docker host. Docker Swarm serves the standard Docker API, any tool that already communicates with a Docker daemon can use Swarm to transparently scale to multiple hosts.
46. What is CI?
CI or Continuous Integration is the process of compiling the entire code base, every time a member of the software development team checks the code, into the shared source code repository.
47. Name three important DevOps KPIs.
Three of the most common DevOps KPIs are:
Meantime to failure recovery
Deployment frequency
Percentage of failed deployments
48. What is DevOps? Is it a tool?
DevOps can’t be referred to as a tool; it is a collaborative work culture that combines development and operations teams for continuous development, continuous testing, continuous integration, continuous deployment, and continuous monitoring.
49. What are the core operations of DevOps in terms of development and infrastructure?
The core operations of DevOps are application development, version control, unit testing, deployment with infrastructure, monitoring, configuration, and orchestration.
50. Can you tell me the advantages of using Git?
Data redundancy and replication
High availability
Only one Git directory per repository
Superior disk utilization and network performance
Collaboration friendly
Can be used for any sort of projects