Top Puppet Interview Questions For 2021

Vardhan NS
Edureka
Published in
9 min readJul 12, 2017

Puppet Interview Questions

Puppet is the most mature and the most widely used tool for Configuration Management. There is a high possibility that it can be a major point of discussion in your interview. So here I am with the set of frequently asked Puppet interview questions.

No surprise, In this Puppet Interview Questions article, the first question has to be:

Q1. What is Puppet?

I will advise you to first give a small definition of Puppet. Puppet is a Configuration Management tool which is used to automate administration tasks.

Now, you should describe how Puppet Master and Agent communicates.

Puppet has a Master-Slave architecture in which the Slave has to first send a Certificate signing request to the Master and the Master has to sign that Certificate in order to establish a secure connection between Puppet Master and Puppet Slave as shown on the diagram below. Puppet Slave sends a request to Puppet Master and Puppet Master then pushes configuration on Slave.

Refer to the diagram below that explains the above description:

Q2. How Puppet Works?

For this question just explain Puppet Architecture. Refer the diagram below:

The following functions are performed in the above image:

  • The Puppet Agent sends the Facts to the Puppet Master. Facts are basically key/value data pair that represents some aspect of a Slave state, such as its IP address, up-time, operating system, or whether it’s a virtual machine. I will explain Facts in detail later in the blog.
  • Puppet Master uses the facts to compile a Catalog that defines how the Slave should be configured. Catalogis a document that describes the desired state for each resource that the Puppet Master manages on a Slave. I will explain catalogs and resources in detail later.
  • Puppet Slave reports back to Master indicating that Configuration is complete, which is visible in the Puppet dashboard.

Now the interviewer might dig in deep, so the next set of Puppet interview questions will test your knowledge about various components of Puppet.

Q3. What are the Puppet Manifests?

It is a very important question and just make sure you go in a correct flow according to me you should first define Manifests.

Every node (or Puppet Agent) has got its configuration details in Puppet Master, written in the native Puppet language. These details are written in the language which Puppet can understand and are termed as Manifests. Manifests are composed of Puppet code and their filenames use the .pp extension.

Now give an example, you can write a manifest in Puppet Master that creates a file and installs apache on all Puppet Agents (Slaves) connected to the Puppet Master.

Q4. What is Puppet Module and How it is different from Puppet Manifest?

For this answer I will prefer the below-mentioned explanation:

A Puppet Module is a collection of Manifests and data (such as facts, files, and templates), and they have a specific directory structure. Modules are useful for organizing your Puppet code because they allow you to split your code into multiple Manifests. It is considered best practice to use Modules to organize almost all of your Puppet Manifests.

Puppet programs are called Manifests. Manifests are composed of Puppet code and their file names use the .pp extension.

Q5. What is Facter in Puppet?

You are expected to answer what exactly Facter does in Puppet so, according to me you should start by explaining:

Facter is basically a library that discovers and reports the per-Agent facts to the Puppet Master such as hardware details, network settings, OS type and version, IP addresses, MAC addresses, SSH keys, and more. These facts are then made available in Puppet Master’s Manifests as variables.

Q6. What is Puppet Catalog?

I will suggest you to first, tell the uses of Puppet Catalog.

When configuring a node, Puppet Agent uses a document called a catalog, which it downloads from a Puppet Master. The catalog describes the desired state for each resource that should be managed, and may specify dependency information for resources that should be managed in a certain order.

If your interviewer wants to know more about it mention the below points:

Puppet compiles a catalog using three main sources of configuration info:

  • Agent-provided data
  • External data
  • Puppet manifests

Q7. What size organizations should use Puppet?

There is no minimum or maximum organization size that can benefit from Puppet, but there are sizes that are more likely to benefit. Organizations with only a handful of servers are unlikely to consider maintaining those servers to be a real problem, Organizations with many servers are more likely to find, difficult to manage those servers manually so using Puppet is more beneficial for those organizations.

Q8. How should I upgrade Puppet and Facter?

The best way to install and upgrade Puppet and Facter is via your operating system’s package management system, using either your vendor’s repository or one of Puppet Labs’ public repositories.

If you have installed Puppet from source, make sure you remove old versions entirely (including all application and library files) before upgrading. Configuration data (usually located in/etc/puppet or /var/lib/puppet, although the location can vary) can be left in place between installs.

The next set of Puppet Interview Questions will test your experience with Puppet.

Q9. What is the Command to check requests of Certificates from Puppet Agent (Slave) to Puppet Master?

According to me, you should mention the command first.

To check the list of Certificate signing requests from Puppet Agent to Puppet Master execute puppet cert list command in Puppet Master.

I will advise you to also add:

If you want to sign a particular Certificate execute: puppet cert sign <Hostname of agent>. You can also sign all the Certificates at once by executing: puppet cert sign all.

Q10. What is the use of etckeeper-commit-post and etckeeper-commit-pre on Puppet Agent?

The answer to this question is pretty direct just tell the uses of the above commands:

  • etckeeper-commit-post: In this configuration file you can define command and scripts which execute after pushing configuration on Agent.
  • etckeeper-commit-pre: In this configuration file you can define command and scripts which execute before pushing configuration on Agent.

I hope you have enjoyed the above set of Puppet interview questions, the next set of questions will be more challenging, so be prepared.

Q11. What characters are permitted in a class name? In a module name? In other identifiers?

I will advise you to answer this by mentioning the characters:

Class names can contain lowercase letters, numbers, and underscores, and should begin with a lowercase letter. “::” (Scope Resolution Operator) can be used as a namespace separator.

The same rules should be used when naming defined resource types, modules, and parameters, although modules and parameters cannot use the namespace separator.

Variable names can include alphanumeric characters and underscore, and are case-sensitive.

Q12. Does Puppet runs on windows?

Yes. As of Puppet 2.7.6 basic types and providers do run on Windows, and the test suite is being run on Windows to ensure future compatibility.

Q13. Which version of Ruby does Puppet support?

I will suggest you mention the below points in your answer:

  • Certain versions of Ruby are tested more thoroughly with Puppet than others, and some versions are not tested at all. Run ruby -version to check the version of Ruby on your system.
  • Starting with Puppet 4, Puppet Agent packages do not rely on the OS’s Ruby version, as it bundles its own Ruby environment. You can install puppet-agent alongside any version of Ruby or on systems without Ruby installed.
  • Puppet Enterprise (PE) also does not rely on the OS’s Ruby version, as it bundles its own Ruby environment. You can install PE alongside any version of Ruby or on systems without Ruby installed.
  • The Windows installers provided by Puppet Labs don’t rely on the OS’s Ruby version and can be installed alongside any version of Ruby or on systems without Ruby installed.

Q14. Which open source or community tools do you use to make Puppet more powerful?

Explain about some tools that you have used along with Puppet to do a specific task. You can refer to the below example: Changes and requests are ticketed through Jira and we manage requests through an internal process. Then, we use Git and Puppet’s Code Manager app to manage Puppet code in accordance with best practices. Additionally, we run all of our Puppet changes through our continuous integration pipeline in Jenkins using the beaker testing framework.

Q15. Tell me about a time when you used collaboration and Puppet to help resolve a conflict within a team?

Explain to them about your past experience of Puppet and how it was useful to resolve conflicts, you can refer the below mentioned example:

The development team wanted root access on test machines managed by Puppet in order to make specific configuration changes. We responded by meeting with them weekly to agree on a process for developers to communicate configuration changes and to empower them to make many of the changes they needed. Through our joint efforts, we came up with a way for the developers to change specific configuration values themselves via data abstracted through Hiera. In fact, we even taught one of the developers how to write Puppet code in collaboration with us.

Q16. Can I access environment variables with Facter in Puppet?

I will suggest you to start this answer by saying:

Not directly. However, Facter reads in custom facts from a special subset of environment variables. Any environment variable with a prefix of FACTER_ will be converted into a fact when Facter runs.

Now explain the interviewer with an example:

$ FACTER_FOO="bar"
$ export FACTER_FOO</span>
$ facter | grep 'foo'</span>
foo => bar

The value of the FACTER_FOO environment variable would now be available in your Puppet manifests as $foo, and would have a value of ‘bar’. Using shell scripting to export an arbitrary subset of environment variables as facts is left as an exercise for the reader.

Q17. What is the use of Virtual Resources in Puppet

First, you need to define Virtual Resource.

Virtual Resources specifies the desired state for a resource without necessarily enforcing that state. Although virtual resources can only be declared once, they can be realized any number of times.

I will suggest you mention the uses of Virtual Resources as well:

  • Resources whose management depends on at least one of multiple conditions being met.
  • Overlapping sets of resources that might be needed by any number of classes.
  • Resources that should only be managed if multiple cross-class conditions are met.

Once you are prepared with the above Puppet interview questions your dream job is not far.

This is the end of my article on Nagios interview questions. If you wish to check out more articles on the market’s most trending technologies like Artificial Intelligence, Python, Ethical Hacking, then you can refer to Edureka’s official site.

Do look out for other articles in this series which will explain the various other aspects of DevOps.

1. DevOps Tutorial

2. Git Tutorial

3. Jenkins Tutorial

4. Docker Tutorial

5. Ansible Tutorial

6. Puppet Tutorial

7. Chef Tutorial

8. Nagios Tutorial

9. How To Orchestrate DevOps Tools?

10. Continuous Delivery

11. Continuous Integration

12. Continuous Deployment

13. Continuous Delivery vs Continuous Deployment

14. CI CD Pipeline

15. Docker Compose

16. Docker Swarm

17. Docker Networking

18. Ansible Vault

19. Ansible Roles

20. Ansible for AWS

21. Jenkins Pipeline

22. Top Docker Commands

23. Git vs GitHub

24. Top Git Commands

25. DevOps Interview Questions

26. Who Is A DevOps Engineer?

27. DevOps Life cycle

28. Git Reflog

29. Ansible Provisioning

30. Top DevOps Skills That Organizations Are Looking For

30.Waterfall vs Agile

31. Jenkins CheatSheet

32. Ansible Cheat Sheet

33. Ansible Interview Questions And Answers

34. 50 Docker Interview Questions

35. Agile Methodology

36. Jenkins Interview Questions

37. Git Interview Questions

38. Docker Architecture

39. Linux commands Used In DevOps

40. Jenkins vs Bamboo

41.Nagios Tutorial

42. Nagios Interview Questions

43.DevOps Real-Time Scenarios

44.Difference between Jenkins and Jenkins X

45.Docker for Windows

46.Git vs Github

Originally published at https://www.edureka.co on July 12, 2017.

--

--