Questions tagged [puppet]

For questions about Puppet, a Ruby based configuration management system.

Puppet (software)

https://en.wikipedia.org/wiki/Puppet_(software)

https://github.com/puppetlabs/puppet

https://puppet.com

Overview

Puppet is designed to manage the configuration of Unix-like and Microsoft Windows systems declaratively. The user describes system resources and their state, either using Puppet's declarative language or a Ruby DSL (domain-specific language). This information is stored in files called "Puppet manifests". Puppet discovers the system information via a utility called Facter, and compiles the Puppet manifests into a system-specific catalog containing resources and resource dependency, which are applied against the target systems. Any actions taken by Puppet are then reported.

Puppet consists of a custom declarative language to describe system configuration, which can be either applied directly on the system, or compiled into a catalog and distributed to the target system via client–server paradigm (using a REST API), and the agent uses system specific providers to enforce the resource specified in the manifests. The resource abstraction layer enables administrators to describe the configuration in high-level terms, such as users, services and packages without the need to specify OS specific commands (such as rpm, yum, apt).

Puppet is model-driven, requiring limited programming knowledge to use.

Puppet comes in two flavors, Puppet Enterprise and Open Source Puppet. In addition to providing functionalities of Open Source Puppet, Puppet Enterprise also provides GUI, API and command line tools for node management.

Architecture

Puppet usually follows client-server architecture. The client is known as agent and the server is known as master. It can also be used as a stand-alone application.

Puppet Master is installed on one or more servers and the systems that need to be configured install Puppet Agent. Puppet Agents communicate with the server and fetch configuration instructions. The Agent then applies the configuration on the system and sends the status report to the server. Devices can run Puppet Agent as a daemon, that can be triggered periodically as a cron job or can be run manually whenever needed.

Puppet architecture consists of:

Configuration language: In Puppet, items to be configured are termed as ‘resources’. Since Puppet follows declarative language, it just needs to specify ‘what’ action needs to be performed on the resources. The action is implemented by declaring three things for every resource: its type, title and a list of attributes whose state needs to be configured. Puppet code is written into files called Manifests. These are stored on the server and contain configuration instructions for each client.[6] The format for writing manifest files is stated below.

type { 'title':
  attribute => value
}

Example:

user { 'harry':
  ensure => present,
  uid    => '1000',
  shell  => '/bin/bash',
  home   => '/var/tmp'
}

Resource abstraction: Puppet provides resource abstraction by providing the ability to configure resources on different platforms without worrying about the platform dependencies. For example, if an user wants to install a package on three different platforms then they don't have to worry about the required package type of given platform and its dependencies, Puppet takes care of it by using Facter. Facter is the piece of information which agents provide to the server describing what kind of operating system is being used, their IP, hostname, etc. Indirectly, it is a way of informing Puppet as to what procedure needs to be followed for software configuration in its case; depending on the facts being rendered by Facter. For any given type of resource, there are a number of providers. Providers have package management tools corresponding to different platforms/operating systems. These providers define how resources have to be managed.

Transaction: Following are the steps of execution:

  1. Every agent send across Facter to master.
  2. Puppet maintains a graphical representation of the list of resources and their interdependencies; depicting the order in which they need to be configured in a ‘catalog’ for every client. Master sends this catalog to the client.
  3. Configuration already present on the system is known as actual state and the configuration mentioned in manifest file is known as desired state. Agent applies configuration on the system only when actual state is not same as desired state. The clause of applying a state change only if needed is called as ‘idempotency’, which is the key feature of Puppet.
  4. The result of the applying the configuration is sent across to the server.

(source: Wikipedia)

21 questions
21
votes
3 answers

What are the limitations of Puppet in comparison to Ansible?

I would like to understand the differences between Puppet and Ansible, especially what kind of Puppet limitations has in comparison to Ansible. Are there any things you cannot do it in Puppet, but you can in Ansible? In other words, why some people…
kenorb
  • 8,011
  • 14
  • 43
  • 80
7
votes
1 answer

Does Ansible have component akin to PuppetDB?

I know Puppet from (limited) experience and have noticed that in configuration management there is now a strong trend towards Ansible. On the one hand, I understand that Ansible does not require an agent, because it makes intelligent use of ssh. On…
Drux
  • 173
  • 4
6
votes
3 answers

