Total Page Preview:   000000001674

DevOps Interview questions for freshers and experienced

 

Question 1. what is DevOps? 
Answer: By the name DevOps, it’s very clear that it’s a collaboration of Development as well as Operations. But one should know that DevOps is not a tool, or software or framework, DevOps is a Combination of Tools which helps for the automation of the whole infrastructure. DevOps is basically an implementation of Agile methodology on the Development side as well as Operations side.
 
Question 2. What is Git and explain the difference between Git and SVN?
Answer: Git is a source code management (SCM) tool which handles small as well as large projects with efficiency. It is basically used to store our repositories in remote server such as GitHub.
 
Question 3. why do we need DevOps?
Answer: To fulfil the need of delivering more and faster and better application to meet more and more demands of users, we need DevOps. DevOps helps deployment to happen really fast compared to any other traditional tools.
 
Question 4. Mention the key aspects or principle behind DevOps?
Answer: The key aspects or principle behind DevOps is:
  • Infrastructure as a Code
  • Continuous Integration
  • Continuous Deployment
  • Automation
  • Continuous Monitoring
  • Security
 
Question 5. List out some of the popular tools for DevOps?
Answer:
  • Git
  • Jenkins
  • Ansible
  • Puppet
  • Nagios
  • Docker
  • ELK (Elasticsearch, Logstash, Kibana)
 
Question 6. what is a version control system?
Answer: Version Control System (VCS) is a software that helps software developers to work together and maintain a complete history of their work. Some of the feature of VCS as follows:
  • Allow developers to wok simultaneously
  • Does not allow overwriting on each other changes.
  • Maintain the history of every version.
 
There are two types of Version Control Systems:
1. Central Version Control System, Ex: Git, Bitbucket
2. Distributed/Decentralized Version Control System, Ex: SVN
 
Question 7. What language is used in Git??
Answer: Git is written in C language, and since its written in C language its very fast and reduces the overhead of runtimes.
 
Question 8.  What is SubGit?
Answer: SubGit is a tool for migrating SVN to Git. It creates a writable Git mirror of a local or remote Subversion repository and uses both Subversion and Git if you like.
 
Question 9.  how can you clone a Git repository via Jenkins?
Answer: First, we must enter the e-mail and user name for your Jenkins system, then switch into your job directory and execute the “git config” command.
 
Question 10. what’s the use of Ansible?
Answer: Ansible is mainly used in IT infrastructure to manage or deploy applications to remote nodes. Let’s say we want to deploy one application in 100’s of nodes by just executing one command, then Ansible is the one actually coming into the picture but should have some knowledge on Ansible script to understand or execute the same.
 
Question 11. How do I see a list of all the ansible_ variables?
Answer: Ansible by default gathers “facts” about the machines, and these facts can be accessed in Playbooks and in templates. To see a list of all the facts that are available about a machine, you can run the “setup” module as an ad-hoc action: Ansible -m setup hostname This will print out a dictionary of all the facts that are available for that particular host.
 
Question 12. what is Docker?
Answer: Docker is a containerization technology that packages your application and all its dependencies together in the form of Containers to ensure that your application works seamlessly in any environment.
 
Question 13.  what is Docker image?
Answer: Docker image is the source of Docker container. Or in other words, Docker images are used to create containers.
 
Question 14. what is Docker Container?
Answer: Docker Container is the running instance of Docker Image.
 
Question 15. Can we consider DevOps as Agile methodology?
Answer: Of Course, we can!! The only difference between agile methodology and DevOps is that, agile methodology is implemented only for development section and DevOps implements agility on both development as well as operations section.
 
Question 16what is kernel?
Answer: A kernel is the lowest level of easily replaceable software that interfaces with the hardware in your computer.
 
Question 17.what is difference between grep -i and grep -v?
Answer: I ignore alphabet difference V accept this value
  • ex) ls | grep -i docker
  • Dockerfile
  • docker.tar.gz
  • ls | grep -v docker
  • Desktop
  • Dockerfile
  • Documents
  • Downloads
 
You can’t see anything with name docker.tar.gz
 
Question 18How can you define particular space to the file
Answer: This feature is generally used to give the swap space to the server. Lets say in below machine I have to create swap space of 1GB then, dd if=/dev/zero of=/swapfile1 bs=1G count=1
 
Question 19what is concept of sudo in linux?
Answer: Sudo(superuser do) is a utility for UNIX- and Linux-based systems that provides an efficient way to give specific users permission to use specific system commands at the root (most powerful) level of the system.
 
