DevOps Interview Questions

What is DevOps? Introduction to DevOps 3

Q41) What is the relation between Hudson and Jenkins?

Hudson was the earlier name of current Jenkins. After some issue faced, the project name was changed from Hudson to Jenkins.

Q42) What are the advantages of Jenkins?

Advantage of using Jenkins

Bug tracking is easy at early stage in development environment.

Provides a very large numbers of plugin support.

Iterative improvement to the code, code is basically divided into small sprints.

Build failures are cached at integration stage.

For each code commit changes an automatic build report notification get generated.

To notify developers about build report success or failure, it can be integrated with LDAP mail

READ ALSO
AWS Interview Questions 1

server.

Achieves continuous integration agile development and test-driven development environment.

With simple steps, maven release project can also be automated.

Q43) Which SCM tools does Jenkins supports?

Source code management tools supported by Jenkins are below:

AccuRev

CVS

Subversion

Git

Mercurial

Perforce

Clearcase

RTC

Q44) What is Ansible?

Ansible is a software configuration management tool to deploy an application using ssh without any downtime. It is also used for management and configuration of software applications. Ansible is developed in Python language.

Q45) How can your setup Jenkins jobs?

Steps to set up Jenkins job as follows:

Select new item from the menu.

READ ALSO
Ansible Interview Questions 3

After that enter a name for the job (it can be anything) and select free-style job.

Then click OK to create new job in Jenkins dashboard.

 

Q46) What is your daily activities in your current role?

Working on JIRA Tickets

Builds and Deployments

Resolving issues when builds and deployments fails by coordinating and collaborating with the

dev team

Infrastructure maintenance

Monitoring health of applications

Q47) What are the challenges you faced in recent times?

I need to implement trending technologies like Docker to automate the configuration management activities in my project by showing POC.

Q48) What are the build and deployment failures you got and how you resolved those?

READ ALSO
Jenkins Interview Questions

I use to get most of the time out of memory issue. So I fixed this issue by restarting the server which is not best practice. I did the permanent fix by increase the Perm Gen Space and Heap Space.

Q49) I want a file that consists of last 10 lines of the some other file?

Tail -10 filename >filename

Q50) How to check the exit status of the commands?

echo $?

Q51) I want to get the information from file which consists of the word

 

Q53) Write a shell script to print only prime numbers?

prime.sh echo “1” i=3 j=300 flag=0 tem=2 echo “1”while [ $i

READ ALSO
What is DevOps? Introduction to DevOps 2

-ne $j ] do temp=echo $i while [ $temp -ne $tem ] do

temp=expr $temp - 1 n=expr $i % $temp if [ $n -eq 0 -a

$flag -eq 0 ] then flag=1 fi done if [ $flag -eq 0 ] then echo

$i else flag=0 fi i=expr $i + 1 done

Q54) How to pass the parameters to the script and how can I get those parameters?

Scriptname.sh parameter1 parameter2

I will use $* to get the parameters.

Q55) What is the default file permissions for the file and how can I modify it?

If I want to change the default file permissions I need to use umask command ex: umask 666

Q56) How you will do the releases?

READ ALSO
Windows Azure Interview Questions

There are some steps to follow.

Create a check list

Create a release branch

Bump the version

Merge release branch to master & tag it.

Use a Pull request to merge the release merge

Deploy master to Prod Environment

Merge back into develop & delete release branch

Change log generation

Communicating with stack holders

Grooming the issue tracker

Q57) How you automate the whole build and release process?

Check out a set of source code files.

Compile the code and report on progress along the way.

Run automated unit tests against successful compiles.

Create an installer.

Publish the installer to a download site, and notify teams that the installer is available.

READ ALSO
AWS Snowball

Run the installer to create an installed executable.

Run automated tests against the executable.

Report the results of the tests.

Launch a subordinate project to update standard libraries.

Promote executables and other files to QA for further testing.

Deploy finished releases to production environments, such as Web servers or CD manufacturing.

The above process will be done by Jenkins by creating the jobs.

Q58) I have 50 jobs in the Jenkins dash board , I want to build at a time all the jobs

In Jenkins there is a plugin called build after other projects build. We can provide job names over there and If one parent job run then it will automatically run the all other jobs. Or we can use Pipe

READ ALSO
Ansible Interview Questions and Answers 2

line jobs.

Q59) How can I integrate all the tools with Jenkins?

I have to navigate to the manage Jenkins and then global tool configurations there you have to provide all the details such as Git URL , Java version, Maven version , Path etc.

Q60) How to install Jenkins via Docker?

The steps are:

Open up a terminal window.

Download the jenkinsci/blueocean image & run it as a container in Docker using the following docker run command:( https://docs.docker.com/engine/reference/commandline/run/)

\ -v /var/run/docker.sock:/var/run/docker.sock \ jenkinsci/blueocean

Proceed to the Post-installation setup wizard (https://jenkins.io/doc/book/installing/#setup-wizard)

Accessing the Jenkins/Blue Ocean Docker container docker exec -it jenkins-blueocean bash

Accessing the Jenkins console log through Docker logsdocker logs <docker-container-name>Accessing the Jenkins home directorydocker exec -it <docker-container-name> bash

READ ALSO
AWS Interview Questions 6

Q61) Did you ever participated in Prod Deployments? If yes what is the procedure?

Yes I have participated, we need to follow the following steps in my point of view

Preparation & Planning : What kind of system/technology was supposed to run on what kind of machine

The specifications regarding the clustering of systems

How all these stand-alone boxes were going to talk to each other in a foolproof manner

Production setup should be documented to bits. It needs to be neat, foolproof, and

understandable.

It should have all a system configurations, IP addresses, system specifications, & installation instructions.

It needs to be updated as & when any change is made to the production environment of the system

READ ALSO
AWS Interview Questions 2

Q62) My application is not coming up for some reason? How can you bring it up?

We need to follow the steps

Network connection

Checking the logs

Processes)

Q63) Did you automate anything in your project? Please explain

Yes I have automated couple of things such as

Password expiry automation

Deleting the older log files

Code quality threshold violations etc.

Q64) What is IaC? How you will achieve this?

Infrastructure as Code (IaC) is the management of infrastructure (networks, virtual machines, load balancers, and connection topology) in a descriptive model, using the same versioning as

DevOps team uses for source code. This will be achieved by using the tools such as Chef, Puppet and Ansible etc.

READ ALSO
AWS Interview Questions 3

Q65) What is multifactor authentication? What is the use of it?

Multifactor authentication (MFA) is a security system that requires more than one method of

other transaction.

privilege elevation and more

Reduce cost & complexity with an integrated identity platform

Q66) I want to copy the artifacts from one location to another location in cloud. How?

Create two S3 buckets, one to use as the source, and the other to use as the destination and then create policies.

Q67) How can I modify the commit message in git?

I have to use following command and enter the required message.

Q68) How can you avoid the waiting time for the triggered jobs in Jenkins.

READ ALSO
MQ on AWS: PoC of high availability using EFS

First I will check the Slave nodes capacity, If it is fully loaded then I will add the slave node by doing the following process.

Go to the Jenkins dashboard -> Manage Jenkins ->Manage Nodes

Create the new node a

By giving the all required fields and launch the slave machine as you want.

Q69) What are the Pros and Cons of Ansible?

Pros:

  1. Open Source
  2. Agent less
  3. Improved efficiency , reduce cost
  4. Less Maintenance
  5. Easy to understand yaml files

Cons:

  1. Underdeveloped GUI with limited features
  2. Increased focus on orchestration over configuration management
  3. SSH communication slows down in scaled environments

Q70) How you handle the merge conflicts in git?

READ ALSO
What is DevOps? Introduction to DevOps 1

Follow the steps

  1. Create Pull request
  2. Modify according to the requirement by sitting with developers
  3. Commit the correct file to the branch
  4. Merge the current branch with master branch.