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.
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.
It's very simple in Jenkins just we have to do the following,
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
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
1. $sudo apt update
2. $sudo apt install jenkins
3. $sudo service jenkins start
4. Launch Jenkins using this URL: http://localhost:8080
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.
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.
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.
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.
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.
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.
$ 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).
2022 Wiculty Learning Solutions Pvt.Ltd, All rights Reserved. Gamut Gurus Technologies