Skip to content
Snippets Groups Projects
Verified Commit d57a25b3 authored by anarcat's avatar anarcat
Browse files

review the ENC documentation

 * change the section title to the long form so it is more readable
   from the table of contents (TOC), even if you don't know the
   acronym (which is still included)

 * start by more explicitely saying what we use the ENC for, not how
   it works (which we still keep)

 * try to use the active form more (e.g. "Puppet pulls elements"
   instead of "It can be used by Puppet to define elements")

 * use `code` style for variables

 * be more explicit about role::foo

 * use the more commonly use `tor-puppet.git` root instead of
   `/etc/puppet`, because the latter is not explicit, and might hint
   that users should edit it directly on the server (which is
   definitely not the case)
parent 5235127e
No related branches found
No related tags found
No related merge requests found
......@@ -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
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.
It can be used on the Puppet server to define three elements about
nodes:
* **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`
parameter and unique role classes.
These elements are defined in `/etc/puppet/hiera-enc/nodes/$fqdn.yaml`.
### External Node Classifier (ENC)
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.
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 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. 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.
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment