Project

General

Profile

Feature #35

Allow hostgroup nesting for puppet classes and parameters

Added by Matt Moran almost 10 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

It'll be nice to be able to create a highlevel group that can be assigned to a node that contains multiple groups. Or be able to assign multiple groups to a node. Clash of parameter values should be handled by the latest group being the authoritative.


Related issues

Related to Foreman - Bug #1009: hostgroup should show its parent classes tooClosed2011-06-24
Is duplicate of Foreman - Bug #148: Hosts should allow more than one host-groupClosed2010-01-05
Has duplicate Foreman - Feature #543: Ability to nest hostgroups and assign multiple hostgroups to hostDuplicate2010-12-16

Associated revisions

Revision 4d4b84f6 (diff)
Added by Ohad Levy about 8 years ago

fixes #35 - Allow hostgroup nesting for puppet classes and parameters

History

#1 Updated by Ohad Levy almost 10 years ago

isn't this something best done in a manifest?

I've been trying to think if adding multiple roles to a server is a good idea, i mean, according to "my" best practice, I tend to think that a server has a main primary role (which is a collection of classes), anything else should go to so called sub functions where you can just add classes to the host.

#2 Updated by Ohad Levy almost 10 years ago

  • Assignee deleted (Ohad Levy)

#3 Updated by Matt Moran almost 10 years ago

I've sort of covered this under #35. But I see the foreman as usable for many environments and not just for production - so a server could be many roles in a test/dev environment.

#4 Updated by Carl Caum almost 10 years ago

I don't think you would want to have multiple groups to a node. It would be to easy to have scoping issues. I would however see use in having a group inherit from another group.

#5 Updated by Ohad Levy over 9 years ago

  • Status changed from New to Need more information

Any feedback about this request? is it really required?

#6 Updated by Ohad Levy over 9 years ago

  • Status changed from Need more information to New
  • Assignee set to Ohad Levy
  • Target version set to 0.1-4

a host should be able to belong to many groups

#7 Updated by Matt Moran over 9 years ago

(13:31:41) Matt: I have a group my-webserver, and my-db - they both have separate variables but also share some. A node is only usually my-webserver or my-db, but sometimes I want a node to be both. To do that currently i'll have to create a new group and type in all the variables, and add the classes. Or just assign one group and do it at the node level
(13:32:08) Matt: I think the variable clashes should just be handled by priority of what group was added last.
(13:32:19) Ohad Levy: ok, so a host should be able to have many groups

#8 Updated by Ohad Levy over 9 years ago

  • Status changed from New to Closed

#9 Updated by Ohad Levy over 9 years ago

  • Status changed from Closed to Assigned

#10 Updated by Marcello de Sousa over 9 years ago

This would be a really nice feature. Don't know how you are going to implement this but, if I may suggest something, it would be nice to treat groups (inside the foreman interface) in a similar way as you treat a puppetclass. Just listed together in the class list (with a remark that it's a group). Puppetclasses/groups list example:
------------------
module1::class-foo
module2::class-bar
Group-MyGroup1
Group-MyGroup2 etc...
------------------

This way you can drag & drop classes and/or groups to both "hosts" and to "groups" within the same interface. In this way you might as well just remove the "hostgroup" field in the "HOSTS" edit interface (as your group(s) would just be listed in the greenbox).
I believe that would give us great flexibility.

#11 Updated by Ohad Levy over 9 years ago

  • Target version changed from 0.1-4 to 0.1-5

#12 Updated by Ohad Levy over 9 years ago

  • Status changed from Assigned to Feedback
  • Target version deleted (0.1-5)

I'm still in mixed feelings about this one :-(

#13 Updated by Matt Moran over 9 years ago

I'd like to see the feature. But I don't think the clash of variables should be handled with one group taking authority. I think if a node is assigned multiple groups that contain the same variable names but with different values, then that should throw an error.

So this would throw an error due to yumrepo variable
mywebserver: yumrepo = "xxx", masterip = "aaa", webserverconf = "bbb"
mydb: yumrepo = "aaa", masterip = "aaa", dbconf = "aaa"

This would be ok
mywebserver: yumrepo = "xxx", masterip = "aaa", webserverconf = "bbb"
mydb: yumrepo = "xxx", masterip = "aaa", dbconf = "aaa"

#14 Updated by Marcello de Sousa about 9 years ago

Ohad Levy wrote:

I'm still in mixed feelings about this one :-(

Hi Ohad,
Could you explain us a little bit more your thoughts on this ?

It's a pity to see this feature out of the next release :-((((

#15 Updated by Ohad Levy about 9 years ago

Marcello de Sousa wrote:

Ohad Levy wrote:

I'm still in mixed feelings about this one :-(

Hi Ohad,
Could you explain us a little bit more your thoughts on this ?

It's a pity to see this feature out of the next release :-((((

maybe we can find the time to talk on #theforeman irc channel

my concern breaks into two main parts:
1. technical - e.g. how to handle parameters etc
2. logical, does it really make sense to have hostgroup inherit other groups? (in terms of best practice etc).

#16 Updated by Atha Kouroussis over 8 years ago

Hi Ohad,
I would like to be implemented too. We are currently trying yo migrate from Puppet Dashboard to Foreman and this functionality is much desired. Although not a show-stopper, it is forcing us to restructure all parameter placement hierarchies we had before.

#17 Updated by Ohad Levy over 8 years ago

I'll see what I can do after releasing 0.2 :)

#18 Updated by Matthew Saddington about 8 years ago

Hi Ohad,

Would like this to be implemented. Im trying to do something similar to Atha and it would be great if we had this functionality

#19 Updated by Ohad Levy about 8 years ago

  • Status changed from Feedback to Assigned
  • Target version set to 0.4

OK, my suggestion is the following.

A hostgroup can inherit from another group.
this would include its parameters and classes.

so a web server can inherit from common.
and my rails app can inherit from the web server host group.

if there are no objections, I'll implement this asap.

#20 Updated by Matt Moran about 8 years ago

Sounds perfect to me!

#21 Updated by Ohad Levy about 8 years ago

  • Subject changed from Multiple groups with in a group to Allow hostgroup nesting for puppet classes and parameters

#22 Updated by Ohad Levy about 8 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF