Puppet is a popular configuration management tool that is widely used by the IT industries. This is possible that your skills may be evaluated for the tool when you appear for DevOps interview. So, in this blog, we will discuss puppet tricky interview questions answers that are frequently asked by fresher and experienced. No surprise, the question series would start with tool introduction then it will be little technical in later sections.
Puppet is a wonderful configuration management tool that is generally required to automate the administration tasks. It is based on master-slave architecture. Let us see how master and slave communicate together. Slave first had to send signing request for the master certificate. Master will approve the request and it will send the master certificate to slave and also it will send the request for slave certificate too. In the next step, the slave will approve the request and it will send slave certificate to master. Once all authentication formalities are complete, data will be exchanged between two parties securely. The same structure is shown in the image as well how puppet slave and puppet master communicated together.
The puppet slave sends the facts details to the puppet master and the facts details include mainly operating system, IP address, either it is a virtual machine or not etc. The Puppet Master would analyze the fact details and it will decide how slave machine should be configured.
Also, there would be a well-defined document that will describe the state of each resource assigned to the slave by Puppet Master. As soon as the configuration is complete, the message will be displayed on the dashboard.
Before we list the tricky questions for Puppet, let us describe the Puppet manifests first. Every node in puppet has certain configuration details that are defined in the native programming language. These details are termed as manifests in Puppet that are composed of code and file name extension etc. Instead of explaining everything, it is said by developers to write a manifest in Puppet and install apache on Puppet agents.
A puppet module is a combination of manifests, facts, and all other important data having a specific data structure. Modules are used to organize the puppet manifests as they divide the code logically and execute them one by one. At the same time, the details are termed as manifests in Puppet that are composed of code and file name extension like ‘. Pp’ etc.
Facter is a library that reports and discovers the facts details and send them to the puppet master. The facts details may include the operating system, SSH keys, IP address, MAC addresses, either it is a virtual machine or not etc. Further, these facts are made available as variables in puppet manifest.
When a node is configured, puppet agent uses a document that is termed as the Catalog and it can be downloaded from the Puppet Master. It will show the state of each resource that will be managed in a specific order. The data stored in Puppet Catalog is driven by three facts –
No, this is not true but every organization can be benefitted from Puppet instead of their sizes. The main objective of Puppet is to manage or configure a plenty of servers together. If there is some organization having multiple servers and they are almost impossible to manage manually then the role of Puppet comes into picture here.
Yes, I know. Here are the commands that are used to sign the request certificates for master-slave authentication. These commands are used by the puppet slave.
Puppetca –list (2.6) Puppet ca list (3.0)
Below, are the commands that are used by the puppet master to sign the requested certificates by puppet agent.
Puuetca –sign hostname-of-agent (2.6) Puppet ca sign hostname-of-agent (3.0)
The next interesting command would tell you about the location where signed certifications are stored.
Traditionally, managing and configuring multiple computers together was a tedious task and it was done by administrator alone. With the technical advancements, the process was made little easier but still, the root problems were the same. This is the reason why puppet like tools came into existence to easy the configuration task.
Puppet uses a unique approach where it models everything like the present state of the node, the configuration details, SSH keys, modules, Catalog etc. The major benefits of the tool are that complete configuration details are stored securely, even in case of failure, same system state would be generated again later. The task of the user is to parse the store data and add more significant details whenever needed.
Puppet uses its programming language as it is more declarative and can be quickly understood by developers. At the same time, XML, YAML, and Ruby had a tough human interface and it may be difficult for developers to write configuration files in these programming languages.
Yes, the puppet is useful in that case too. All servers are unique and similar in some ways. You just have to analyze the details completely like operating system, configuration details, security setting etc. Note the similar things in one file and unique details into another file. Write Puppet manifests accordingly to automate the administration tasks together in a single pass. Each of the fact details is defined as the variables in the configuration file and they can be used further to handle the uniqueness.
The operating system package management system can be used to upgrade the Facter and Puppet. I have done in the same way for my past projects too. When you are updating Puppet then make sure old versions are deleted completely and they are replaced with the fresh ones.
A number of versions of Ruby have been tested with Puppet and reports are prepared by experts accordingly. Run ruby -version command on your system either a particular version is compatible with Puppet or not. You can enjoy certain plug-ins too to support the functionality of Ruby over Puppet.
Yes, Puppet can be made more powerful with the help of certain community or open source tools. For example, you can use Git, Jenkins or many other DevOps tools to support continuous integration or other features in Puppet.
Yes, I have used the Puppet to resolve the conflicts within a team. Here an example is given below for the same based on my past experiences –
The team wanted to configure Tom apache on different serves manually with more manpower or resources but there was not enough time or resources to complete the task within decide time frame. Here, the role of Puppet came into the picture where the tool was used to configure Apache Tom on all servers together in a single pass. There was just need to write manifests or code files that will be executed to install the server on different machines together. Also, the conflicts between team members were resolved nicely.
Once you will prepare all above questions for your next interview then your selection is not far away from you. We wish you luck for your future interviews in advance and make sure you will be selected soon by preparing all these questions deeply. Further, if you are interested in mastering the Puppet skills in depth then join the DevOps certification program at JanBask Training right away.
A dynamic, highly professional, and a global online training course provider committed to propelling the next generation of technology learners with a whole new way of training experience.
Receive Latest Materials and Offers on DevOps Course