We have seen the output of a Puppet run in Chapter 1, Puppet Essentials, now let's explore what happens behind those messages.
We can identify four main stages that turn our Puppet code in a catalog that is applied on clients:
Parsing and compiling: This is where Puppet manifests are fed to the
Puppet::Parser
class, which does basic syntax checks and produce an Abstract Syntax Tree (AST) object. This represents the same objects we defined in our manifests in a machine-friendly format. Both the facts, received from the client, and the AST are passed to the compiler. Facts and manifests are interpreted and the result converted into a tree of transportable objects: the resource catalog, commonly called catalog. This phase happens on the server unless we use thepuppet apply
command.Transport: In this phase, the Master serializes the catalog in the PSON format (a Puppet version of JSON), and sends it over HTTPS to the client. Here, it is deserialized and...