Devops Interview Questions With Answers 1
Devops Interview Questions With Answers 1
Devops Interview Questions With Answers 1
Here is DevOps Intw questions, Which helps you on your upcoming Intw.
Please put comments in comment section, If you feel any missing topic, I will update this
post accordingly.
Topics
• Linux
• AWS
• Ansible
• Jenkins
• Git
Please write in comments if you feel any topics should be here. I will update this post
accordingly.
19. I am running ansible playbook? How I can run it with debug mode?
Ans: By using "debug" module inside that playbook.
20. Can you please differentiate ansible with other configuration management tool like chef
or puppet?
Ans: Ansible is not depend on any client, So we can say it’s not an server/client
architecture.
3. What are the Plugins you have used in Jenkins mostly and why? Named five at least.
Ans: git plugins, maven plugin, Build Pipeline Plugin, Copy Artifact Plugin, JIRA Plugin for
Jenkins, Mask Passwords Plugin.
9. How to run more than one ant version or java version in Jenkins?
Ans: By using "configure system" we can create more than one jdk.
15. What are the basic permissions set of any user's in jenkins
Ans: For any user by default permission is read-only
2. What is EC2?
Ans:
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable
compute capacity in the cloud. It is designed to make web-scale cloud computing easier for
developers.
Amazon EC2's simple web service interface allows you to obtain and configure capacity with
minimal friction.
A. Select AMI
B. Select machine type.
C. Select the network option
D. Add Volume
E. Add Security Group
F. Tag instance
G. Preview the configuration
H. Launch
8. What is EBS?
Ans: EBS is the plug-in play device for EC2 machine.
A. By snapshot and launching the new EBS and attach it to running EC2 machine.
B. By editing the EBS volume
11. What are the difference between Spot, Reserved and On-Demand Instance.?
Ans:
Spot instances enable you to bid on unused EC2 instances, which can lower your Amazon
EC2 costs significantly.
Reserved Instances provide you with a significant discount compared to OnDemand
Instance pricing. Reserved Instances are not physical instances, but rather a billing discount
applied to the use of On-Demand Instances in your account. These On-Demand Instances
must match certain attributes in order to benefit from the billing discount.
A. Standard class
B. Statndard_infrequent
C. REDUCED_REDUNDANCY
17. What is Cloud-Watch, what are the difference between Advance and basic monitoring of
Cloud watch ?
Ans: Cloud-Watch is monitoring tool of aws. Free - tier support basic monitoring with 5 min
duration and Advance monitoring support every minutes monitoring of AWS resources.
A. master B. develop
b) GIT does not support ‘commits’ across multiple branches or tags. Subversion allows the
creation of folders at any location in the repository layout.
c) Gits are unchangeable, while Subversion allows committers to treat a tag as a branch and
to create multiple revisions under a tag root.
Ans: The purpose of branching in GIT is that you can create your own branch and jump
between those branches.
It will allow you to go to your previous work keeping your recent work intact
Ans: A ‘conflict’ arises when the commit that has to be merged has some change in one
place, and the current commit also has a change at the same place.
Git will not be able to predict which change should take precedence.
Ans: To resolve the conflict in git, edit the files to fix the conflicting changes and then add
the resolved files by running “git add” after that to commit the repaired merge, run “git
commit”.
Git remembers that you are in the middle of a merger, so it sets the parents of the commit
correctly.
Ans: Once your development branch is merged into the main branch, you don’t need
development branch. To delete a branch use, the command “git branch –d [head]”.
17. What is the difference between ‘git remote’ and ‘git clone’?
Ans: ‘git remote add’ just creates an entry in your git config that specifies a name for a
particular URL.
While, ‘git clone’ creates a new git repository by copying and existing one located at the
URI.
1. What is load on Linux machine and how to check the load on machine, how much load on
machine is good or bad?
Ans: Load on machine is never good, The command w show the average load on linux
machine
for 5 minute duration.
6. Let’s say my server is performing very slow, What are the basic steps involved to
troubleshoot this issue?
Ans: Check the load on server, check the memory consumptions and users logedin.
8. How to increase user limit for any file,If my application is giving error at start up for user
limit?
Ans: Since the default limit for any file in Linux for any user is 1024 pages. So If my
application is giving error in start up
for user limit, then we should go to the file
vim /etc/security/limits.conf
Examples
* soft core 0
* hard nofile 512
@student hard nproc 20
@faculty soft nproc 20
@faculty hard nproc 50
ftp hard nproc 0
@student - maxlogins 4
:123 hard cpu 5000
@500: soft cpu 10000
600:700 hard locks 10
Determine the size of the new swap file in megabytes and multiply by 1024 to determine
the number of blocks. For example, the block size of a 64 MB swap file is 65536.
At a shell prompt as root, type the following command with count being equal to the desired
block size:
# dd if=/dev/zero of=/swapfile bs=1024 count=65536
Setup the swap file with the command:
# mkswap /swapfile
To enable the swap file immediately but not automatically at boot time:
# swapon /swapfile
To enable it at boot time, edit /etc/fstab to include the following entry:
# /swapfile swap swap defaults 0 0
The next time the system boots, it enables the new swap file.
After adding the new swap file and enabling it, verify it is enabled by viewing the output of
the command cat
#/proc/swaps or free.
12. Can you please let me know the entry of /etc/password file?
Ans:
Username: It is used when user logs in. It should be between 1 and 32 characters in length.
Password: An x character indicates that encrypted password is stored in /etc/shadow file.
User ID (UID): Each user must be assigned a user ID (UID). UID 0 (zero) is reserved for
root and UIDs 1-99 are reserved for other predefined accounts.
Further UID 100-999 are reserved by system for administrative and system
accounts/groups.
Group ID (GID): The primary group ID (stored in /etc/group file)
User ID Info: The comment field. It allow you to add extra information about the users such
as user’s full name, phone number etc.
This field use by finger command.
Home directory: The absolute path to the directory the user will be in when they log in. If
this directory does not exists then users directory becomes /
Command/shell: The absolute path of a command or shell (/bin/bash). Typically, this is a
shell. Please note that it does not have to be a shell.
13. How can we add user and assign customize home directory to it ?
14. I want to copy a file abc.txt from server A to server B in same neteork, By whcih
command I can achive it ?
Ans: By using scp command we can achive this and command will be
# scp -r source_path user@destination_Server_IP:/destination_path