What are some clear benefits of running master/agent configuration management?

Ansible seems to have a clear advantage over competition like chef and puppet because it is agent-less and saves a certain degree of overhead. I have read several comparisons of the various configuration tools and while each tool has its own…
Wings
  • 203
  • 1
  • 7
6
votes
1 answer

What can Vagrant, Puppet, Docker, Chef do for a Full stack Web developer?

First of all let me say that I'm aware of related questions here in SO: Vagrant, Docker, Puppet, Chef Vagrant + puppet + docker chef-server - chef-solo - vagrant - puppet... which is correct for me? Or articles out…
user652
5
votes
0 answers

Check Out / Check In System for Floating Licenses

I'm trying to manage multiple floating licenses (e.g. Oracle Database) from a master configuration server using a pull model. Normally I use Puppet to handle configuration stuff like this, but I'm having trouble finding any info on managing floating…
Datajager
  • 51
  • 1
3
votes
1 answer

Tool preferences for rapidly spinning up and spinning down k8s clusters

My team hosts several completely different projects on a production k8s cluster with a given configuration. We use AWS (and are starting to use Google Cloud). We have a QA cluster as well, that "sort of" mimics the production configuration, and has…
swagrov
  • 131
  • 1
3
votes
1 answer

What is the best way to do REST with puppet?

I have tried making REST calls with puppet and it was... well... awful. I didn't really want to use pure ruby to interact with my load balancer and my concern was that for REST calls, every time the puppet run occurs I would be idempotently slamming…
James Shewey
  • 3,752
  • 1
  • 17
  • 38
3
votes
2 answers

What is the most used tool for Cloud Infrastructure deployment Ansible vs Puppet vs Terraform?

I have some time for research at work right now, and I was thinking on expanding my knowledge on my favorite subject, which is DevOps (love you all). I have some advanced experience with Ansible, as it has always been my choice when preparing and…
2
votes
1 answer

Puppet directory sync does not delete absent files

Repeating my question from SO.SE here ... I'm trying to have my configs directory (on Windows server 2016 node) to be synced from puppet master (puppet --version = 5.5.3) modules folder: I have my desired structure repeated under module/files.…
Drako
  • 121
  • 3
2
votes
1 answer

Can I run Chef/Puppet server from Azure and manage my on-premise infrastructure?

I would like to use Azure Chef server (or Puppet, or any other solution) from Azure to manage my infrastructure (around 25 servers and 20 desktops) wich is on-premise behind a corporate firewall. Is that possible? I tried searching for a similar…
Philippe
  • 123
  • 4
2
votes
1 answer

What Puppet modules do include best practices regarding CI and rspec-puppet like Geerlingguy's Ansible roles?

It is possible to test Puppet code using rspec-puppet, but modules that are supported by the community like NTP do not seem to run test regularly like is done for all Geerlingguy's Ansible roles, e.g. Apache. The aim is to find a Puppet module on…
030
  • 13,383
  • 17
  • 76
  • 178
1
vote
1 answer

Puppet cannot find epp template

I am attempting to use an EPP template in Puppet 6.2.0. I have the following file /etc/puppetlabs/code/modules/profile/manifests/linux/base/dns.pp : class profile::linux::base::dns { file { '/etc/resolv.conf': path => '/etc/resolv.conf', …
Sugarat
  • 21
  • 2
1
vote
1 answer

Puppet master certificate generation not working

Puppet Master: Docker container with cent-OS-6 configured in /etc/hosts configured /etc/puppet/puppet.conf with server,dns_alt_names and certname Puppet Agent: Docker container with ubuntu OS configured serverip and agent ip in…
1
vote
1 answer

When setting up Foreman should this be setup on the same server as my puppet ro ansible master?

I am trying to setup Foreman to interface with my Puppet Master and Ansible installation. Do I need to have this on the same server or can it be by itself and make API/port calls? I am new to this so I don't know.
andrewm659
  • 21
  • 1
1
vote
1 answer

IaC Deployment in Azure with Terraform + Chef vs. Puppet vs. Ansible for Data Engineers

I am an Azure Data Engineer and try to leverage the IaC benefits in this area of Azure Data Factory, Azure Databricks, Azure SQL & Synapse, Azure Power BI, Azure IoT. After some research I figured out that I need two essential parts: 1.Provisioning…
1
2