DevOps Interview Questions and Answers Set-4

31. Whether your video card can run Unity how would you know?

When you use command – /usr/lib/nux/ unity_support_test-p, it will give detailed output about Unity’s requirements and if they are met, then your video card can run unity.

32. What is the quickest way to open an Ubuntu terminal in a particular directory?

  • To open Ubuntu terminal in a particular directory you can use a custom keyboard shortcut.
  • To do that, in the command field of a new custom keyboard, type genome – terminal – – working – directory = /path/to/dir.

33. Explain how you create launchers on the desktop in Ubuntu?

  • To create launchers on the desktop in Ubuntu you can use
  • ALT+F2 then type “ gnome-desktop-item-edit –create-new~/desktop “, it will launch the old GUI dialog and create a launcher on your desktop

34. What is Ansible?

Ansible is an open source automation platform. It is very, very simple to set up and yet powerful. Ansible can help you with configuration management, application deployment, task automation. It can also do IT orchestration, where you have to run tasks in sequence and create a chain of events which must happen on several different servers or devices. An example is if you have a group of web servers behind a load balancer. Ansible can upgrade the web servers one at a time and while upgrading it can remove the current web server from the load balancer and disable it in your Nagios monitoring system. So, in short, you can handle complex tasks with a tool which is easy to use.

35. What are Design Patterns?

In simple terms, Design Patterns are the solution to problems faced by developers- they represent the best practices that are used by developers. Design Patterns help the inexperienced developer to learn easily and quickly. Design Patterns have standard terminologies addressing specific scenario.

There are mainly 3 types of Design Patterns:

  • Creational: addresses design problems.
  • Structural: simplifies relationships between objects.
  • Behavioral: simplifies how objects interact with each other.

 36. How do you create a new repository in git?

Create a project directory and run “git init” under that directory. It creates a .git directory in the project directory.

37. How do you squash the last N commits into a single commit?

There are two options to squash the last N commits into a single commit. Include both of the below-mentioned options in your answer:

If you want to write the new commit message from scratch use the following command

git reset –soft HEAD~N &&

git commit

If you want to start editing the new commit message with a concatenation of the existing commit messages then you need to extract those messages and pass them to Git commit for that I will use

git reset –soft HEAD~N &&

git commit –edit -m”$(git log –format=%B –reverse .HEAD@{N})”

38. Explain how can create a backup and copy files in Jenkins?

To create a backup, all you need to do is to periodically back up your JENKINS_HOME directory. This contains all of your build jobs configurations, your slave node configurations, and your build history. To create a back-up of your Jenkins setup, just copy this directory. You can also copy a job directory to clone or replicate a job or rename the directory.

39. How will you secure Jenkins?

The way I secure Jenkins is mentioned below. If you have any other way of doing it, please mention it in the comments section below:

  • Ensure global security is on.
  • Ensure that Jenkins is integrated with my company’s user directory with the appropriate plugin.
  • Ensure that the matrix/Project matrix is enabled to fine tune access.
  • Automate the process of setting rights/privileges in Jenkins with the custom version controlled script.
  • Limit physical access to Jenkins data/folders.
  • Periodically run security audits on same.

40. What is Automation Testing?

Automation testing or Test Automation is a process of automating the manual process to test the application/system under test. Automation testing involves the use of separate testing tools which lets you create test scripts which can be executed repeatedly and doesn’t require any manual intervention.