Skip to content

Commit 1deb3e3

Browse files
committed
Ansible notes
1 parent b306637 commit 1deb3e3

2 files changed

Lines changed: 265 additions & 0 deletions

File tree

Dev-ops-Interview.md

Lines changed: 265 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,60 @@
1313
* CI/CD
1414
* Testing
1515

16+
***********
17+
### Top 5 DevOps Tools You Should Know In 2019
18+
19+
* Ansible
20+
21+
- Ansible is a quite simple software provisioning, configuration management and application deployment tool, which ensures faster time-to-market for your applications. Whether you are a one-man company or an enterprise, you can automate orchestration, cloud provisioning, computing machines deployment and other tasks. I like Ansible because it is not as complex as Puppet or Chef, but speeds up productivity just as well.
22+
23+
- Ansible playbooks are written in YAML, which is one of the easiest data-serialization languages for creating configuration files.
24+
- It’s fast, performs all its functions over SSH and doesn't require agent installation.
25+
-It allows you to create groups of servers, describe how these should be configured and what actions should be performed on these machines.
26+
27+
28+
29+
* Jenkins
30+
- A lot of DevOps engineers call Jenkins the best CI/CD tool available in the market, since it’s incredibly useful. Jenkins is an automation server that is written in Java and is used to report changes, conduct live testing and distribute code across multiple machines. As Jenkins has a built-in GUI and over 1,000 plugins to support building and testing your application, it is considered a really powerful, yet easy to use tool. Thanks to these plugins, Jenkins integrates well with practically every other instrument in the continuous integration and continuous delivery toolchain.
31+
32+
Easy to install and a lot of support available from the community.
33+
1,000+ plugins are available and easy to create your own, if needed.
34+
It can be used to publish results and send email notifications.
35+
36+
* Docker is a software containerization platform that allows DevOps to build, ship, and run distributed processes within containers. This gives developers the ability to create predictable environments that are isolated from the rest of the applications and can be run anywhere. Containers are isolated but share the same OS kernel. This way you get to use hardware resources more efficiently compared to virtual machines.
37+
38+
Each container can hold a single process, like a web server or database management system. You can create a cluster of containers distributed across different nodes to have your application up and running in both load balancing and high availability modes. Containers can communicate on a private network, as you most likely want to keep some of your application parts private for security purposes. Simply expose your web server to the Internet and you are good to go.
39+
40+
What I like most is that you can install Docker on your computer to run containers locally to make some ad-hoc software tests without installing its dependencies globally. When you are done, you simply terminate your Docker container and your computer is as clean as new.
41+
42+
Build once, run anywhere! You can package an application from your laptop and run it unmodified on any public/private cloud or bare metal server.
43+
Containers are lightweight and fast.
44+
Docker Hub offers many official and community-built public Docker images.
45+
Separating different components of a large application into containers have security benefits: if one container is compromised, others remain unaffected.
46+
47+
* Kubernetes
48+
49+
While Docker allows developers to build, ship and run applications in containers easily, Kubernetes makes running containers in a cluster as easy as ever. You can automatically deploy, scale, monitor and manage your cloud-native application with Kubernetes. It is a powerful orchestrator that allows you to manage communication between containerized components, known as pods, and coordinate them as a cluster.
50+
51+
Kubernetes has now become the heart of a microservices application. The ecosystem around it is expanding by the minute with the Cloud Native Computing Foundation ensuring its future success. There are now many additional observability, networking, and distributed data storage services that complement Kubernetes in building a loosely coupled distributed system that is resilient, manageable and observable.
52+
53+
Open-source orchestrator.
54+
Easy container management.
55+
Horizontal autoscaling — If you get high loads, you can replicate your pods and balance the load across them to avoid downtime.
56+
Self-healing, Automated Rollouts and Rollbacks — If something goes wrong, you can automatically replace, restart, reschedule your containers or rollout/rollback to the desired state of the containerized application.
57+
Service Discovery — Kubernetes uses unique IP addresses and can put a set of containers behind a single DNS name. This allows you easily track and identify your across the cluster.
58+
59+
60+
* RabbitMQ
61+
62+
RabbitMQ is a great messaging and queuing tool that you can use for applications that runs on most operating systems. Managing queues, exchanges and routing with it is a breeze. Even if you have an elaborate configuration to be built, it’s relatively easy to do so, since the tool is really well-documented. You can stream a lot of different high-performance processes and avoid system crashes through a friendly user interface. It's a durable and robust messaging broker that is worth your attention. As RabbitMQ developers like to say, it’s "messaging that just works."
63+
64+
Guaranteed message delivery.
65+
Push work into background processes, freeing your web server up to handle more users.
66+
Scale the most frequently used parts of your system, without having to scale everything.
67+
Handling everything with ease even if it seems to be a huge crash.
68+
69+
1670
********
1771
### DevOps:
1872

@@ -59,6 +113,217 @@
59113
* How would you deploy software to 5000 systems?
60114
* What is caching ? Where should a large scale application cache, and what data should be cached ?
61115

116+
117+
118+
DevOps Interview Questions
119+
120+
The following section features the top 20 DevOps interview questions that will prepare you for your next DevOps interview:
121+
122+
Q: Can you tell us the fundamental differences between DevOps & Agile?
123+
A: 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:
124+
125+
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.
126+
127+
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).
128+
129+
Priority – Agile prioritizes timeliness whereas, DevOps gives equal priority to timeliness and quality.
130+
131+
Release Cycles – DevOps offers smaller release cycles with immediate feedback while Agile offers only smaller release cycles without immediate feedback.
132+
133+
Feedback Source – Agile relies on feedback from customers while feedback from self (monitoring tools) is involved in DevOps.
134+
135+
Scope of Work – For Agile, the scope of work is agility only but for DevOps, it is agility and the need for automation.
136+
137+
Q: Why do we need DevOps?
138+
A: 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.
139+
140+
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:
141+
142+
Increase deployment frequency
143+
Lessen lead time between fixes
144+
Lower failure rate of new releases
145+
In case of new release crashing, have a faster mean time to recovery
146+
147+
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.
148+
149+
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.
150+
151+
Q: What are the important business and technical benefits of using DevOps?
152+
A: DevOps brings a lot of business and technical benefits to the table. Some of the most important ones are listed down as follows:
153+
154+
Business benefits:
155+
156+
Enhanced operating environment stability
157+
Faster delivery of features
158+
More time for adding value to the product
159+
160+
Technical benefits:
161+
162+
Continuous software delivery
163+
Faster problem resolution
164+
Lesser complex problems
165+
166+
Q: Can you name some of the most-used DevOps tools?
167+
A: Following is a list of some of the most widely used DevOps tools:
168+
169+
Ansible – A configuration management and application deployment tool
170+
Chef – A configuration management and application deployment tool
171+
Docker – A containerization tool
172+
Git – A version control system (VCS) tool
173+
Jenkins – A continuous integration (CI) tool
174+
Jira – An agile team collaboration tool
175+
Nagios – A continuous monitoring tool
176+
Puppet – A configuration management and application deployment tool
177+
Selenium – A continuous testing (CT) tool
178+
179+
Q: What is Selenium used for?
180+
A: Selenium is used for continuous testing in DevOps. The tool specializes in functional and regression forms of testing.
181+
182+
Q: What do you understand by Puppet in DevOps?
183+
A: It is a configuration management tool that is used for automating administration tasks. Puppet makes use of the Master-Slave architecture in which the two entities communicate via an encrypted channel.
184+
185+
System admins need to perform a lot of repetitive tasks, notably installing and configuring servers. Writing scripts for automating such tasks is an option but it becomes hectic when the infrastructure is large. Configuration management is a great workaround for this.
186+
187+
Puppet helps in configuring, deploying, and managing servers. Not only does it make such redundant tasks easier but also cuts a significant portion of the total work time. The mature configuration management tool:
188+
189+
Continuously checks whether the needed configuration for a host is in place or not. If altered, the configuration is automatically reverted back
190+
Defines distinct configurations for every host
191+
Does dynamic scaling (up and down) of machines
192+
Provides control over all the configured machines so that a centralized change can automatically get propagated to all of them
193+
194+
Q: What do you understand by anti-patterns of DevOps?
195+
A: 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:
196+
197+
An organization needs to have a separate DevOps group
198+
Agile equals DevOps
199+
DevOps is a process
200+
DevOps is development-driven release management
201+
DevOps is not possible because the organization is unique
202+
DevOps is not possible because the people available are unsuitable
203+
DevOps means Developers Managing Production
204+
DevOps will solve all problems
205+
Failing to include all aspects of the organization in an ongoing DevOps transition
206+
Not defining KPIs at the start of a DevOps transition
207+
Reduce the silo-based isolation of development and operations with a new DevOps team that silos itself from other parts of the organization
208+
209+
Q: DevOps has something called CI. What is it and what is its purpose?
210+
A: 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.
211+
212+
Continuous Integration of development and testing enhances the quality of the software as well as reducing the total time required for delivery.
213+
214+
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.
215+
216+
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.
217+
218+
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.
219+
220+
Q: More often than not we hear shift left in DevOps. What is it?
221+
A: 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.
222+
223+
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 incorporate them into earlier stages of a DevOps methodology.
224+
225+
There are several ways of accomplishing a shit left in DevOps, most notably:
226+
227+
Create production-ready artifacts at the end of every Agile sprint
228+
Incorporating static code analysis routines in every build
229+
230+
The level of doing the DevOps the right way is directly dependent on the degree of shifting left as much as possible.
231+
232+
Q: What does CAMS in DevOps stand for?
233+
A: The acronym CAMS is usually used for describing the core creeds of DevOps methodology. It stands for:
234+
235+
Culture
236+
Automation
237+
Measurement
238+
Sharing
239+
240+
Q: What are the several KPIs used to gauge DevOps success?
241+
A: 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:
242+
243+
Application performance
244+
Application usage and traffic
245+
The automated test pass percentage
246+
Availability
247+
Change volume
248+
Customer tickets
249+
Defect escape rate
250+
Deployment frequency
251+
Deployment time
252+
Error rates
253+
Failed deployments
254+
Lead time
255+
Meantime to detection (MTTD)
256+
Mean time to recovery (MTTR)
257+
258+
Q: In your opinion, what are the major benefits of implementing DevOps automation?
259+
A: Following are the major benefits of implementing DevOps automation:
260+
261+
Removal of the possibility of human error from the CD equation (Core benefit)
262+
263+
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
264+
265+
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
266+
267+
Q: What do you understand by containers?
268+
A: 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.
269+
270+
Q: Microservices are a core part of DevOps. Can you name any two popular Java development frameworks for creating microservices?
271+
A: 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.
272+
273+
Q: What do you understand by a Version Control System (VCS)? Define its uses.
274+
A: 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:
275+
276+
Check what was the last modification that caused a problem
277+
278+
Compare the changes made over time
279+
280+
Identifying who introduced a new issue and at what time
281+
282+
Revert a file or files to some earlier state
283+
284+
Revert the complete project to a previous state
285+
286+
Q: Git is a popular DevOps tool. Tell us how you will revert a commit that has already been pushed and made public.
287+
A: There are two ways of doing so:
288+
289+
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:
290+
git revert
291+
292+
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:
293+
git commit -m “commit message”
294+
295+
Q: What are post mortem meetings?
296+
A: 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.
297+
298+
Q: Draw a comparison between Asset Management and Configuration Management.
299+
A: The process of monitoring as well as maintaining things of value to an entity or group is called an Asset Management.
300+
301+
Configuration Management refers to the process of controlling, identifying, planning for, and verifying the configuration items within service in support of Change Management.
302+
303+
Q: Can you state and explain various key elements of continuous testing?
304+
A: Various key elements of continuous testing are:
305+
306+
Advanced analysis – Used for forecasting and predicting unknown future events
307+
Policy analysis – Meant for improving the testing process
308+
Requirement traceability – Refers to the ability to describe as well as follow the life of a requirement, from its origin to deployment
309+
Risk assessment – The method or process of identifying hazards and risk factors that can cause potential damage
310+
Service virtualization – Allows using virtual services instead of production services. Emulates software components for simple testing
311+
Test optimization – Improve the overall testing process
312+
313+
Q: Please explain the core operations of DevOps in terms of development and infrastructure.
314+
A: Core operations of DevOps in terms of development and infrastructure are:
315+
316+
Application development – Developing a product that is able to meet all customer requirements and offers a remarkable level of quality
317+
Code coverage – Measurement of the total number of blocks or lines or arcs of the code executed while the automated tests are running
318+
Code developing – Prepare the code base required for the product development
319+
Configuration – Allowing the product to be used in an optimum way
320+
Deployment – Installing the software to be used by the end-user
321+
Orchestration – Arrangement of several automated tasks
322+
Packaging – Activities involved when the release is ready for deployment
323+
Provisioning – Ensuring that the infrastructure changes arrive just-in-time with the code that requires it
324+
Unit testing – Meant for testing individual units or components
325+
326+
62327
************
63328
### Programming:
64329

0 commit comments

Comments
 (0)