Some foreman usability questions

> hi,
>
> I'm trying to use foreman to send daily reports of puppet clients that
> are failing.
>
> we use ec2 and certname = UUID in the puppet.conf. However this
> identifier is not particularly helpful as it is used for all of foreman's
> web UI and emails. Is there a way to have an alternate field be used for
> display, such as the hosts' fqdn fact? I see
> Feature #137: Better support for non-hostname certnames. - Foreman but this looks to be used for
> provisioning.
>

We don't currently have a way to import existing systems, but with two
little steps you can achieve that.

  1. enable uuid in the settings (more --> settings --> search for uuid).
  2. apply manually the certname fiend on all of your hosts
    e.g.

You would need to use some sort of sql console, but replace the content of
the name field with the certname field under the hosts table.

and for the hosts name field, just put in the fqdn of the system.

afterwards, you'll see the correct hostnames, and systems would be
recognized by their certname.

we could probably add native support for that in foreman, so feel free to
add a feature request.

>
> What is the proper way to update the mysql "settings" table after
> i've modified settings.yaml? "rake db:migrate:reset" seems a little
> brutal. This question may show more my lack of ruby on rails than foreman.
>

Not following the question, settings.yaml is the core low level settings
that foreman needs to know before starting (or that it requires a restart
of foreman), all the other settings (more --> settings) can be changed on
the fly.

Ohad

··· On Thu, Aug 2, 2012 at 4:34 AM, Alexius Ludeman wrote:

thanks
lex

[sorry if you get this twice, i’ve posted to foreman-dev before samkottler
on irc pointed me here]


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/foreman-users/-/8MHg0CGrQiIJ.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

thanks for the information. feature request:
Feature #1805: support in hosts_and_facts to use any host fact to be display name - Foreman.

In the meantime my quick dirty hack was to run migrate:db:reset and
puppet:import:hosts_and_facts with this patch:
— foreman/app/models/host.rb 2012-07-31 14:56:05.000000000 -0700
+++ foreman/app/models/host.rb.old 2012-08-02 10:23:45.000000000 -0700
@@ -350,7 +350,7 @@

  • h ||= Host.new :name => facts.values["fqdn"]

My specific problem was that I changed :administrator: in settings.yaml
after I ran db:migrate. is there rake way to update the db with the new
settings.yaml configuration after the initial db:migrate?

thanks
lex

··· On Thursday, August 2, 2012 1:30:03 AM UTC-7, ohad wrote: > > > > On Thu, Aug 2, 2012 at 4:34 AM, Alexius Ludeman wrote: > >> hi, >> >> I'm trying to use foreman to send daily reports of puppet clients that >> are failing. >> >> we use ec2 and certname = UUID in the puppet.conf. However this >> identifier is not particularly helpful as it is used for all of foreman's >> web UI and emails. Is there a way to have an alternate field be used for >> display, such as the hosts' fqdn fact? I see >> http://theforeman.org/issues/137 but this looks to be used for >> provisioning. >> > > We don't currently have a way to import existing systems, but with two > little steps you can achieve that. > > 1. enable uuid in the settings (more --> settings --> search for uuid). > 2. apply manually the certname fiend on all of your hosts > e.g. > > You would need to use some sort of sql console, but replace the content of > the name field with the certname field under the hosts table. > > and for the hosts name field, just put in the fqdn of the system. > > afterwards, you'll see the correct hostnames, and systems would be > recognized by their certname. > > we could probably add native support for that in foreman, so feel free to > add a feature request. > >> >> What is the proper way to update the mysql "settings" table after >> i've modified settings.yaml? "rake db:migrate:reset" seems a little >> brutal. This question may show more my lack of ruby on rails than foreman. >> > > Not following the question, settings.yaml is the core low level settings > that foreman needs to know before starting (or that it requires a restart > of foreman), all the other settings (more --> settings) can be changed on > the fly. > > > Ohad > >> >> thanks >> lex >> >> [sorry if you get this twice, i've posted to foreman-dev before >> samkottler on irc pointed me here >> >

> thanks for the information. feature request:
> Feature #1805: support in hosts_and_facts to use any host fact to be display name - Foreman.
>
> In the meantime my quick dirty hack was to run migrate:db:reset and
> puppet:import:hosts_and_facts with this patch:
> — foreman/app/models/host.rb 2012-07-31 14:56:05.000000000 -0700
> +++ foreman/app/models/host.rb.old 2012-08-02 10:23:45.000000000 -0700
> @@ -350,7 +350,7 @@
> - h ||= Host.new :name => facts.name
> + h ||= Host.new :name => facts.values["fqdn"]
>

this looks like a good way to solve the problem assuming you dont have
storeconfigs.

>
> My specific problem was that I changed :administrator: in settings.yaml
> after I ran db:migrate. is there rake way to update the db with the new
> settings.yaml configuration after the initial db:migrate?
>
> You mean you need to the admin password?
try

RAILS_ENV=production rake permissions:reset

Ohad

··· On Thu, Aug 2, 2012 at 9:17 PM, Alexius Ludeman wrote:

thanks
lex

On Thursday, August 2, 2012 1:30:03 AM UTC-7, ohad wrote:

On Thu, Aug 2, 2012 at 4:34 AM, Alexius Ludeman wrote:

hi,

I’m trying to use foreman to send daily reports of puppet clients that
are failing.

we use ec2 and certname = UUID in the puppet.conf. However this
identifier is not particularly helpful as it is used for all of foreman’s
web UI and emails. Is there a way to have an alternate field be used for
display, such as the hosts’ fqdn fact? I see
http://theforeman.org/issues/**137 http://theforeman.org/issues/137but this looks to be used for provisioning.

We don’t currently have a way to import existing systems, but with two
little steps you can achieve that.

  1. enable uuid in the settings (more --> settings --> search for uuid).
  2. apply manually the certname fiend on all of your hosts
    e.g.

You would need to use some sort of sql console, but replace the content
of the name field with the certname field under the hosts table.

and for the hosts name field, just put in the fqdn of the system.

afterwards, you’ll see the correct hostnames, and systems would be
recognized by their certname.

we could probably add native support for that in foreman, so feel free to
add a feature request.

What is the proper way to update the mysql “settings” table after
i’ve modified settings.yaml? “rake db:migrate:reset” seems a little
brutal. This question may show more my lack of ruby on rails than foreman.

Not following the question, settings.yaml is the core low level settings
that foreman needs to know before starting (or that it requires a restart
of foreman), all the other settings (more --> settings) can be changed on
the fly.

Ohad

thanks
lex

[sorry if you get this twice, i’ve posted to foreman-dev before
samkottler on irc pointed me here


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/foreman-users/-/Z2HOVK65OFUJ.

To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.