[foreman-dev] Customizing the installer's configuration
Hi all, It's been a long standing issue that installer users who try to alter Foreman settings end up surprised when those changes get wiped out when they upgrade (by running the installer again). Many things can be set by installer flags, but not all. Most recently we added the ability to interface directly with Hiera in /etc/foreman/custom-hiera.yaml (https://theforeman.org/manuals/1.14/index.html#advanced-module-configuration) which greatly opens up the configuration to customization. However, there's still a few limitations with this, particularly if you need to instantiate a new resource. A good example is wanting to tune postgresql configuration which uses the `postgresql::server::config_entry` defined type. You can get around it this by using the foreman puppet classes directly and then including a class of your own with the additional config. But what if you want to use the installer? Should we deal with these on a case-by-case basis - maybe make specific postgresql settings accessible in puppet-foreman flags or take a hash of them in the module? The other thing I was thinking - and I'm not sure if this is overkill - is giving the user a directory to dump their own custom puppet modules in, and then using the custom-hiera.yaml feature to include them. Thoughts/ideas would be much appreciated. Thanks Stephen -- You received this message because you are subscribed to the Google Groups "foreman-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to foreman-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [foreman-dev] Organization titles in CLI
Correct. If there are 2 orgs with the same name under different parents, then not specifying `--parent` would result in an error such as "More than one record found". On Tue, Apr 11, 2017 at 7:08 AM, Tomas Strachotawrote: > I'm not sure I understand. It is currently possible to update parents > of organizations. Did you mean to use the parent parameter as a > compound identifier together with names? > > i.e. for changing a name and a parent you would use: > $ hammer organization update --name Brno --parent EMEA --new-name Krno > --new-parent ... > > and for info: > $ hammer organization info --name Brno --parent EMEA > > Did I understand it correctly? > > > On Mon, Apr 10, 2017 at 6:12 PM, Andrew Kofink wrote: > > Tomas, > > > > Would it be easier to print the parent with list/info commands and allow > > updating that attribute (i.e. --parent/--parent-id)? We already have a > > handler in the ID resolver when multiple records are returned when only > one > > is expected, though the error message does not tell the user how to > further > > filter the results. > > > > - Andrew > > > > On Mon, Apr 10, 2017 at 11:09 AM, Tomas Strachota > > wrote: > >> > >> I recently found out hammer uses only short names for identifying > >> organizations. Names aren't globally unique, which makes it impossible > >> to modify or delete an org when there are two of the same name but > >> nested under a different parent org. See [1] for details. > >> > >> I opened a preliminary PR [2] that adds option --organization-title to > >> all commands that consume taxonomies and a column "Title" to output of > >> the list command. This is simple solution, consistent with how it > >> works in hostgroups, but I don't think it's the best from the > >> usability point of view. Both options --name and --title as well as > >> table column labels feel redundant (columns contain the same data if > >> orgs aren't nested). > >> > >> An alternative approach is to completely replace names with labels in > >> hammer internally. We would have to change id resolver and let the > >> list commands print titles (in a column labeled "Name"). That's how > >> it's displayed in UI. > >> > >> Pros: > >> - users wouldn't notice the change, it should be seamless in most > cases > >> - no need to add extra options > >> - consistent with the UI, where column labeled "Name" contains > >> titles in taxonomy tables > >> > >> Cons: > >> - name isn't the same as title and it might not feel natural to update > >> as: > >> hammer location update --name 'emea/brno' --new-name 'krno' which > >> would then be displayed as 'emea/krno' > >> > >> The con I mentioned could be fixed by checking if a user passed a name > >> containing '/' and using only last part of title in such cases. That > >> would make even --new-name 'emea/krno' work. > >> > >> Theoretically it could be used also for changing organizations parent. > >> --name 'emea/brno' --new-name 'europe/krno' would change parent to an > >> organization with title 'europe' and rename to 'krno'. But that's > >> maybe too much. > >> > >> How do you find the alternative approach? Do you see any other options > >> how the commands could work? Any idea is welcome. > >> I'd like to change hostgroup commands to use the same style and make > >> it consistent across the whole cli when we find a good solution. Are > >> there any commands in plugins (looking mainly at hammer-cli-katello) > >> that use resources with nested names? > >> > >> T. > >> > >> [1] http://projects.theforeman.org/issues/19157/ > >> [2] https://github.com/theforeman/hammer-cli-foreman/pull/299 > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "foreman-dev" group. > >> To unsubscribe from this group and stop receiving emails from it, send > an > >> email to foreman-dev+unsubscr...@googlegroups.com. > >> For more options, visit https://groups.google.com/d/optout. > > > > > > > > > > -- > > Andrew Kofink > > akof...@redhat.com > > IRC: akofink > > Associate Software Engineer > > Red Hat Satellite > > > > -- > > You received this message because you are subscribed to the Google Groups > > "foreman-dev" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to foreman-dev+unsubscr...@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "foreman-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to foreman-dev+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Andrew Kofink akof...@redhat.com IRC: akofink Associate Software Engineer Red Hat Satellite -- You received this message because you are subscribed to the Google Groups "foreman-dev" group. To unsubscribe from this group and stop
Re: [foreman-dev] Organization titles in CLI
I'm not sure I understand. It is currently possible to update parents of organizations. Did you mean to use the parent parameter as a compound identifier together with names? i.e. for changing a name and a parent you would use: $ hammer organization update --name Brno --parent EMEA --new-name Krno --new-parent ... and for info: $ hammer organization info --name Brno --parent EMEA Did I understand it correctly? On Mon, Apr 10, 2017 at 6:12 PM, Andrew Kofinkwrote: > Tomas, > > Would it be easier to print the parent with list/info commands and allow > updating that attribute (i.e. --parent/--parent-id)? We already have a > handler in the ID resolver when multiple records are returned when only one > is expected, though the error message does not tell the user how to further > filter the results. > > - Andrew > > On Mon, Apr 10, 2017 at 11:09 AM, Tomas Strachota > wrote: >> >> I recently found out hammer uses only short names for identifying >> organizations. Names aren't globally unique, which makes it impossible >> to modify or delete an org when there are two of the same name but >> nested under a different parent org. See [1] for details. >> >> I opened a preliminary PR [2] that adds option --organization-title to >> all commands that consume taxonomies and a column "Title" to output of >> the list command. This is simple solution, consistent with how it >> works in hostgroups, but I don't think it's the best from the >> usability point of view. Both options --name and --title as well as >> table column labels feel redundant (columns contain the same data if >> orgs aren't nested). >> >> An alternative approach is to completely replace names with labels in >> hammer internally. We would have to change id resolver and let the >> list commands print titles (in a column labeled "Name"). That's how >> it's displayed in UI. >> >> Pros: >> - users wouldn't notice the change, it should be seamless in most cases >> - no need to add extra options >> - consistent with the UI, where column labeled "Name" contains >> titles in taxonomy tables >> >> Cons: >> - name isn't the same as title and it might not feel natural to update >> as: >> hammer location update --name 'emea/brno' --new-name 'krno' which >> would then be displayed as 'emea/krno' >> >> The con I mentioned could be fixed by checking if a user passed a name >> containing '/' and using only last part of title in such cases. That >> would make even --new-name 'emea/krno' work. >> >> Theoretically it could be used also for changing organizations parent. >> --name 'emea/brno' --new-name 'europe/krno' would change parent to an >> organization with title 'europe' and rename to 'krno'. But that's >> maybe too much. >> >> How do you find the alternative approach? Do you see any other options >> how the commands could work? Any idea is welcome. >> I'd like to change hostgroup commands to use the same style and make >> it consistent across the whole cli when we find a good solution. Are >> there any commands in plugins (looking mainly at hammer-cli-katello) >> that use resources with nested names? >> >> T. >> >> [1] http://projects.theforeman.org/issues/19157/ >> [2] https://github.com/theforeman/hammer-cli-foreman/pull/299 >> >> -- >> You received this message because you are subscribed to the Google Groups >> "foreman-dev" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to foreman-dev+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. > > > > > -- > Andrew Kofink > akof...@redhat.com > IRC: akofink > Associate Software Engineer > Red Hat Satellite > > -- > You received this message because you are subscribed to the Google Groups > "foreman-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to foreman-dev+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "foreman-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to foreman-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.