Feature #832
parameterized class support
| Status: | Closed | Start: | 04/12/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | % Done: | 100% |
||
| Category: | Puppet integration | |||
| Target version: | 1.1 | |||
| Backlog: | No | Difficulity: | ||
| Votes: | 18 (View) |
Description
http://projects.puppetlabs.com/issues/5045 is the ticket for this.
Basically I think the UI should be updated so that when you select a class it either gives you the parameters directly below or creates new boxes (like the existing parameters one) below that list:
Class name:
Parameter name [ box to type in ]
Parameter name 2 [ box to type in ]
Related issues
| related to Foreman - Feature #1165: Host details should display inherited hostgroup parameter | Closed | 09/13/2011 | ||
| related to Foreman - Feature #1028: Ability to edit custom fields in the host edit page | Closed | 07/06/2011 | ||
| related to Foreman - Feature #1995: Enable parameterized class support by default | Closed | 12/04/2012 |
Associated revisions
Revision f8d946082e58b60213a27ded3e1e5f5373d976de
fixes #832 - adds parameterized class support
Credits:
This patch is based on the original work of Olivier Favre
<olivier@yakaz.com> many many thanks!
- import class parameters, and try to understand their types
- support a complex matrix of environments, puppet classes and their
signature - each class can have a different set of parameters per environment. - adds an ignore yaml file 'config/ignored_environments.yml.sample' file were
users can add regexp or class names that the importer should ignore.
common usage case for this is classes such as ::config, ::install etc. - introduce a new type of smart variable - parameterized.
- adds complex data types to smart vars, arrays, hashes, json, yaml etc are all supported now.
in order to use the new ENC format for puppet 2.6.5+ you should enable the
Parametrized_Classes_in_ENC and Enable_Smart_Variables_in_ENC within Foreman Settings
This is the initial patch just to get param classes support in, follow-up patches
would include a better UI and the relevant UI updates to host edit page etc.
Signed-off-by: Ohad Levy <ohadlevy@gmail.com>
Revision 75bd351e4217fe04f583642799dbb3f028f0fbcc
refs #832 - making sure that ENC values cast - skipped this patch somehow
Revision 77a8080a2098812eb1fe4187a66f6d9e3dfdb49e
refs #832 do not force smartvars order saved if they are the default or not sent over the wire.
History
Updated by Ignace Mouzannar over 1 year ago
I agree, this would be greatly useful.
I there a way to take advantage of puppet's parameterized classes via Foreman's ENC (even if it isn't supported in GUI yet)?
Updated by Romain Vrignaud over 1 year ago
For me, the use case should be :
- After importing puppet classes, I should be able to edit class and in a "Parameterized Class" Tab I should be able to add as many paramaters as I want and optional default value for each parameter.
- When I edit an hostgroup and I add a parameterized class to this hostgroup : it should show under the list class (or in parameter tab ?) the list of declared paramater for that class and I should be able to edit the keys. If I don't set any value then it should be mandatory to be done during host edition.
- In the same idea, If I add a parameterized class to an host, I should be able to configure the parameterized class in the same way.
- If one of my host is declared as a member of an hostgroup which include a parameterized class, I should see the value affected in hostgroup. (see Feature #1165)
Updated by James Kerby over 1 year ago
There was an IRC meetup to discuss this issue in December. Does anyone have any feedback on that discussion and whether this will be implemented anytime soon?
Updated by Glen Ogilvie about 1 year ago
Any progress on this? I see that ticket 5045, has been merged, so puppet itself supports parameterized classes from an external node classifier.
Maybe this could go into foreman release 0.5?
Updated by James Kerby about 1 year ago
Yes, we've been kicking our heels waiting for puppet to support this. It would be great in Foreman could get this into 0.5
Updated by Olivier Favre 11 months ago
- Assigned to set to Olivier Favre
Updated by Ohad Levy 11 months ago
you can track progress here https://github.com/yakaz/foreman/commits/fix832/
Updated by Ohad Levy 8 months ago
- Category set to Puppet integration
- Assigned to changed from Olivier Favre to Ohad Levy
a more recent hopefully soon to be merged here:
Updated by Amos Benari 8 months ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset f8d946082e58b60213a27ded3e1e5f5373d976de.
