Ans: 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.
Ans: 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.
Ans: 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.
Ans: 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:
Ans: 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.
Ans: 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.
Ans: 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.
Ans: Answer to this question is pretty direct just tell the uses of the above commands:
Ans: 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 underscores, and are case-sensitive.
Ans: 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.
Ans: I will suggest you to mention the below points in your answer:
Ans: Explain about some tools that you have used along with Puppet to do a specific task. You can refer 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.
Ans: Explain them about your past experience of Puppet and how it was useful to resolve conflicts, you can refer the below mention 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.
Ans: 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:
1
2 3 4 |
$ 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.
Ans: First you need to define Virtual Resource.
Virtual Resources specifies a 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 to mention the uses of Virtual Resources as well:
Ans:
puppetca –list (2.6)
puppet ca list (3.0)
Ans:
puppetca –sign hostname-of-agent (2.6)
puppet ca sign hostname-of-agent (3.0)
Ans: /var/lib/puppet/ssl/ca/signed
Ans: etckeeper-commit-post: In this configuration file you can define command and scripts which executes after pushing configuration on Agent
Etckeeper-commit-pre: In this configuration file you can define command and scripts which executes before pushing configuration on Agent21.What is Puppet Kick ?
By default Puppet Agent request to Puppet Master after a periodic time which known as “runinterval”. Puppet Kick is a utility which allows you to trigger Puppet Agent from Puppet Master.
Ans: MCollective is a powerful orchestration framework. Run actions on thousands of servers simultaneously, using existing plugins or writing your own.
Ans: “I automated the configuration and deployment of Linux and Windows machines using Puppet. In addition to shortening the processing time from one week to 10 minutes, I used the roles and profiles paradigm and documented the purpose of each module in README to ensure that others could update the module using Git. The modules I wrote are still being used, but they’ve been improved by my teammates and members of the community.”
Ans: 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.”
Ans: 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.”