diff --git a/README.md b/README.md
index 2b1e67c..1b9bc9d 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
:information_source: This repository contains interview questions on various DevOps related topics
-:bar_chart: There are currently **216** questions
+:bar_chart: There are currently **230** questions
:warning: You don't need to know how to answer all the questions in this repo. DevOps is not about knowing all :)
@@ -166,6 +166,14 @@ which follows the immutable infrastructure paradigm.
Describe the workflow of setting up some type of web server (Apache, IIS, Tomact, ...)
+
+Explain monitoring. What is it? Why it's important?
+
+
+
+What monitoring methods are you familiar with?
+
+
#### :star: Advanced
@@ -223,15 +231,30 @@ Note: cross-dependency is when you have two or more changes to separate projects
#### :baby: Beginner
-Why are you using Jenkins? What are the advantages of Jenkins over its competitors?
+What is Jenkins? What have you used it for?
-What is a plugin?
+What are the advantages of Jenkins over its competitors? Can you compare it to one of the following systems?:
+
+ * Travis
+ * Bamboo
+ * Teamcity
+ * CircleCI
-What plugins are you using in Jenkins? Which do you consider to be the most useful?
+Explain the following:
+
+ * Job
+ * Build
+ * Plugin
+ * Slave
+ * Executor
+
+
+
+What plugins have you used in Jenkins?
@@ -239,11 +262,15 @@ Note: cross-dependency is when you have two or more changes to separate projects
-What type of jobs there are? what is the advantage of each type?
+What type of jobs are there? Which types have you used and why?
-What ways are you familiar with to notify users on build results?
+How did you report build results to users? What ways are you familiar with?
+
+
+
+You need to run unit tests every time a change submitted to a given project. Describe in details how your pipeline would look like and what will be executed in each stage
@@ -258,7 +285,7 @@ Note: cross-dependency is when you have two or more changes to separate projects
-There are four teams in your organization. How to prioritize the builds of each team? So the jobs of team x will always run before team y
+There are four teams in your organization. How to prioritize the builds of each team? So the jobs of team x will always run before team y for example
@@ -269,12 +296,19 @@ Note: cross-dependency is when you have two or more changes to separate projects
If you are managing a dozen of jobs, you can probably use the Jenkins UI. How do you manage the creation and deletion of hundreds of jobs every week/month?
+
+What are some of Jenkins limitations?
+
+ * Testing cross-dependencies (changes from multiple projects together)
+ * Starting builds from any stage (although cloudbees implemented something called checkpoints)
+
+
How would you implement an option of a starting a build from a certain stage and not from the beginning?
-What are some of Jenkins limitations?
+Have you written Jenkins scripts? If yes, what for and how they work?
## AWS
@@ -480,6 +514,7 @@ CSMA/CD algorithm:
* rmdir (can you achieve the same result by using rm
?)
* grep
* wc
+ * touch
* df
@@ -498,6 +533,8 @@ With cron, tasks are scheduled using the following format:
The tasks are stored in a cron file.
+##### Permissions
+
How to change the permissions of a file?
@@ -616,6 +653,10 @@ hard link can be created only within the same file system.
What RAID is used for? Can you explain the differences between RAID 0, 1, 5 and 10?
+
+What is lazy umount?
+
+
Fix the following commands:
@@ -728,21 +769,53 @@ related to the file like its size, owner, permissions, etc.
-DNS: What is a "A record"?
+What is NTP? What is it used for?
-DNS: What is a PTR?
+What is SELiunx?
+
+
+
+What is nftables?
+
+
+
+What firewalld daemon is responsible for?
+
+
+##### DNS
+
+
+What the file /etc/resolv.conf
is used for? What does it include?
+
+
+
+What is a "A record"?
+
+
+
+What is a PTR record?
While an A record points a domain name to an IP address, a PTR record does the opposite and resolves the IP address to a domain name.
-DNS: What is a MX record?
+What is a MX record?
-DNS: is it using TCP or UDP?
+Is DNS using TCP or UDP?
+
+
+##### Packaging
+
+
+Do you have experience with packaging? Can you explain how it works?
+
+
+
+RPM: explain the spec format(what it should and can include)
@@ -1101,6 +1174,9 @@ Swarm management which means you can create new swarms in Docker Cloud.
## Kubernetes
+
+#### :baby: Beginner
+
What is Kubernetes?
@@ -1216,6 +1292,10 @@ set([food for bro in x for food in bro['food']])
Shortest way is: my_string[::-1]
but it doesn't mean it's the most efficient one.
+
+Write a function to determine if a given string is a palindrome
+
+
Explain what is GIL
@@ -1232,7 +1312,7 @@ Shortest way is: my_string[::-1]
but it doesn't mean it's the most
-Are you familiar with Dataclasses? Can you explain what are they used for?
+Are you familiar with Dataclasses? Can you explain what are they used for?
diff --git a/scenarios/jenkins/scripts/jobs_with_string.groovy b/scenarios/jenkins/scripts/jobs_with_string.groovy
new file mode 100644
index 0000000..f0bf21f
--- /dev/null
+++ b/scenarios/jenkins/scripts/jobs_with_string.groovy
@@ -0,0 +1,6 @@
+def jobs = Jenkins.instance.items.findAll { job -> job.name =~ /"REMOVE_ME"/ }
+
+jobs.each { job ->
+ println job.name
+ //job.delete()
+}
diff --git a/scenarios/jenkins/scripts/old_builds.groovy b/scenarios/jenkins/scripts/old_builds.groovy
new file mode 100644
index 0000000..f45130a
--- /dev/null
+++ b/scenarios/jenkins/scripts/old_builds.groovy
@@ -0,0 +1,16 @@
+def removeOldBuilds(buildDirectory, days = 14) {
+
+ def wp = new File("${buildDirectory}")
+ def currentTime = new Date()
+ def backTime = currentTime - days
+
+ wp.list().each { fileName ->
+ folder = new File("${buildDirectory}/${fileName}")
+ if (folder.isDirectory()) {
+ def timeStamp = new Date(folder.lastModified())
+ if (timeStamp.before(backTime)) {
+ folder.delete()
+ }
+ }
+ }
+}
diff --git a/scenarios/jenkins_scripts.md b/scenarios/jenkins_scripts.md
index afaf96d..d8a20ef 100644
--- a/scenarios/jenkins_scripts.md
+++ b/scenarios/jenkins_scripts.md
@@ -3,3 +3,9 @@
Write the following scripts:
* Remove all the jobs which include the string "REMOVE_ME" in their name
+* Remove builds older than 14 days
+
+### Answer
+
+* [Remove jobs which include specific string](jenkins/scripts/jobs_with_string.groovy)
+* [Remove builds older than 14 days](jenkins/scripts/old_builds.groovy)