Glossary Of Terms

Version 9 (Nick Fagerlund, 02/03/2011 12:55 am)

1 1
# Glossary of Terms
2 1
3 1
As developers have found time and time again, terminology is
4 1
critical to successful projects. The Puppet community has begun to
5 1
coalesce around certain terms found to be useful in working with
6 1
Puppet:
7 1
8 1
**catalog**
9 9 Nick Fagerlund
:   A catalog is the totality of resources, files, properties, etc, for a given system.
10 1
11 1
**class**
12 9 Nick Fagerlund
:   A native Puppet construct that defines a container of resources, such as File resources, Package resources, User resources, custom-defined resources (see also defined type), etc. A class can inherit from another class using the `inherits` keyword, and can also declare other classes.
13 1
14 9 Nick Fagerlund
**agent** or **agent node**
15 7 James Turnbull
:   An operating system instance managed by Puppet. This can be an operating system running on its own hardware or a virtual image.
16 1
17 9 Nick Fagerlund
**declare** (v.)
18 9 Nick Fagerlund
:   To state that a class or a resource should be included in a given configuration. Classes are declared with the `include` keyword or with the `class {"foo":}` syntax; resources are declared with the lowercase `file {"/tmp/bar":}` syntax.
19 1
20 9 Nick Fagerlund
**define** (v.)
21 9 Nick Fagerlund
:   To specify the contents and behavior of a class or defined resource type. 
22 5 James Turnbull
23 9 Nick Fagerlund
**defined resource type** or **defined type** (older usage: **definition**)
24 9 Nick Fagerlund
:   A Puppet resource type defined at the application level. Defined types are created in the Puppet language and are analogous to macros in some other languages. Contrast with **native type.**
25 1
26 1
**fact**
27 9 Nick Fagerlund
:   A detail or property returned by Facter. Facter has many built-in details that it reports about the machine it runs on, such as hostname. Additional facts can easily be returned by Facter (see [[Adding Facts]]). Facts are exposed to your Puppet manifests as global variables. 
28 1
29 1
**manifest**
30 4 James Turnbull
:   A configuration file written in the Puppet language. These files should have the .pp extension.
31 1
32 1
**module**
33 4 James Turnbull
:   modules are logically separate composites of resources that are then included by nodes as part of their catalog. A module may contain one or more related classes. For instance, the ssh module defines the basic ssh class that configures the ssh daemon and opens the ssh port to all Stanford IPs, and a subclass called ssh\_global that overrides the iptables settings to allow connections from any IP. See also [[Module Organisation]] .
34 1
35 1
**native type**
36 4 James Turnbull
:   A type written purely in Ruby and distributed with Puppet. See the documentation for list of native types.
37 1
38 1
**node**
39 4 James Turnbull
:   a node is any individual server, uniquely identified by their cn from the certificate, which is usually, but does not have to be, the hostname. Nodes generally inherit a template node and include additional modules as needed, generally their associate client or service class. Currently, nodes are defined in the site.pp file.
40 1
41 8 Matt Robinson
**parameter**
42 8 Matt Robinson
:   Parameters are just data that is made available to the providers when they synchronize properties.
43 8 Matt Robinson
44 6 James Turnbull
**pattern**
45 6 James Turnbull
:   colloquial community expression for a collection of manifests designed to solve an issue or manage a particular configuration item, for example an Apache pattern.
46 6 James Turnbull
47 1
**plugin, plugin types**
48 4 James Turnbull
:   a Puppet term for custom types created for Puppet at the Ruby level. These types are written entirely in Ruby and must correspond to the Puppet standards for custom-types.
49 1
50 1
**plusignment operator**
51 4 James Turnbull
:   An operator that allows you to add values to resource parameters using the +> ('plusignment') syntax. Available since version 0.23.1:
52 1
53 5 James Turnbull
    class apache {
54 5 James Turnbull
        service { "apache": require => Package["httpd"] }
55 5 James Turnbull
    }
56 1
        
