Menu ×

Interview Preparation Guide

Most Asked DevOps Interview Questions

Here we have compiled the most probable DevOps interview questions asked in the industry. You will learn about software version control, Git repository, reverting a commit in Git, Vagrant, continuous testing elements, and the importance of continuous integration, testing, and deployment. These questions are curated after discussing with many interviewers and DevOps Training experts.

Online Videos

Interview Prepartion Part1

Interview Prepartion1

Interview Prepartion Part2

Interview Prepartion2

DevOps Tools

Git
Maven
Jenkins
Docker
Ansible
Interview Questions
Showing 111 - 120 of 251 results
111. I want to modify the JDK version from 1.8 to 1.10 in 1000 jobs? How do you do it?

Jenkins stores all configuration data in .jenkins/jobs/job_name/config.xml file. We have to find the 1.7 version in all config.xml to replace it with 1.8 using the Linux Find and Sed command or with a small script of the same command. The command should be executed in jobs directory, like
user@machine:~/.jenkins/jobs$ find . -name "config.xml" | xargs sed -i s/jdk1.8/jdk1.10/g
Then to load changes you have to click on “Reload config from disk” option in manage jenkins.

112. How did you set up, build and deploy for your Jenkins Job?

It's very simple in Jenkins just we have to do the following,

  • Configure GIT URL.
  • Integrate Maven and specify the build command "mvn install"
  • Go to the execute bash section and write a script to deploy. Ensure the following while writing the script,
    • Before copying the war file checks for disk space of the target server.
    • Copy war files to only those servers which are specified to do so.

113. How to install Jenkins?

Method:1
1. Download & Install JDK
2. Download Tomcat
3. Download jenkins.war and copy to $TOMCAT_HOME/webapps [deploying jenkins to tomcat]
4. To start Tomcat server use $ sh TOMCAT_HOME/bin/startup.sh
5. Launch Jenkins using this URL http://localhost:8080/jenkins
6. command to shutdown tomcat: $TOMCAT_HOME/bin/shutdown.sh
Method:2
1. Download & Install JDK
2. Download Jenkins.war
3. Jenkins.war comes with a light weight server called "jetty", the command runs jenkins jetty server is $ java –jar jenkins.war
4. You can launch Jenkins by using below URL: http://localhost:8080
Method:3
1. $sudo apt update
2. $sudo apt install jenkins
3. $sudo service jenkins start
4. Launch Jenkins using this URL: http://localhost:8080

114. How will you define the post in Jenkins?

The Post section has one or more additional steps to execute after the completion of the pipeline. The execution of the Post section depends upon the specified condition. The post-conditions are as follows, Changed, Success, always, failure, regression, unstable and aborted.

115. What is Label?

Label is a virtual name for one or more slave nodes using which we can tie a particular Jenkins job to always run on a particular machine.

116. What kind of Problems you faced with your Jenkins system ?

Very rarely I came across some issues in the Jenkins are as follows:
1. In case of running more jobs, UI becomes slow as it polls remote repo regularly.
2. Connection to slave timeout.
3. Git checkout timeouts.
4. Confusion in selecting the right plugin as it has 3-5 plugins with similar names and less descriptive.

117. Suddenly my Jenkins instance becomes slow, what steps I need to follow to improve the Performance?

1. Clean up the old jobs, for doing this Shelve plugin is recommended.
2. Make sure your jenkins have a master/slave distributed concept.
3. Make sure your master doesn’t run any job, just keep it for servicing jenkins traffic and schedule all your builds in slave nodes.
4. Check your computing power (CPU utilization) and Memory usage.

118. How do you upgrade Jenkins?

Before upgrading jenkins on the Production server you have to cross check the things by doing the same process on the Test environment. So do as follows,
1. Take a test machine.
2. Install the same old version of jenkins into the test machine.
3. Copy .jenkins from old jenkins to test machine and turn on the Jenkins server in Test Machine.
4. Deploy the new war file to the test machine.
5. Test the newly deployed features and old features randomly in the test machine and make sure that everything is working fine as in old Jenkins.
Now, Finally you can do the same thing on your production server.

119. What is Continuous Testing?

The process of automating Code Testing as a part of SDLC is Continuous Testing. Jenkins will do automated testing as a part of Continuous Integration. And also Jenkins can be integrated with automation testing tools, so that it can automate the process of continuous testing.

120. How do you set-up the crontab?

$ crontab –e
Crontab is a simple text file that has to be written in a specific format. Like each field should be separated by spaces or tabs. And should have a single value or a set of single values. A single cron job should take only one line, but the line can be a long (more than 80 characters).