Top 50 DevOps Interview Questions with Answers

DevOps Interview Questions with Answers

1. What is DevOps?

a. A methodology that emphasizes communication and collaboration between software developers and IT operations
b. A software testing methodology
c. A programming language

Answer: A

2. What is Git?

a. A version control system
b. A programming language
c. A software development framework

Answer: A

3. What is continuous integration?

a. The process of continuously testing software throughout its development cycle
b. The process of continuously deploying software throughout its development cycle
c. The process of continuously writing code without interruption

Answer: A

4. What is Docker?

a. A containerization technology
b. A programming language
c. A software development framework

Answer: A

5. What is cloud computing?

a. The delivery of computing services over the internet
b. The delivery of computing services locally on a single machine
c. The delivery of computing services via USB drives

Answer: A

6. What is Configuration Management?

a. The process of managing and maintaining computing systems
b. The process of managing and maintaining software development teams
c. The process of managing and maintaining physical infrastructure

Answer: A

7. What is Infrastructure as Code (IaC)?

a. The practice of automating infrastructure management through code
b. The practice of manually configuring infrastructure
c. The practice of outsourcing infrastructure management

Answer: A

8. What is Puppet?

a. A configuration management tool
b. A containerization technology
c. A cloud computing platform

Answer: A

9. What is Ansible?

a. A configuration management tool
b. A containerization technology
c. A cloud computing platform

Answer: A

10. What is Jenkins?

a. A continuous integration and continuous delivery tool
b. A programming language
c. A software development framework

Answer: A

11. What is Nagios?

a. A monitoring tool
b. A programming language
c. A containerization technology

Answer: A

12. What is Chef?

a. A configuration management tool
b. A containerization technology
c. A cloud computing platform

Answer: A

13. What is Kubernetes?

a. A container orchestration tool
b. A programming language
c. A software development framework

Answer: A

14. What is Amazon Web Services (AWS)?

a. A cloud computing platform
b. A programming language
c. An operating system

Answer: A

15. What is Terraform?

a. An infrastructure as code tool
b. A containerization technology
c. A continuous integration tool

Answer: A

16. What is SaltStack?

a. A configuration management tool
b. A containerization technology
c. A cloud computing platform

Answer: A

17. What is Splunk?

a. A log management tool
b. A containerization technology
c. A cloud computing platform

Answer: A

18. What is ELK?

a. A log management tool
b. A configuration management tool
c. A containerization technology

Answer: A

19. What is Graylog?

a. A log management tool
b. A containerization technology
c. A cloud computing platform

Answer: A

20. What is Prometheus?

a. A monitoring tool
b. A containerization technology
c. A cloud computing platform

Answer: A

21. What is Grafana?

a. A visualization tool
b. A containerization technology
c. A cloud computing platform

Answer: A

22. What is Selenium?

a. A testing tool
b. A containerization technology
c. A cloud computing platform

Answer: A

23. What is JIRA?

a. A project management tool
b. A programming language
c. A containerization technology

Answer: A

24. What is Maven?

a. A build automation tool
b. A containerization technology
c. A cloud computing platform

Answer: A

25. What is Gradle?

a. A build automation tool
b. A containerization technology
c. A cloud computing platform

Answer: A

26. What is HipChat?

a. A chat tool for teams
b. A programming language
c. A containerization technology

Answer: A

27. What is Travis CI?

a. A continuous integration and continuous delivery tool
b. A programming language
c. A containerization technology

Answer: A

28. What is CircleCI?

a. A continuous integration and continuous delivery tool
b. A programming language
c. A containerization technology

Answer: A

29. What is CodeDeploy?

a. A continuous deployment tool
b. A programming language
c. A containerization technology

Answer: AAnswer: A

30. What is CodePipeline?

a. A continuous delivery tool
b. A programming language
c. A containerization technology

Answer: AAnswer: A

31. What is SRE?

a. Site Reliability Engineering
b. Software Resource Engineering
c. System Reliability Engineering

Answer: A

32. What is Blue/Green deployment?

a. A deployment strategy that involves switching between two identical environments
b. A deployment strategy that involves a single environment
c. A deployment strategy that involves multiple environments

Answer: A

33. What is Canary deployment?

a. A deployment strategy that involves releasing a new version to a small subset of users before a full release
b. A deployment strategy that involves releasing a new version to all users simultaneously
c. A deployment strategy that involves delaying the release of a new version until all testing is complete

Answer: A

34. What is Agile?

a. A development methodology that emphasizes communication and flexibility
b. A software testing methodology
c. A programming language

Answer: A

35. What is Scrum?

a. An Agile framework for managing software development
b. A containerization technology
c. A cloud computing platform

Answer: A

36. What is Lean?

a. An Agile framework for managing software development
b. A containerization technology
c. A software development methodology

Answer: A

37. What is Kanban?

a. An Agile framework for managing software development
b. A containerization technology
c. A cloud computing platform

Answer: A

38. What is Pair Programming?

a. A software development practice that involves two programmers working together on the same computer
b. A containerization technology
c. A cloud computing platform

Answer: A

39. What is Continuous Delivery?

a. The practice of continuously deploying software throughout its development cycle
b. The practice of continuously testing software throughout its development cycle
c. The practice of continuously writing code without interruption

Answer: A

40. What is Continuous Deployment?

a. The automated deployment of software throughout its development cycle
b. The manual deployment of software throughout its development cycle
c. The practice of writing code without deploying it

Answer: A

41. What is Code Review?

a. The process of reviewing code for quality, correctness, and security
b. The process of writing code without review
c. The process of reviewing code only for security

Answer: A

42. What is a Pull Request?

a. A request to merge code changes into a codebase
b. A request to push code changes into a codebase
c. A request to delete code from a codebase

Answer: A

43. What is a Code Repository?

a. A central location for storing and managing code
b. A physical storage location for computing systems
c. A tool for monitoring software development teams

Answer: A

44. What is a Branch?

a. A copy of a codebase that can be modified independently
b. A copy of a codebase that cannot be modified
c. A copy of a codebase that can only be accessed by certain team members

Answer: A

45. What is Merge Conflict?

a. When two or more changes are made to the same line of code and a merge cannot be automatically completed
b. When two or more changes are made to different lines of code and a merge cannot be completed
c. When two or more people are trying to merge changes at the same time

Answer: A

46. What is DevOps Culture?

a. A culture that emphasizes communication, collaboration, and automation between software development and IT operations teams
b. A culture that emphasizes individual work and autonomy
c. A culture that emphasizes hierarchy and top-down management

Answer: A

47. What is Observability?

a. The measure of how well a system can be understood from the outside
b. The measure of how well a system can be understood from the inside
c. The measure of how well a system can be scaled

Answer: A

48. What is Microservices Architecture?

a. A software architecture that emphasizes small, independently deployable services
b. A software architecture that emphasizes large, monolithic services
c. A software architecture that emphasizes manual deployment of services

Answer: A

49. What is Serverless Computing?

a. A computing model where the cloud provider manages server infrastructure and only charges for usage
b. A computing model where the cloud provider manages server infrastructure and charges a flat fee
c. A computing model where the user manages server infrastructure

Answer: A

50. What is ChatOps?

a. The practice of conducting operations through a group chat interface
b. The practice of conducting operations through voice chat
c. The practice of conducting operations through email

Answer: A

What is Chef and Puppet?

Chef vs Puppet is one of the biggest name in system administration and information technology. Both tools help IT experts to maintain a consistent configuration in all servers. It is very difficult to compare and differentiate both chef and puppet is quite difficult, and decide to choose and who is best for you to use. Puppet or Chef can handle database connection strings where you have a different one for dev, test, and prod.

Both tools can handle these type of work as well.

In this blog I will try to provide you information from all aspect which going to help you to choose between Puppet vs Chef. Discuss everything from the comparison to differences, pros and cons also. This guide is definitely going to help you in your decision of which server to work with. Let’s start-

What is Chef?

Chef is an open-source and code-driven configuration management tool used to transform infrastructure into code. It is well-known for automate how infrastructure is deployed, configured, and managed. Chef can also operate in the cloud, on premises, or even in a hybrid format that comfortable for each individual’s needs.

What is Puppet?

Puppet is another open-source configuration management tool, which is deemed to be the industry standard for configuration management. This tool is designed in a simple way that most users can learn, but it is complex enough to handle difficult level tasks and infrastructure.

System administrators and IT professionals are able to do a variety of tasks like managing large infrastructures to maintenance of the desired states of nodes.