57 5 James Turnbull
    class apache-ssl inherits apache {
58 5 James Turnbull
        # host certificate is required for SSL to function
59 5 James Turnbull
        Service[apache] { require +> File["apache.pem"] }
60 5 James Turnbull
    }
61 8 Matt Robinson
62 8 Matt Robinson
**property**
63 8 Matt Robinson
:   Properties model the desired state of a system.  They can be queried from the underlying system, compared, and synchronized with the desired state.
64 1
65 1
**provider**
66 4 James Turnbull
:   A simple implementation of a type; examples of package providers are dpkg and rpm, and examples of user providers are useradd and netinfo. Most often, providers are just Ruby wrappers around shell commands, and they are usually very short and thus easy to create.
67 1
68 1
**realize**
69 4 James Turnbull
:   a Puppet term meaning to declare a virtual resource should be part of a system's catalog. See also virtual resources.
70 1
71 1
**resource**
72 4 James Turnbull
:   an instantiation of a native type, plugin type, or definition such as a user, file, or package. Resources do not always directly map to simple details on the client -- they might sometimes involve spreading information across multiple files, or even involve modifying devices.
73 1
74 1
**resource object**
75 1
:   A Puppet object in memory meant to manage a resource on disk. Resource specifications get converted to these, and then they are used to perform any necessary work.
76 1
77 4 James Turnbull
**resource specification**
78 1
:   The details of how to manage a resource as specified in Puppet code. When speaking about resources, it is sometimes important to differentiate between the literal resource on disk and the specification for how to manage that resource; most often, these are just referred to as resources.
79 1
80 1
**subclass**
81 1
:   a class that inherits from another class. Subclasses are useful for expanding one logical group of resources into another similar or related group of resources. Subclasses are also useful to override values of resources. For instance, a base class might specify a particular file as the source of a configuration file to be placed on the server, but a subclass might override that source file parameter to specify an alternate file to be used. A subclass is created by using the keyword inherits:
82 1
83 5 James Turnbull
    class ClassB inherits ClassA { ... }
84 1
85 4 James Turnbull
**templates**
86 1
:   templates are ERB files used to generate configuration files for systems and are used in cases where the configuration file is not static but only requires minor changes based on variables that Puppet can provide (such as hostname). See also distributable file.
87 1
88 4 James Turnbull
**template class**
89 1
:   template classes define commonly used server types which individual nodes inherit. A well designed Puppet implementation would likely define a baseclass, which includes only the most basic of modules required on all servers at the organization. One might also have a genericwebserver template, which would include modules for apache and locally manageable apache configurations for web administrators:
90 1
91 5 James Turnbull
    node mywebserver {
92 5 James Turnbull
        include genericwebserver
93 5 James Turnbull
    }
94 4 James Turnbull
95 5 James Turnbull
Template classes can take parameters by setting them in the node or main scope. This has the advantage, that the values are already available, regardless of the number of times and places where a class is included:
96 3 James Turnbull
97 5 James Turnbull
    node mywebserver {
98 5 James Turnbull
        $web_fqdn = 'www.example.com'
99 5 James Turnbull
        include singledomainwebserver
100 5 James Turnbull
    }
101 4 James Turnbull
102 5 James Turnbull
This structure maps directly to a [[External Nodes|external node classifier]] and thus enables a easy transition.
103 1
104 1
**type**
105 4 James Turnbull
:   abstract description of a type of resource. Can be implemented as a native type, plug-in type, or defined type.
106 1
107 1
**variable**
108 4 James Turnbull
:   variables in Puppet are similar to variables in other programming languages. Once assigned, variables cannot be reassigned within the same scope. However, within a sub-scope a new assignment can be made for a variable name for that sub-scope and any further scopes created within it:
109 3 James Turnbull
110 5 James Turnbull
    $myvariable = "something"
111 1
112 5 James Turnbull
Note that there are certain seemingly built-in variables, such as $hostname. These variables are actually created by Facter. Any fact presented by Facter is automatically available as a variable for use in Puppet.
113 1
114 1
**virtual resource**
115 4 James Turnbull
:   a Puppet term for an resource that is defined but will not be made part of a system's catalog unless it is explicitly realized. See also realize.