Glossary Of Terms
Version 10 (Nick Fagerlund, 02/03/2011 01:11 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 | 10 | Nick Fagerlund | : A collection of classes, resource types, files, and templates, organized around a particular purpose. See also [[Module Organisation]]. |
| 34 | 1 | ||
| 35 | 1 | **native type** |
|
| 36 | 10 | Nick Fagerlund | : A type written purely in Ruby and distributed with Puppet. Puppet can be extended with additional native types, which can be distributed to agent nodes via the pluginsync system. See the documentation for list of native types. |
| 37 | 1 | ||
| 38 | 10 | Nick Fagerlund | **node** (general noun) |
| 39 | 10 | Nick Fagerlund | : An individual server; for the purposes of discussing Puppet, this generally refers to an **agent node.** |
| 40 | 1 | ||
| 41 | 10 | Nick Fagerlund | **node** (Puppet language keyword) |
| 42 | 10 | Nick Fagerlund | : A collection of classes and/or resources to be applied to the agent node whose unique identifier ("certname") matches the specified node name. Nodes defined in manifests allow inheritance, although this should be used with care due to the behavior of dynamic variable scoping. |
| 43 | 1 | ||
| 44 | 10 | Nick Fagerlund | **parameter** (custom type and provider development) |
| 45 | 10 | Nick Fagerlund | : A value which does not call a method on a provider. Eventually exposed as an attribute in instances of this resource type. See [Custom Types](http://docs.puppetlabs.com/guides/custom_types.html). |
| 46 | 10 | Nick Fagerlund | |
| 47 | 10 | Nick Fagerlund | **parameter** (defined types and parameterized classes) |
| 48 | 10 | Nick Fagerlund | : One of the values which can be passed to this class or instances of this resource type upon declaration. Parameters are exposed as resource or class attributes. |
| 49 | 10 | Nick Fagerlund | |
| 50 | 10 | Nick Fagerlund | **parameter** (external nodes) |
| 51 | 10 | Nick Fagerlund | : A global variable returned by the external node classifier. |
| 52 | 10 | Nick Fagerlund | |
| 53 | 6 | James Turnbull | **pattern** |
| 54 | 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. |
| 55 | 6 | James Turnbull | |
| 56 | 1 | **plugin, plugin types** |
|
| 57 | 1 | : 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. |
|
| 58 | 4 | James Turnbull | |
| 59 | 1 | **plusignment operator** |
|
| 60 | 5 | James Turnbull | : An operator that allows you to add values to resource parameters using the +> ('plusignment') syntax. Available since version 0.23.1: |
| 61 | 5 | James Turnbull | |
| 62 | 5 | James Turnbull | class apache { |
| 63 | 1 | service { "apache": require => Package["httpd"] } |
|
| 64 | 1 | } |
|
| 65 | 1 | ||
| 66 | 5 | James Turnbull | class apache-ssl inherits apache { |
| 67 | 5 | James Turnbull | # host certificate is required for SSL to function |
| 68 | 5 | James Turnbull | Service[apache] { require +> File["apache.pem"] } |
| 69 | 5 | James Turnbull | } |
| 70 | 8 | Matt Robinson | |
| 71 | 10 | Nick Fagerlund | **property** (custom type and provider development) |
| 72 | 10 | Nick Fagerlund | : A value which calls a method on a provider. Eventually exposed as an attribute in instances of this resource type. See [Custom Types](http://docs.puppetlabs.com/guides/custom_types.html). |
| 73 | 1 | ||
| 74 | 1 | **provider** |
|
| 75 | 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. |
| 76 | 1 | ||
| 77 | 1 | **realize** |
|
| 78 | 4 | James Turnbull | : a Puppet term meaning to declare a virtual resource should be part of a system's catalog. See also virtual resources. |
| 79 | 1 | ||
| 80 | 1 | **resource** |
|
| 81 | 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. |
| 82 | 1 | ||
| 83 | 1 | **resource object** |
|
| 84 | 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. |
|
| 85 | 1 | ||
| 86 | 4 | James Turnbull | **resource specification** |
| 87 | 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. |
|
| 88 | 1 | ||
| 89 | 1 | **subclass** |
|
| 90 | 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: |
|
| 91 | 1 | ||
| 92 | 5 | James Turnbull | class ClassB inherits ClassA { ... } |
| 93 | 1 | ||
| 94 | 4 | James Turnbull | **templates** |
| 95 | 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. |
|
| 96 | 1 | ||
| 97 | 4 | James Turnbull | **template class** |
| 98 | 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: |
|
| 99 | 1 | ||
| 100 | 5 | James Turnbull | node mywebserver { |
| 101 | 5 | James Turnbull | include genericwebserver |
| 102 | 5 | James Turnbull | } |
| 103 | 4 | James Turnbull | |
| 104 | 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: |
| 105 | 3 | James Turnbull | |
| 106 | 5 | James Turnbull | node mywebserver { |
| 107 | 5 | James Turnbull | $web_fqdn = 'www.example.com' |
| 108 | 5 | James Turnbull | include singledomainwebserver |
| 109 | 5 | James Turnbull | } |
| 110 | 4 | James Turnbull | |
| 111 | 5 | James Turnbull | This structure maps directly to a [[External Nodes|external node classifier]] and thus enables a easy transition. |
| 112 | 1 | ||
| 113 | 1 | **type** |
|
| 114 | 4 | James Turnbull | : abstract description of a type of resource. Can be implemented as a native type, plug-in type, or defined type. |
| 115 | 1 | ||
| 116 | 1 | **variable** |
|
| 117 | 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: |
| 118 | 3 | James Turnbull | |
| 119 | 5 | James Turnbull | $myvariable = "something" |
| 120 | 1 | ||
| 121 | 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. |
| 122 | 1 | ||
| 123 | 1 | **virtual resource** |
|
| 124 | 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. |