Question 20what is a Jenkins Pipeline?
Answer: Jenkins Pipeline (or simply “Pipeline”) is a suite of plugins which supports implementing and integrating continuous delivery pipelines into Jenkins.
 

Question 21. How to stop and restart the Docker container?

Answer: To stop the container: docker stop container ID Now to restart the Docker container:

 docker restart container ID

Question 22. What platforms does Docker run on?
Answer: Docker runs on only Linux and Cloud platforms:
  • Ubuntu 12.04 LTS+
  • Fedora 20+
  • RHEL 6.5+
  • CentOS 6+
  • Gentoo
  • ArchLinux
  • openSUSE 12.3+
  • CRUX 3.0+ 
 
Cloud:
  • Amazon EC2
  • Google Compute Engine
  • Microsoft Azure
 
Rackspace Note that Docker does not run on Windows or Mac for production as there is no support, yes you can use it for testing purpose even in windows
 
Question 23. what are the tools used for docker networking? 
Answer: For docker networking we generally use kubernets and docker swarm.
 
Question 24. what is docker compose?
Answer: Lets say you want to run multiple docker container, at that time you have to create the docker compose file and type the command docker-compose up. It will run all the containers mentioned in docker compose file.
 
Question 25.  What is Scrum?
Answer: Scrum is basically used to divide your complex software and product development task into smaller chunks, using iterations and incremental practises. Each iteration is of two weeks. Scrum consists of three roles: Product owner, scrum master and Team
 
Question 26.  What does the commit object contain?
Answer: Commit object contain the following components: It contains a set of files, representing the state of a project at a given point of time reference to parent commit objects An SHAI name, a 40-character string that uniquely identifies the commit object (also called as hash).
 
Question 27.  How do we know in Git if a branch has already been merged into master?
Answer: git branch –merged The above command lists the branches that have been merged into the current branch. git branch –no-merged this command lists the branches that have not been merged. 
 
Question 28.   What is ‘Staging Area’ or ‘Index’ in GIT?
Answer: Before committing a file, it must be formatted and reviewed in an intermediate area known as ‘Staging Area’ or ‘Indexing Area’. #git add <file_name>
 
Question 29. What is Git Stash?
Answer: Let’s say you’ve been working on part of your project, things are in a messy state and you want to switch branches for some time to work on something else. The problem is, you don’t want to do a commit of your half-done work just, so you can get back to this point later. The answer to this issue is Git stash. Git Stashing takes your working directory that is, your modified tracked files and staged changes and saves it on a stack of unfinished changes that you can reapply at any time.
 
Question 30. How can you create a repository in Git?
Answer: To create a repository, you must create a directory for the project if it does not exist, then run command “git init”. By running this command .git directory will be created inside the project directory.
 
Question 31. what is docker compose?
Answer: Lets say you want to run multiple docker container, at that time you have to create the docker compose file and type the command docker-compose up. It will run all the containers mentioned in docker compose file.
 
Question 32. What is Jenkins?
Answer: Jenkins is an open source continuous integration tool which is written in Java language. It keeps a track on version control system and to initiate and monitor a build system if any changes occur. It monitors the whole process and provides reports and notifications to alert the concern team.
 
Question 33. what is docker compose?
Answer: Lets say you want to run multiple docker container, at that time you have to create the docker compose file and type the command docker-compose up. It will run all the containers mentioned in docker compose file.
 
Question 34. What is the difference between Maven, Ant and Jenkins?
Answer: Maven and Ant are Build Technologies whereas Jenkins is a continuous integration(CI/CD) tool.
 
Question 35. Explain what is continuous integration?
Answer: When multiple developers or teams are working on different segments of same web application, we need to perform integration test by integrating all the modules. To do that an automated process for each piece of code is performed on daily bases so that all your code gets tested. And this whole process is termed as continuous integration.
 
Question 36. What is the relation between Hudson and Jenkins?
Answer: Hudson was the earlier name of current Jenkins. After some issue faced, the project name was changed from Hudson to Jenkins.
 
Question 37. What is Ansible?
Answer: 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.
 
Question 38. What are the challenges you faced in recent times?
Answer: I need to implement trending technologies like Docker to automate the configuration management activities in my project by showing POC.
 
Question 39. What are the build and deployment failures you got and how you resolved those?
Answer: 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.
 
Question 40. I want a file that consists of last 10 lines of the some other file?
Answer: Tail -10 filename >filename

 

Thank You

About Author

Brijesh Kumar

Database Developer

I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall and Database Migration On-Premise to Azure Cloud.
LinkedIn : https://www.linkedin.com



Comments


                           
                           

                           

                           

Facebook User: