Stuart,
Yes, many of us use ENCs, though it seems to be mostly limited to larger
shops; these days many people are moving in the direction of hiera
instead. I've been using various ENCs for the past ~4 years.
There are relatively few good choices for already-written ENCs. (well,
if you just want a simple script, you can write it yourself; most of the
"ENCs" that are available provide a web interface for configuring
everything). The most popular options that I know of are Puppet
Dashboard (aka Console in Puppet Enterprise) and Foreman. The current
version of Dashboard (IMHO) has some serious issues, though PL is
actively working on them and I'm told that big improvements can be
expected. Foreman is good, solid software but does a LOT in terms of
provisioning, DNS and DHCP control, etc. as well as a lot of internal
logic about setting variables and classes, etc. so I feel that it's a
bit much if all you want is a plain-and-simple ENC.
I'm in the process of polishing up my company's internal ENC, and plan
on releasing it on github. It's a python/Django app that supports
multiple inheritance and overrides, class and parameter exclusions, and
has full support for parameterized classes and deep data structures.
That being said, I've also written ENCs in the past that were quite
simple - type in a hostname, check off some boxes for classes and
groups, and you're done.
As to samples - unfortunately, no, I don't... but you just need some
script that prints valid YAML according to the spec. Without knowing
more about how you want it to work, I can't provide much of an example.
"My current question is how do you use the ENC definitions within the
classes?"
Well, most of the ENCs I've used in the past (Puppet Dashboard included)
just return a list of classes to apply to the node, and a list of
parameters. The parameters are passed to puppet as top-scope variables.
So your ENC defines a parameter called, say, httpd_version, and
somewhere in your httpd class, you use $::httpd_version. Of course then
you really need to follow the params.pp pattern to declare a default
value, and validate what the ENC passes in. This pattern really sucks.
Lately, especially since puppet3 came out, I've been using an ENC that
supports parameterized classes. So I don't do anything special in my
classes (in fact much of what I use are modules from the Forge), and I
just tell the enc what classes I want, and the parameters that I want
passed in to them. This allows me to use many of the forge modules
(especially the puppetlabs ones) straight from my ENC.
I'd be happy to provide a bit more advice if you have more specific
questions.
-Jason
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
puppet-users...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/puppet-users/7b5670b1-8ca6-4d63-bb38-3d0e5f5bfae6%40googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.