Interview Questions.

Puppet Interview Questions and Answers

fluid

Puppet Interview Questions and Answers

Q1. What is Puppet ?

Ans: Puppet  is a  configuration Tool which is locate to automate management responsibilities.Puppet Agent(Client) sends request to Puppet Master (Server) and Puppet Master Push Configuration on Agent.

Q2.What are Puppet Manifests?

Ans: It is a very critical query and simply ensure you cross in a correct glide according to me you must first outline Manifests.

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

Now give an instance, you may write a appear in Puppet Master that creates a report and installs apache on all Puppet Agents (Slaves) connected to the Puppet Master.

Q3. What is Puppet Module and How it's far distinctive from Puppet Manifest?

Ans: For this answer I will select the below mentioned rationalization:

A Puppet Module is a group of Manifests and facts (which include records, documents, and templates), and that they have a specific listing shape. Modules are useful for organizing your Puppet code, because they let you cut up your code into a couple of Manifests. It is taken into consideration first-class exercise to apply Modules to organize almost all your Puppet Manifests.

Puppet programs are referred to as Manifests. Manifests are composed of Puppet code and their document names use the .Pp extension.

Q4. What is Facter in Puppet?

Ans: You are anticipated to answer what precisely Facter does in Puppet so, in step with me you must start by explaining:

Facter is largely a library that discovers and reviews the per-Agent records to the Puppet Master including hardware information, network settings, OS type and version, IP addresses, MAC addresses, SSH keys, and extra. These information are then made to be had in Puppet Master’s Manifests as variables.

Q5. What is Puppet Catalog?

Ans: I will recommend you to first, tell the makes use of of Puppet Catalog.

When configuring a node, Puppet Agent makes use of a record called a catalog, which it downloads from a Puppet Master. The catalog describes the desired state for every useful resource that ought to be controlled, and might specify dependency data for resources that should be controlled in a certain order.

If your interviewer wants to realize more approximately it mention the under factors:

Puppet compiles a catalog the usage of 3 foremost resources of configuration data:

Agent-furnished records

External information

Puppet manifests

Q6. What length companies ought to use Puppet?

Ans: There is not any minimum or maximum enterprise length that may advantage from Puppet, however there are sizes which might be more likely to gain. Organizations with most effective a handful of servers are unlikely to recall keeping those servers to be a real problem, Organizations with many servers are much more likely to locate, difficult to control those servers manually so the usage of Puppet is more beneficial for those groups.

Learn greater about Puppet 

Q7. How should I upgrade Puppet and Facter?

Ans: The first-rate manner to put in and improve Puppet and Facter is thru your working machine’s package deal control machine, the use of either your dealer’s repository or one in all Puppet Labs’ public repositories.

If you've got set up Puppet from supply, ensure you take away vintage versions entirely (including all utility and library documents) earlier than upgrading. Configuration data (generally located in/and so forth/puppet or /var/lib/puppet, even though the place can vary) may be left in place between installs.

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

Ans: According to me you should point out the command first.

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

I will suggest you to also upload:

If you need to signal a particular Certificate execute: puppet cert sign <Hostname of agent>. You can also sign all of the Certificates immediately by using executing: puppet cert signal all.

Q9. What is using etckeeper-commit-publish and etckeeper-dedicate-pre on Puppet Agent?

Ans: Answer to this question is pretty direct just tell the uses of the above instructions:

etckeeper-dedicate-submit: In this configuration report you can outline command and scripts which executes after pushing configuration on Agent.

Etckeeper-dedicate-pre: In this configuration record you may define command and scripts which executes before pushing configuration on Agent.

Q10. What characters are accepted in a class call? In a module call? In other identifiers?

Ans: I will suggest you to reply this by using citing the characters:

Class names can comprise lowercase letters, numbers, and underscores, and have to start with a lowercase letter. “::” (Scope Resolution Operator) can be used as a namespace separator.

The equal guidelines should be used whilst naming defined resource sorts, modules, and parameters, even though modules and parameters can not use the namespace separator.

Variable names can consist of alphanumeric characters and underscores, and are case-sensitive.

Q11. Does Puppet runs on home windows?

Ans: Yes. As of Puppet 2.7.6 simple kinds and carriers do run on Windows, and the check suite is being run on Windows to ensure future compatibility.

Q12. Which version of Ruby does Puppet help?

Ans: I will endorse you to mention the underneath factors in your answer:

Certain versions of Ruby are examined extra thoroughly with Puppet than others, and some versions are not examined in any respect. Run ruby –version to test the model of Ruby in your gadget.

Starting with Puppet 4, Puppet Agent programs do now not depend upon the OS’s Ruby model, because it bundles its very own Ruby surroundings. You can installation puppet-agent alongside any model of Ruby or on structures without Ruby mounted.

