Commit db7eb1cb authored by anarcat's avatar anarcat
Browse files

Merge branch 'enc-edits' into 'master'

review the ENC documentation

See merge request tpo/tpa/wiki-replica!19
parents 5235127e d57a25b3
Loading
Loading
Loading
Loading
+27 −22
Original line number Diff line number Diff line
@@ -1202,28 +1202,33 @@ Otherwise the style already in use in the file should be followed.
[Flycheck]: http://flycheck.org/
[vim-puppet]: https://github.com/rodjek/vim-puppet

### ENC
### External Node Classifier (ENC)

ENC stands for External Node Classifier. When implemented, as is the
case here, it causes the Puppet server to request information about
a node before its catalog is compiled.
We use an External Node Classifier (or ENC for short) to classify
nodes in different roles but also assign them environments and other
variables. The way the ENC works is that the Puppet server requests
information from the ENC about a node before compiling its catalog.

It can be used on the Puppet server to define three elements about
nodes:
The Puppet server pulls three elements about nodes from the ENC:

 * **Environment**: is the standard way to assign nodes to a
 Puppet environment. The default is `production` which is the only
 * `environment` is the standard way to assign nodes to a Puppet
   environment. The default is `production` which is the only
   environment currently deployed.
 * **Parameters**: is a hash where each key is made available as a
 top-scope variable in a node's manifests. We use this assign a unique
 role to each node. This role is in turn used to include a `role::foo`
 class which should only consist of a set of profile classes.
 * **Classes**: is an array of class names which Puppet includes
 on the target node. We are currently transitioning from this method
 of including classes on nodes (previously in Hiera) to the `role`

 * `parameters` is a hash where each key is made available as a
   top-scope variable in a node's manifests. We use this assign a
   unique "role" to each node. The way this works is, for a given role
   `foo`, a class `role::foo` will be included. That class should only
   consist of a set of profile classes.

 * `classes` is an array of class names which Puppet includes on the
   target node. We are currently transitioning from this method of
   including classes on nodes (previously in Hiera) to the `role`
   parameter and unique role classes.

These elements are defined in `/etc/puppet/hiera-enc/nodes/$fqdn.yaml`.
For a given node named `$fqdn`, these elements are defined in
`tor-puppet.git/hiera-enc/nodes/$fqdn.yaml`. Defaults can also be set
in `tor-puppet.git/hiera-enc/nodes/default.yaml`.

#### Role classes