From 6362c95813cdbb3bd57150a61df0cce73acce85b Mon Sep 17 00:00:00 2001 From: abregman Date: Tue, 18 May 2021 10:47:27 +0300 Subject: [PATCH] Update --- README.md | 173 +++++++++++++++++++++++++++++++++++++++++++-------- common-qa.md | 45 ++++++++++---- 2 files changed, 179 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index ddca94a..269ca07 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ :information_source:  This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE :) -:bar_chart:  There are currently **1553** questions +:bar_chart:  There are currently **1575** questions :books:  To learn more about DevOps and SRE, check the resources in [devops-resources](https://github.com/bregman-arie/devops-resources) repository @@ -559,16 +559,15 @@ This might be considered to be an opinionated answer:
Explain the following: - * Job - * Build - * Plugin - * Slave/Node/Worker - * Executor
- - * Job is an automation definition = what and where to execute once the user clicks on "build" - * Build is a running instance of a job. You can have one or more builds at any given point of time (unless limited by confiugration) - * A worker is the machine/instance on which the build is running. When a build starts, it "acquires" a worker out of a pool to run on it. - * An executor is variable of the worker, defining how many builds can run on that worker in parallel. An executor value of 3 means, that 3 builds can run at any point on that executor (not necessarily of the same job. Any builds) +- Job +- Build +- Plugin +- Node or Worker +- Executor
+- Job is an automation definition = what and where to execute once the user clicks on "build" +- Build is a running instance of a job. You can have one or more builds at any given point of time (unless limited by confiugration) +- A worker is the machine/instance on which the build is running. When a build starts, it "acquires" a worker out of a pool to run on it. +- An executor is variable of the worker, defining how many builds can run on that worker in parallel. An executor value of 3 means, that 3 builds can run at any point on that executor (not necessarily of the same job. Any builds)
@@ -741,13 +740,31 @@ It's important to note that: * Availability zone * Region * Edge location
-AWS regions are data centers hosted across different geographical locations worldwide, each region is completely independent of one another.
+AWS regions are data centers hosted across different geographical locations worldwide.
Within each region, there are multiple isolated locations known as Availability Zones. Multiple availability zones ensure high availability in case one of them goes down.
Edge locations are basically content delivery network which caches data and insures lower latency and faster delivery to the users in any location. They are located in major cities in the world.
+
+True or False? Each AWS region is designed to be completely isolated from the other AWS regions
+ +True. +
+ +
+Do you agree with the statement "AWS region should be chosen based on proximity alone"?
+ +Note: opinionated answer. + +No. There are a couple of factors to consider when choosing a region (order doesn't mean anything): + +1. Cost - regions vary in cost and AWS Price List API can assist in calculating the difference in cost between the different regions. +2. Speed +3. Features +
+ #### AWS IAM
@@ -909,11 +926,11 @@ False. Charges are being made when the code is executed.
Which of the following set of languages Lambda supports? - * R, Swift, Rust, Kotlin - * Python, Ruby, Go - * Python, Ruby, PHP
+- R, Swift, Rust, Kotlin +- Python, Ruby, Go +- Python, Ruby, PHP
- * Python, Ruby, Go +- Python, Ruby, Go
#### AWS Containers @@ -3904,10 +3921,6 @@ MemFree - The amount of unused physical RAM in your system MemAvailable - The amount of available memory for new workloads (without pushing system to use swap) based on MemFree, Active(file), Inactive(file), and SReclaimable.
-
-What is virtual memory?
-
-
What is the difference between paging and swapping?
@@ -3935,7 +3948,7 @@ MemAvailable - The amount of available memory for new workloads (without pushing * Software/Packages Management
-#### Linux Advanced - Misc +#### Linux Misc
Wildcards are implemented on user or kernel space?
@@ -3951,6 +3964,18 @@ MemAvailable - The amount of available memory for new workloads (without pushing Why there are different sections in man? What is the difference between the sections?
+
+What is User-mode Linux?
+
+ +#### Linux Nerds + +
+Under which license Linux is distributed?
+ +GPL v2 +
+ #### Linux Master Application A completely free application for testing your knowledge on Linux @@ -3967,6 +3992,18 @@ There are many ways to answer that. For those who look for simplicity, the book "responsible for making it easy to run programs (even allowing you to seemingly run many at the same time), allowing programs to share memory, enabling programs to interact with devices, and other fun stuff like that"
+
+What is "virtual memory" and what purpose it serves?
+
+ +
+What is demand paging?
+
+ +
+What is copy-on-write or shadowing?
+
+
What is a kernel, and what does it do?
@@ -6832,10 +6869,30 @@ print("{0:.3f}".format(sum(li)/len(li))) #### Python Lists +
+How to add the number 2 to the list x = [1, 2, 3]
+ +`x.append(2)` +
+ +
+How to check how many items a list contains?
+ +`len(sone_list)` +
+ +
+How to get the last element of a list?
+ +`some_list[-1]` +
+
How to add the items of [1, 2, 3] to the list [4, 5, 6]?
x = [4, 5, 6] x.extend([1, 2, 3]) + +Don't use `append` unless you would like the list as one item.
@@ -6845,12 +6902,11 @@ x.extend([1, 2, 3])
-How do you get the maximum and minimum values from a list? How to get the last item from a list?
+How do you get the maximum and minimum values from a list?
``` Maximum: max(some_list) Minimum: min(some_list) -Last item: some_list[-1] ```
@@ -6995,6 +7051,42 @@ If we call it 3 times, what would be the result each call? ```
+ +
+How to iterate over a list?
+ +``` +for item in some_list: + print(item) +``` +
+ +
+How to iterate over a list with indexes?
+ +``` +for i, item in enumerate(some_list): + print(i) +``` +
+ +
+How to start list iteration from 2nd index?
+ +Using range like this + +``` +for i in range(1, len(some_list)): + some_list[i] +``` + +Another way is using slicing + +``` +for i in some_list[1:]: +``` +
+
How to iterate over a list in reverse order?
@@ -7360,6 +7452,14 @@ def reverse_string(string): mario
+#### Python Iterators + +
+What is an iterator?
+
+ +#### Python Misc +
Explain data serialization and how do you perform it with Python
@@ -7369,11 +7469,19 @@ mario
-What is an iterator?
+What is a generator? Why using generators?
-What is a generator? Why using generators?
+What would be the output of the following block? + +``` +for i in range(3, 3): + print(i) +``` +
+ +No output :)
@@ -10936,10 +11044,19 @@ The server didn't receive a response from another server it communicates with in When you publish a project, you usually publish it with a license. What types of licenses are you familiar with and which one do you prefer to use?
-#### Load Balancing +#### Load Balancers
What is a load balancer?
+ +A load balancer accepts (or denies) incoming network traffic from a client, and based on some criteria (application related, network, etc.) it distributes those communications out to servers (at least one). +
+ +
+What benefits load balancers provide?
+ +* Scalability - using a load balancer, you can possibly add more servers in the backend to handle more requests/traffic from the clients, as opposed to using one server. +* Redundancy - if one server in the backend dies, the load balancer will keep forwarding the traffic/requests to the second server so users won't even notice one of the servers in the backend is down.
@@ -10967,6 +11084,10 @@ The server didn't receive a response from another server it communicates with in What is an Application Load Balancer?
+
+In which scenarios would you use ALB?
+
+
At what layers a load balancer can operate?
diff --git a/common-qa.md b/common-qa.md index ce4256b..f01e5a6 100644 --- a/common-qa.md +++ b/common-qa.md @@ -1,5 +1,7 @@ ## Q&A +The questions I've been asked at least once. + ### What is the purpose of repository? Learning @@ -7,12 +9,12 @@ Learning ### My goal is to prepare for a DevOps interview. How to do that? I've added a couple of suggestions [here](prepare_for_interview.md)
-Feel free to contribute any ideas and insights you have. +Overall, this repository should help you learn some concepts but don't assume at any point that your interview will consist of questions included in this repository. ### How do I become a better DevOps Engineer? That's a great question.
-I don't have a definitive answer for this question, but what I feel works for me is to: +I don't have a definitive answer for this question, but try the following: * Practice - doing DevOps tasks/work should be the primary way to become a DevOps engineer (obvisouly) * Read - Read blogs, books, ... anything that can enrich you about DevOps @@ -23,22 +25,29 @@ I don't have a definitive answer for this question, but what I feel works for me Because we need more contributors ;) +### Where can I find answers to some of the questions in this repository? + +1. Search for them using search engines, documentation pages, ... this is part of being a DevOps engineer +2. Use the communities - many people will be happy to help and answer your questions +3. Ask us. If you want, you can contact me or even open an issue that is only a question, that's totally fine :) + ### Where the questions and answers are coming from? -Well, from everywhere - past experience, colleagues, contributors, ... But please note we do not allow copying interview questions from interview questions sites to here. There are people who worked hard on adding those to their sites and we respect that. +Well, from everywhere - past experience, colleagues, contributors, ... but please note we do not allow copying interview questions from interview questions sites to here. There are people who worked hard on adding those to their sites and we respect that. ### What are the top DevOps skills required for being a DevOps Engineer? -It's a hard question and the reason is that if you'll ask 20 different people, you'll probably get at least 10 different answers but here is what we believe is common today: +It's a hard question and the reason is that if you'll ask 20 different people, you'll probably get at least 10 different answers but here is what I believe is common today: * OS - DevOps require you good understanding of operating system concepts. The level required is mainly depends on the company although in my opinion it should be the same level. You should understand how the operating system works, how to troubleshoot and debug issues, etc. -* Coding is part of DevOps. The level again depends on the company. Some will require you to know basic level of scripting while others deep understanding of common algorithms, data structure, design patterns etc. -* Cloud and Containers - while not 100% must in all companies/positions, this skill is on the rise every year and many (if not most) of the positions/companies require this skill. This specifically means: AWS/Azure/GCP, Docker, Podman, Kubernetes, ... +* Programming is part of DevOps. The level again depends on the company. Some will require you to know basic level of scripting while others deep understanding of common algorithms, data structure, design patterns etc. +* Cloud and Containers - while not 100% must in all companies/positions, this skill is on the rise every year and many (if not most) of the positions/companies require this skill. This specifically means: AWS/Azure/GCP, Docker/Podman, Kubernetes, ... +* CI/CD - Be able to to answer questions like "Why do we need CI/CD?" and "What ways and models are there to perform CI/CD?". Eventually, practice assembling such processes and workflow, using whatever tools you feel comfortable with. ### I feel like there are some questions that shouldn't be included in this project Is that a question? :) -If you don't like some of the questions or think that some questions should be removed you can open an issue or submit a PR and we can discuss it there. We don't have rules against deleting questions +If you don't like some of the questions or think that some questions should be removed you can open an issue or submit a PR and we can discuss it there. We don't have rules against deleting questions (for now :P) ### Can I copy the questions from here to my site? @@ -47,7 +56,7 @@ You can but: * Not without attribution. Many people worked hard on adding these questions and they deserve a proper credit for their work * Not if you plan to make money out of it. Directly or indirectly (e.g. ADS) as this is a free content and we would like it to stay this way :) -Same goes for copying questions from sites to this repository. We saw it happened already with a couple of pull requests and we rejected them. We will not allow to copy content from people/sites to this repository. +Same goes for copying questions from different sources to this repository. We saw it happened already with a couple of pull requests and we rejected them. We will not merge pull requests with copied questions and answers from other sources. ### Can I add questions and/or answers to this project? @@ -55,7 +64,8 @@ I'll simply imagine you didn't ask that on an open source project... :) ### Why can't I add installation questions? -The purpose of the questions in this repository is to make you learn about a certain technology or purpose. I don't believe installation questions like "How to install Jenkins?" for example, teaches you anything value on Jenkins itself. +In most cases, I prefer questions added to this repository will have certain educational value for the user. Either regarding a certain concept or even a very general question, but one that will make you research on a certain topic and will make you more familiar with it. +I see little to none value in what is known as "Installation Questions". Let's say I ask you "how to install Jenkins?". Should I conclude from your answer that you are familiar with Jenkins? Is there a value in knowing how to install Jenkins? In my opinion, no. ### Where can I practice coding? @@ -65,9 +75,18 @@ Personally, I really like the following sites * [LeetCode](https://leetcode.com) * [Exercism](https://exercism.io) -### How to learn more about Linux? +### How to learn more DevOps? -I gathered a list of resource [here](https://dev.to/abregman/collection-of-linux-resources-3nhk) +I listed some roadmaps in [devops-resources](https://github.com/bregman-arie/devops-resources) -For beginners, I recommend [Linux Journey](https://linuxjourney.com) -If you want to deep dive into operating systems internals, I really recommend [Operating Systems: Three Easy Pieces](http://pages.cs.wisc.edu/~remzi/OSTEP) +### Why some questions repeat themselves? + +If you see two identical questions, that's a bug. +If you see two similar questions, that's a feature :D (= it's intentional) + +For example: + +1. What is horizontal scaling? +2. The act of adding additional instances to the pool to handle scaling is called ________ scaling + +You are right, both ask about horizontal scaling but first of all but, it's done from a different angel every time and in addition, I do believe repetition helps you to learn something better in a way where you are not fixed on one way it's asked.