Puppet Enterprise (PE) additionally does no longer rely on the OS’s Ruby version, because it bundles its personal Ruby surroundings. You can set up PE along any model of Ruby or on systems without Ruby installed.

The Windows installers provided by way of Puppet Labs don’t depend on the OS’s Ruby model, and may be installed alongside any version of Ruby or on systems with out Ruby installed.

HubSpot Video
 

Q13. Which open supply or community gear do you operate to make Puppet more effective?

Ans: Explain approximately a few equipment which you have used at the side of Puppet to do a specific project. You can refer the under example:

Changes and requests are ticketed via Jira and we manipulate requests thru an internal procedure. Then, we use Git and Puppet’s Code Manager app to control Puppet code in accordance with satisfactory practices. Additionally, we run all of our Puppet changes through our non-stop integration pipeline in Jenkins using the beaker testing framework.

Q14. Tell me approximately a time whilst you used collaboration and Puppet to help remedy a conflict within a team?

Ans: Explain them about your beyond enjoy of Puppet and how it changed into beneficial to remedy conflicts, you may refer the underneath point out instance:

The development team desired root access on check machines managed by Puppet in order to make particular configuration adjustments. We responded by way of meeting with them weekly to agree on a system for builders to talk configuration changes and to empower them to make among the changes they wished. Through our joint efforts, we got here up with a way for the developers to change particular configuration values themselves thru records abstracted thru Hiera. In reality, we even taught one of the developers the way to write Puppet code in collaboration with us.

Q15. Can I get right of entry to surroundings variables with Facter in Puppet?

Ans: I will endorse you to begin this solution via saying:

Not without delay. However, Facter reads in custom information from a unique subset of surroundings variables. Any environment variable with a prefix of FACTER_ may be transformed right into a reality whilst Facter runs.

Now explain the interviewer with an example:

1

2

three

4

$ FACTER_FOO=”bar”

$ export FACTER_FOO</span>

$ facter value of the FACTER_FOO environment variable might now be to be had to your Puppet manifests as $foo, and might have a value of ‘bar’. Using shell scripting to export an arbitrary subset of environment variables as statistics is left as an exercising for the reader.

Q16. What is using Virtual Resources in Puppet

Ans: First you need to define Virtual Resource.

Virtual Resources specifies a preferred nation for a resource with out always implementing that kingdom. Although digital assets can most effective be declared once, they may be realized any range of times.

I will propose you to mention the uses of Virtual Resources as properly:

Resources whose control relies upon on as a minimum one of a couple of situations being met.

Overlapping sets of resources which is probably wanted by using any range of instructions.

Resources which ought to most effective be controlled if more than one cross-magnificence conditions are met.

Q17. Command to test requests of Certificates ?

Ans:

puppetca –listing (2.6)

puppet ca listing (3.Zero)

Q18. Command to signal Requested Certificates

Ans:

puppetca  –sign hostname-of-agent (2.6)

puppet ca  signal hostname-of-agent (3.0)

Q19. Where Puppet Master Stores Certificates

Ans: /var/lib/puppet/ssl/ca/signed

Q20.What is the use of etckeeper-devote-submit and etckeeper-devote-pre on Puppet Agent ?

Ans: etckeeper-dedicate-post: In this configuration record you can define command and scripts which executes after pushing configuration on Agent

Etckeeper-dedicate-pre: In this configuration document you could outline command and scripts which executes earlier than 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 application which allows you to cause Puppet Agent from Puppet Master.

Q22.What is MCollective ?

Ans: MCollective is a powerful orchestration framework. Run actions on thousands of servers simultaneously, the use of current plugins or writing your very own.

Q23.Describe the most full-size advantage you made from automating a manner via Puppet?

Ans: “I automatic the configuration and deployment of Linux and Windows machines the use of Puppet. In addition to shortening the processing time from one week to ten mins, I used the roles and profiles paradigm and documented the motive of each module in README to make sure that others could replace the module the use of Git. The modules I wrote are nevertheless being used, however they’ve been stepped forward by means of my teammates and members of the community.”

Q24.Tell me approximately a time while you used collaboration and Puppet to assist resolve a conflict within a crew?

Ans: The improvement crew desired root access on check machines controlled by Puppet if you want to make particular configuration changes. We responded through assembly with them weekly to agree on a technique for developers to speak configuration adjustments and to empower them to make many of the modifications they needed. Through our joint efforts, we got here up with a manner for the developers to trade unique configuration values themselves through facts abstracted via Hiera. In reality, we even taught one of the developers how to write Puppet code in collaboration with us.”

Q25.Which open source or community gear do you operate to make Puppet more powerful?

Ans: Changes and requests are ticketed through Jira and we control requests through an internal manner. Then, we use Git and Puppet’s Code Manager app to manipulate Puppet code according with first-class practices. Additionally, we run all of our Puppet adjustments through our non-stop integration pipeline in Jenkins the use of the beaker testing framework.”




CFG