Chef vs Puppet: Important Differences and Similarities

Chef and Puppet both are very promising configuration management software tools,  we are here to discuss some of their differences and similarities. Both the tools are simple to use and capabilities to automate complex high level IT application environment.

This differences are on the basis of different factors such as Availability, Configuration Language, Setup and Installation, Ease of Management, Scalability, Interoperability, Tool Capabilities and Pricing. These are:

Reports says, IT departments with a strong DevOps workflow deploy software 200 times more frequently, with 3000 times faster lead times, recover 28 times faster, and have three times lower change failure rates.

Final words

Here comes the main question that How to choose between Chef and Puppet, and the answer is it totally depends on the user’s requirements and purpose for which it going to be used.

No matter what you use at the end but decision is especially from the ones who will end up working with the tool. Someone with the same background might find it more suitable to use Puppet or Chef, before taking the decision also consider the premium features from each tool. At the end, features will help your organization in growth or fall.

Pricing is another factor which included but prices fluctuates a lot with time, and it varies depending on each customer needs.

At last both tools have their own advantages and categories in which they are better than the other. My only intention here is to help you in your decision making. So, it is necessary that you choose the appropriate tool which can be fitted according to your needs.

I hope this blog is helpful for you, and if you want to learn more depth knowledge about Chef and Puppet, I would suggest you DevOpsSchool, One of the best institute for training and certification online.

Thank you !!

Tagged : / / / / / /

Which is better for automation: Ansible, Chef or Puppet?

Many organizations are increasingly adopting the new collaborative culture in a way to achieve a competitive edge in modern IT domain.

Recent studies shows that the global DevOps market size reached USD 5.8 billion in 2021 and is projected to attain USD 14.97 billion by 2026 with a CAGR of 19.1% during the forecast period.

There are a number of latest DevOps configuration tools such as Chef, Puppet, and Ansible with various features available in the market. So, there is an inevitable need for the comparison of various configuration tools to identify the best tool for the success of DevOps projects.

What is Ansible?

Ansible is a latest configuration management tool which makes configuration management and coordination system of computer very easy to user.

What is Puppet?

Puppet is the oldest version of configuration management system and hard to understand for user.

What is Chef?

Chef is newer than Puppet but older version than Ansible so it is easier than Puppet but not than Ansible configuration system.

Here we do comparison of the top configuration tools including Ansible, Puppet and Chef:

First of all these tools are simple to use and robust capabilities to automate complex multi-tier IT application environment.

The differences between Ansible, Chef and Puppet are portrayed on the basis of different factors including Availability, Configuration Language, Setup and Installation, Ease of Management, Scalability, Interoperability, Tool Capabilities and Pricing:

IT departments with a strong DevOps workflow deploy software 200 times more frequently, with 2,555 times faster lead times, recover 24 times faster, and have three times lower change failure rates.

Conclusion

As you can see above, chef and puppet are the old players with the time whereas Ansible is new players in the market, and Ansible looks very promising with the growing trend. So, to conclude, all the three tools have their own advantages and categories in which they are better than the other. My only intention here is to help you in your decision making. So, it is necessary that you choose the appropriate tool which can be fitted according to your needs.

If you want to know more about Ansible, you can check out this blog on Ansible, Puppet and Chef with complete information.

If you are curious to learn and make a good career with this skill then I would suggest you please check out DevOpsschool.com.

Tagged : / / / / / /

Puppet Module Lab & Excercise – Part 1

Puppet Module Lab & Excercise – Part 1

  1. Write a puppet module to setup a webserver(httpd) only in RHEL and use the HEREDOC to craete a html code of index.html inside a directory called “/var/www/html/index.html”

  2. Write a puppet module to setup a webserver(httpd) only in RHEL and use the puppet template to create a html code of index.html inside a directory called “/var/www/html/index.html”

  3. Write a puppet module to install git, ntp and wget tools.

  4. Write a puppet module which has file named with deploy.sh under module’s files directory. the file should be copied to /opt

Tagged : / / / /

Puppet Program Lab & Excercise – Part 2

Puppet Program Lab & Excercise – Part 1

  1. Write a puppet Program to install package “git”, “ntp” and wget in RHEL.

  2. Which resource declaration can help us to deploy the “~/.ssh/authorized_keys” in 1000s of servers?

  3. Write a puppet Program to extract a tar ball in /opt

  4. Write a puppet Program to zip a directory which has multiple files.

  5. Write a puppet Program to reboot the machine?

  6. Write a puppet program to execute a shell command/script using puppet.

Tagged : / / / /

Puppet Program Lab & Excercise – Part 1

Puppet Program Lab & Excercise – Part 1

  1. Write a Puppet Program to create a file named with “file.txt” in /opt/ owner by ec2-user and execute permission?
  2. Write a Puppet Program to create a group called “scmgalaxy-admins”
  3. Write a Puppet Program to create a usser called “deploy” which should be a part of “scmgalaxy-admins” group.
  4. Wrire a Puppet Program and insert following in /etc/hosts
    10.4.5.5 test.scmgalaxy.com
  5. Write a puppet program to display following lines when Sends an arbitrary message to the agent run-time log.
    Welcome to scmGalaxy Puppet program
Tagged : / / / /

How to Setup Puppet Learning VM – Complete Process/Guide

setup-a-puppet-learning-vm
Download the VM(Zip File here)

 

Minimum requirements

  • Internet-enabled Windows, OS X, or Linux computer with 10GB free space and a VT-x/AMD-V enabled processor.
  • Up to date virtualization software. See the setup instructions below for details.

Setting up the Learning VM

  1. Before beginning, you may want to use the MD5 sum provided at the VM download page to verify your download. On Mac OS X and *nix systems, you can use the command md5 learning_puppet_vm.zip and compare the output to the text contents of thelearning_puppet_vm.zip.md5 file provided on the download page. On Windows systems, you will need to download and use a tool such as the Microsoft File Checksum Integrity Verifier.

  2. Get an up-to-date version of your virtualization software. We suggest using either VirtualBox or a VMware application appropriate for your platform. VirtualBox is free and available for Linux, OS X, and Windows. VMware has several desktop virtualization applications, including VMWare Fusion for Mac and VMware Workstation for Windows.

  3. The Learning VM’s Open Virtualization Archive format must be imported rather than opened directly. Launch your virtualization software and find an option for Import or Import Appliance. (This will usually be in a File menu. If you cannot locate an Import option, please refer to your virtualization software’s documentation.)

  4. Before starting the VM for the first time, you will need to adjust its settings. We recommend allocating 4GB of memory for the best performance. If you don’t have enough memory on your host machine, you may leave the allocation at 3GB or lower it to 2GB, though you may encounter stability and performance issues. Set the Network Adapter to Bridged. Use an Autodetect setting if available, or accept the default Network Adapter name. (If you started the VM before making these changes, you may need to restart the VM before the settings will be applied correctly.) If you are unable to use a bridged network, we suggest using the port-forwarding instructions provided in the troubleshooting guide.

  5. Start the VM. When it is started, make a note of the IP address and password displayed on the splash page. Rather than logging in directly, we highly recommend using SSH. On OS X, you can use the default Terminal application or a third-party application like iTerm. For Windows, we suggest the free SSH client PuTTY. Connect to the Learning VM with the login root and password you noted from the splash page. (e.g. ssh root@<IPADDRESS>) Be aware that it might take several minutes for the services in the PE stack to fully start after the VM boots. Once you’re connected to the VM, we suggest updating the clock with ntpdate pool.ntp.org.

  6. You can access this Quest Guide via a webserver running on the Learning VM itself. Open a web broswer on your host and enter the Learning VM’s IP address in the address bar. (Be sure to use http://<ADDRESS> for the Quest Guide, as https://<ADDRESS> will take you to the PE console.

 

Troubleshooting

For the most up-to-date version of this troubleshooting information, check the GitHub repository. If nothing here resolves your issue, feel free to email us at learningvm@puppetlabs.com and we’ll do our best to address your issue.

For issues with Puppet Enterprise that are not specific to the Learning VM, see the Puppet Enterprise Known Issues page.

The cowsay package won’t install

The Learning VM version 2.29 has an error in the instructions for this quest. The cowsay package declaration should includeprovider => 'gem', rather than ensure => 'gem'.

If you continue to get puppet run failures related to the gem, you can install the cached version manually: gem install /var/cache/rubygems/gems/cowsay-0.2.0.gem

I completed a task, but the quest tool doesn’t show it as complete

The quest tool uses a series of Serverspec tests for each quest to track task progress. Certain tasks simply check your bash history for an entered command. In some cases, the /root/.bash_history won’t be properly initialized, causing these tests to fail. Exiting the VM and logging in again will fix this issue.

It is also possible that we have written the test for a task in a way that is too restrictive and doesn’t correctly capture a valid syntactical variation in your Puppet code or another relevant file. You can check the specific matchers by looking at a quest’s spec file in the ~/.testing/spec/localhost/ directory. If you find an issue here, please let us know by sending an email tolearningvm@puppetlabs.com.

Password Required for the Quest Guide

The Learning VM’s Quest Guide is accessible at http://<VM's IP Address>. Note that this is http and not https which is reserved for the PE console. The PE console will prompt you for a password, while no password is required for the Quest Guide. (The Quest Guide includes a password for the PE console in the Power of Puppet quest: admin/puppetlabs)

I can’t find the VM password

The password to log in to the VM is generated randomly and will be displayed on the splash page displayed on the terminal of your virtualization software when you start the VM.

If you are already logged in via your virtualization software’s terminal, you can use the following command to view the password: cat /var/local/password.

Does the Learning VM work on vSphere, ESXi, etc.?

Possibly, but we don’t currently have the resources to test or support the Learning VM on these platforms.

My puppet run fails and/or I cannot connect to the PE console

It may take some time after the VM is started before all the Puppet services are fully started. If you recently started or restarted the VM, please wait a few minutes and try to access the console or trigger your puppet run again.

Also, because the Learning VM’s puppet services are configured to run in an environment with restricted resources, they are more prone to crashes than a default installation with dedicated resources.

You can check the status of puppet services with the following command:

systemctl --all | grep pe- 

If you notice any stopped puppet-related services (e.g. pe-puppetdb), double check that you have sufficient memory allocated to the VM and available on your host before you try starting them (e.g. service pe-puppetdb start).

If you get an error along the lines of Error 400 on SERVER: Unknown function union... it is likely because the puppetlabs-stdlib module has not been installed. This module is a dependency for many modules, and provides a set of common functions. If you are running the Learning VM offline, you cannot rely on the Puppet Forge’s dependency resolution. We have this module and all other modules required for the Learning VM cached, with instructions to install them in the Power of Puppet quest. If that installation fails, you may try adding the --force flag after the --ignore-dependencies flag.

I can’t import the OVA

First, ensure that you have an up-to-date version of your virtualization software installed. Note that the “check for updates” feature of VirtualBox may not always work as expected, so check the website for the most recent version.

The Learning VM has no IP address or the IP address will not respond.

If your network connection has changed since you loaded the VM, it’s possible that your IP address is different from that displayed on the Learning VM splash screen. Log in to the VM via the virtualization directly (rather than SSH) and use thefacter ipaddress command the check the current address.

Some network configurations may still prevent you from accessing the Learning VM. If this is the case, you can still access the Learning VM by configuring port forwarding.

Change your VM’s network adapter to NAT, and configure port forwarding as follows:

Name   -   Protocol - HostIP -   HostPort - GuestIP - GuestPort SSH        TCP        127.0.0.1  2222                 22 HTTP       TCP        127.0.0.1  8080                 80 HTTPS      TCP        127.0.0.1  8443                 443 GRAPHITE   TCP        127.0.0.1  8090                 90 

Once you have set up port forwarding, you can use those ports to access the VM via ssh (ssh -p 2222 root@localhost) and access the Quest Guide and PE console by entering http://localhost:8080 and https://localhost:8443 in your browser address bar.

I can’t scroll up in my terminal

The Learning VM uses a tool called tmux to allow us to display the quest status. You can scroll in tmux by first hitting control-b, then [ (left bracket). You will then be able to use the arrow keys to scroll. Press q to exit scrolling.

Running the VM in VirtualBox, I encounter a series of “Rejecting I/O input from offline devices”

Reduce the VM’s processors to 1 and disable the “I/O APIC” option in the system section of the settings menu.

Still need help?

If your puppet runs still fail after trying the steps above, feel free to contact us at learningvm@puppetlabs.com or check the Puppet Enterprise Known Issues page.

Tagged : / / / / / / / / / /