Top 50 Interview questions on Configuration Management – Puppet
1. What is Puppet?
Puppet is an open source configuration management tool and produced by Puppet Labs. It’s written in Ruby and released as a free software.
2. What is the architecture of Puppet?
Puppet is Open Source software. It is based on Client-server architecture. It is a Model-Driven system. The client is also called an Agent. And the server is called the Master.
It has the following architectural components:-
Configuration Language: Puppet provides a language that’s wont to configure Resources. We have to specify what Action has got to be applied to which Resource. The Action has three items for every Resource: type, title, and list of attributes of a resource. Puppet code is written in Manifests files.
Resource Abstraction: we will create Resource Abstraction in Puppet in order that we will configure resources on different platforms. Puppet agent uses an element for passing the knowledge of an environment to the Puppet server. In Fact, we’ve information about IP, hostname, OS etc of the environment.
Transaction: Agent sends Factor to the Master server. Master sends the catalog back to Client. The agent applies any configuration changes to the system. Once all changes are applied, the results are sent to Server.
3. What are the works and uses of puppets?
Puppet defines the software and configuration your system requires and has the ability to maintain an initial set up. Puppet is a powerful configuration management tool to help system administrators and DevOps to work smart, fast, automate the configuration, provisioning, and management of a server.
4. Why is a puppet used by an organization?
Puppet is used to fulfill cloud infrastructure needs, data centers and to maintain the growth of phenomenal. It is very flexible to configure with the right machine. Puppet helps a corporation to imagine all machine properties and infrastructure.
5. What are the functions of Puppet?
Ruby is that the base development language of puppet and supports two sorts of functions are Statements and Rvalue.
There are three types of Inbuilt functions
- File function
- Include function
- Defined function
6. How is puppet useful for developers?
Puppet may be a reliable, fast, easy and automatic infrastructure to feature more servers and therefore the remake of the software during a single click. You can fully focus on productive work because it is free from repetitive tasks.
7. What is the language of the puppet?
Puppet has its language referred to as eponymous puppet available in open and commercial versions. It uses a declarative, modelAnswer:based approach for IT automation to define infrastructure as code and configuration with programs.
8. Does puppet have its programming language, why?
Yes, because it is very easy and clear to understand quick by developers
9. Which is the Puppet Main Manifest?
A Puppet program, called a manifest, features a file name that uses the “.pp” extension. Puppet’s default main manifest is /etc/puppet/manifests/site.pp.
10. What is Module and How is it different from Manifest?
The manifests we defined in modules, can call / include into the other manifests. Which makes easier management of Manifests. It helps you to push specific manifests on a selected Node or Agent.
11. What is Factor?
Sometimes you would like to write down manifests on conditional expression supported agent-specific data which is out there through Factor. Factor provides information like Kernel version, Dist release, IP Address, CPU info, etc. You can define your factor also.
12. What is Puppet Kick?
By default Puppet Agent requests a Puppet Master after a periodic time which was known as “run interval”. Puppet Kick may be a utility which allows you to trigger Puppet Agent from Puppet Master.
13. What is MCollective?
MCollective is a powerful orchestration framework. Using existing plugins or writing your own, It runs actions on thousands of servers simultaneously.
14. Can Puppet manage workstations?
Yes, Puppet can manage any machine and is employed to manage many organizations that have a mixture of laptops and desktops.
15. Does Puppet run on Windows?
Yes. As of Puppet 2.7.6 basic types and providers do run on Windows, and therefore the test suite is being run on Windows to make sure future compatibility. More information is often found on the Puppet on Windows page, and bug reports and patches are welcome.
16. What are the Commands to check requests of Certificates ?
puppetca –list (2.6)
puppet ca list (3.0)
17. What are the Commands to sign Requested Certificates ?
puppetca –sign hostname-of-agent (2.6)
puppet ca sign hostname-of-agent (3.0)
18. Where Puppet Master Stores Certificates
/var/lib/puppet/ssl/ca/signed
19. What is Facter ?
Sometimes you would like to write down manifests on conditional expression supported agent specific data which is out there through Facter. Facter provides information like Kernel version, Dist release, IP Address, CPU info, etc. You can define your facter also.
20. what’s the utilization of etckeeper-commit-post and etckeeper-commit-pre on Puppet Agent ?
etckeeper-commit-post: during this configuration file you’ll define command and scripts which execute after pushing configuration on Agente
etckeeper-commit-pre: during this configuration file you’ll define scripts and command which execute before pushing configuration on Agent
21. What are Resources in Puppet?
Resources are the elemental unit for modeling system configurations. Each resource describes some aspect of a system, sort of a specific service or package.
A resource declaration is an expression that describes the specified state for a resource and tells Puppet to feature it to the catalog. When Puppet applies that catalog to a target system, it manages every resource it contains, ensuring that the particular state matches the specified state.
22. What are Resource types in Puppet?
Every resource is related to a resource type, which determines the type of configuration it manages.
Puppet has many built-in resource types, like files, cron jobs, services, etc. It references information about the built-in resource types.
23 How can you add new resource types to Puppet?
Yes we will also add new resource types to Puppet:
Defined types are lightweight resource types written within the Puppet language.
Custom resource types are written in Ruby, and have access to the same capabilities as Puppet’s built-in types.
24. What is the speciality of model-driven design of Puppet?
Earlier, managing and configuring a very huge number of computer groups that was done in a series of steps. This design was used earlier with the series of steps turned out to be sophisticated as the time passed. So, Puppet took a special path by modelling all things. Every node about the relations and resources receives a catalogue. The node compares the catalog with the system state at present. Then, the required changes are made for leading the system into order and compliance.
25. Name the two versions of the puppet? Define
- Open source puppet – It manages the configuration of UnixAnswer: just like the Microsoft windows system. It is a free version to modify and customize.
- Puppet enterprise – Ability to manage all the IT applications, infrastructure and supply a strong based solution for automating anything.
26. What is configuration management?
Configurations management handles the changes systematically to confirm the system design and built state. It also maintains the system integrity and accurate historical records of system state for audit purposes and management of the project.
27. How do puppet slaves and masters communicate?
First slave sends the request for the master certificate to sign in and then the master approves the request and sends it to the slave and slave certificate too. Now the slave will approve the request. After completing all the formalities, the date is exchanged very securely between two parties.
28. What is Node?
It is a block of puppet code included in matching nodes catalogs which permit assigning configurations to specific nodes.
29. In puppet, what is the stand-alone architecture?
Every node that’s managed has the whole copy of the data of configuration of yours during a stand-alone architecture which may run a puppet. Every node compiles the catalogue of its own. The nodes that are managed run the appliance of Puppet Apply within the stand-alone architecture. The application of Puppet Apply is usually run as a task that’s scheduled. It could even be run on demand for little tasks of configuration. The Puppet Apply applications are often run on demand for configuring a server within the starting. For the compilation of a catalogue for nodes that are managed by Puppet Apply, it requires access into some of the configuration data’s sources.
30. Where are blocks of Puppet code stored?
Blocks are referred to as the classes of puppet code and are stored on modules to use later and may be applied only by a reputation .can be applied only by a name.
31 How to check the requests of Certificates from the puppet agent to puppet master?
- puppet cert list
- Puppet cert sign <Hostname of agent>
- Puppet cert sign all
32. How can you upgrade Puppet and Facter?
The package management system of an operating system is the best approach for installation and upgrading Puppet and Facter. You can use either the repository of your vendor or a public repository in Puppet Lab. In cases of installation of Puppet from source, make sure to remove old versions completely before the upgrade. However, you don’t have to worry about configuration data between installation processes.
33. What do you know about Puppet Labs?
Puppet Labs is an organization that is interested in addressing the problems and issues that arise relating to the Puppet automation process. In the year 2016, the “Puppet Labs” changed to “Puppet.”
The objective of doing so was to reflect the fact that the Puppet community has a strong link with the business entity. The mission of Puppet organization is to lend support to every organization so that they can improve the software in service and serve their clients better.
34. What are permanent and temporary test environments?
Permanent test environment involves a stable group of test nodes. All the changes should be successful for integration with the production code. Test nodes in permanent test environments are smaller versions of the complete production infrastructure. Temporary test environment allows testing of a single change or group of modifications. The testing process involves a review of changes out of version control into the $codedir/environments directory. Temporary test environments have descriptive names or a commit ID from the underlying version.
35. What do you understand by module-path in Puppet?
It is one of the most popular puppet interview questions that interviewees are likely to come across during an interview. In Puppet, the puppet master server, as well as the puppet, apply command load a majority of their content from modules that are found in one or more directories.
The list or record of directories where the Puppet tool searches for modules is understood as a module path. The environment of the current node sets the module-path. module-path can also be defined as the ordered list of directories where the former directories are given priority over the latest ones.
36. What is the cache directory in Puppet?
This is one of the most frequently asked puppet interview questions that candidates will come across during the interview process. In Puppet, the cache directory is also known as ‘vardir.’ It refers to the location which contains growing and dynamic data that the Puppet tool creates in the course of the typical and normal operational activities.
Some of the data that is stored in the cache directory can be mined so that interesting analysis can be carried out. It can also be used for integrating other tools with the Puppet tool. Cache directory acts as an important component of the Puppet tool.
37. How do all of these variables, like $ operating system, get set?
The variables are all set by Factor. You can get a full listing of the available variables and their values by running factor by itself in a shell.
38. Which versions of Ruby does Puppet support?
Puppet requires an MRI Ruby interpreter. Certain versions of Ruby are tested more thoroughly with Puppet than others, and a few versions aren’t tested in the least . Run ruby –version to see the version of Ruby on your system.
Starting with Puppet 4, puppet-agent packages don’t believe the OS’s Ruby version, because it bundles its own Ruby environment. You may install puppet agents alongside any version of Ruby or on systems without installed Ruby. Likewise, Puppet Enterprise doesn’t believe the OS’s Ruby version, because it bundles its own Ruby environment. You may install PE alongside any version of Ruby or on systems without installed Ruby. The Windows installers provided by Puppet Labs don’t believe the OS’s Ruby version and may be installed alongside any version of Ruby or on systems without Ruby installed.
39.Where Puppet Master Stores Certificates?
/var/lib/puppet/ssl/ca/signed
40. What is the Module layout in Puppet?
On disk, a module is a directory tree with a specific, predictable structure:
manifests
a)files
b)templates
c)lib
d)facts
e)examples
f)spec
g)functions
h)types
41. What are the Types of plug-ins in modules of Puppet?
Puppet supports several kinds of plug-ins:
a)Custom facts (written in Ruby).External facts (executable scripts or static data).
b)Custom resource types and providers (written in Ruby).Custom functions written in Ruby.Custom functions written in the Puppet language.Custom Augeas lenses.Miscellaneous utility Ruby code used by other plug-ins.
42.How to check the installed modules in Puppet?
Use the puppet module list command to ascertain which modules you’ve got installed and which directory they’re installed in.
43.What is Hiera?
Hiera may be a key/value lookup used for separating data from Puppet code. It is Puppet’s built-in key-value configuration data lookup system.
Puppet’s strength is in reusable code. Code that serves many needs must be configurable: put site-specific information in external configuration data files, rather than in the code itself.
44.Why Puppet uses Hiera?
Puppet uses Hiera to do two things:
Store the configuration data in key-value pairsLook up what data a specific module needs for a given node during catalog compilation.This is done via:
Automatic Parameter Lookup for classes included within the catalog
Explicit lookup calls
45. What are virtual resources in Puppet?
Puppets are instruments for the specification of a particular state of a resource. However, virtual resources do not require the implementations of the specific rule for the resource. You can declare virtual resources once but can realize them repeatedly .
46.What is Puppet config?
Puppet config allows you to view and alter Puppet’s settings.
47.What does Puppet apply?
Puppet-apply manage systems without needing to contact a Puppet master server. It compiles its own catalog configuration, using various other data sources and Puppet modules, then immediately applies the catalog.
48 What is Puppet Lint?
Puppet code is tested by puppet-lint. puppet-lint is approved Contrary to the puppet language style guide. The code style is proved by puppet-lint. But the syntax is not proved. The command of puppet “puppet parser validate” is employed for evaluating syntax.
49. Define the Facts of puppet?
When the representative appeals to a manager. Then first the representative assembles each detail of the record on my own as the combination of key value. With the help of Facter, all the details of the representative are collected.
50. Define the classes of Puppet?
A group of puppet capabilities packed up in a single unit is called puppet classes. The classes are for the framework to use again in order. Classes are announced a single time with a single name and should be different.