Foreman.rb.erb file -- where on F17?

I'm integrating Foreman into an existing Cobbler/Puppet system running on
F17. None of the directories specified in the documentation for the
foreman.rb file (sourced from foreman.rb.erb) exist on my box, so i'm left
at a loss to figure out where to put this file. Any guidance? I'm not a
ruby guy by any stretch, so I may be missing something really obvious here.

I'm running Foreman 1.1 on Ruby 1.9.3p327, all installed from RPM.

It's down to where the puppet package stores report processors, so for
Fedora 17 it's here:

/usr/share/ruby/vendor_ruby/puppet

This has changed in recent years on Fedora and Debian distros. We'd
appreciate updates via pull requests to improve the manual if you have
the time:

··· On 18/02/13 15:57, Bret Wortman wrote: > I'm integrating Foreman into an existing Cobbler/Puppet system running > on F17. None of the directories specified in the documentation for the > foreman.rb file (sourced from foreman.rb.erb) exist on my box, so i'm > left at a loss to figure out where to put this file. Any guidance? I'm > not a ruby guy by any stretch, so I may be missing something really > obvious here. > > I'm running Foreman 1.1 on Ruby 1.9.3p327, all installed from RPM.


Dominic Cleal
Red Hat Engineering

Gah! You mean I'd have to finally learn git? :wink:

I'll give it a go.

··· On Monday, February 18, 2013 11:05:42 AM UTC-5, Dominic Cleal wrote: > > On 18/02/13 15:57, Bret Wortman wrote: > > I'm integrating Foreman into an existing Cobbler/Puppet system running > > on F17. None of the directories specified in the documentation for the > > foreman.rb file (sourced from foreman.rb.erb) exist on my box, so i'm > > left at a loss to figure out where to put this file. Any guidance? I'm > > not a ruby guy by any stretch, so I may be missing something really > > obvious here. > > > > I'm running Foreman 1.1 on Ruby 1.9.3p327, all installed from RPM. > > It's down to where the puppet package stores report processors, so for > Fedora 17 it's here: > > /usr/share/ruby/vendor_ruby/puppet > > This has changed in recent years on Fedora and Debian distros. We'd > appreciate updates via pull requests to improve the manual if you have > the time: > > https://github.com/theforeman/theforeman.org > > -- > Dominic Cleal > Red Hat Engineering >

It's a worth cause! :wink:

I think you can actually fork the project and then edit via the GitHub
web UI, and it'll do all the commits for you. You can then open a pull
request once done. Even easier!

··· -- Dominic Cleal Red Hat Engineering

On 18/02/13 16:38, Bret Wortman wrote:

Gah! You mean I’d have to finally learn git? :wink:

I’ll give it a go.

On Monday, February 18, 2013 11:05:42 AM UTC-5, Dominic Cleal wrote:

On 18/02/13 15:57, Bret Wortman wrote:
> I'm integrating Foreman into an existing Cobbler/Puppet system
running
> on F17. None of the directories specified in the documentation for
the
> foreman.rb file (sourced from foreman.rb.erb) exist on my box, so i'm
> left at a loss to figure out where to put this file. Any guidance?
I'm
> not a ruby guy by any stretch, so I may be missing something really
> obvious here.
>
> I'm running Foreman 1.1 on Ruby 1.9.3p327, all installed from RPM.

It's down to where the puppet package stores report processors, so for
Fedora 17 it's here:

/usr/share/ruby/vendor_ruby/puppet

This has changed in recent years on Fedora and Debian distros.  We'd
appreciate updates via pull requests to improve the manual if you have
the time:

https://github.com/theforeman/theforeman.org
<https://github.com/theforeman/theforeman.org>

-- 
Dominic Cleal
Red Hat Engineering

One quick follow-up question –

When copying this file to its new name & location, do I need to alter the
file's contents at all? It looks like, by changing it from a .erb to a .rb,
that I ought to have to replace all the erb tags with actual values, but
the one at the top of the file, in particular, confuses me.

··· On Monday, February 18, 2013 11:44:48 AM UTC-5, Dominic Cleal wrote: > > It's a worth cause! ;-) > > I think you can actually fork the project and then edit via the GitHub > web UI, and it'll do all the commits for you. You can then open a pull > request once done. Even easier! > > -- > Dominic Cleal > Red Hat Engineering > > On 18/02/13 16:38, Bret Wortman wrote: > > Gah! You mean I'd have to finally learn git? ;-) > > > > I'll give it a go. > > > > On Monday, February 18, 2013 11:05:42 AM UTC-5, Dominic Cleal wrote: > > > > On 18/02/13 15:57, Bret Wortman wrote: > > > I'm integrating Foreman into an existing Cobbler/Puppet system > > running > > > on F17. None of the directories specified in the documentation for > > the > > > foreman.rb file (sourced from foreman.rb.erb) exist on my box, so > i'm > > > left at a loss to figure out where to put this file. Any guidance? > > I'm > > > not a ruby guy by any stretch, so I may be missing something > really > > > obvious here. > > > > > > I'm running Foreman 1.1 on Ruby 1.9.3p327, all installed from RPM. > > > > It's down to where the puppet package stores report processors, so > for > > Fedora 17 it's here: > > > > /usr/share/ruby/vendor_ruby/puppet > > > > This has changed in recent years on Fedora and Debian distros. We'd > > appreciate updates via pull requests to improve the manual if you > have > > the time: > > > > https://github.com/theforeman/theforeman.org > > > > > > -- > > Dominic Cleal > > Red Hat Engineering > > > >

Yes, you'd need to manually interpret it… remove the header line(s) at
the top, then replace the values in the settings so they're just
$foreman_x = "foo".

··· -- Dominic Cleal Red Hat Engineering

On 19/02/13 11:50, Bret Wortman wrote:

One quick follow-up question –

When copying this file to its new name & location, do I need to alter
the file’s contents at all? It looks like, by changing it from a .erb to
a .rb, that I ought to have to replace all the erb tags with actual
values, but the one at the top of the file, in particular, confuses me.

On Monday, February 18, 2013 11:44:48 AM UTC-5, Dominic Cleal wrote:

It's a worth cause! ;-)

I think you can actually fork the project and then edit via the GitHub
web UI, and it'll do all the commits for you.  You can then open a pull
request once done.  Even easier!

-- 
Dominic Cleal
Red Hat Engineering

On 18/02/13 16:38, Bret Wortman wrote:
> Gah! You mean I'd have to finally learn git? ;-)
>
> I'll give it a go.
>
> On Monday, February 18, 2013 11:05:42 AM UTC-5, Dominic Cleal wrote:
>
>     On 18/02/13 15:57, Bret Wortman wrote:
>     > I'm integrating Foreman into an existing Cobbler/Puppet system
>     running
>     > on F17. None of the directories specified in the
documentation for
>     the
>     > foreman.rb file (sourced from foreman.rb.erb) exist on my
box, so i'm
>     > left at a loss to figure out where to put this file. Any
guidance?
>     I'm
>     > not a ruby guy by any stretch, so I may be missing something
really
>     > obvious here.
>     >
>     > I'm running Foreman 1.1 on Ruby 1.9.3p327, all installed
from RPM.
>
>     It's down to where the puppet package stores report
processors, so for
>     Fedora 17 it's here:
>
>     /usr/share/ruby/vendor_ruby/puppet
>
>     This has changed in recent years on Fedora and Debian distros.
 We'd
>     appreciate updates via pull requests to improve the manual if
you have
>     the time:
>
>     https://github.com/theforeman/theforeman.org
<https://github.com/theforeman/theforeman.org>
>     <https://github.com/theforeman/theforeman.org
<https://github.com/theforeman/theforeman.org>>
>
>     --
>     Dominic Cleal
>     Red Hat Engineering
>

Regards,
Eugene Vilensky
evilensky@gmail.com

> Yes, you'd need to manually interpret it… remove the header line(s) at
> the top, then replace the values in the settings so they're just
> $foreman_x = "foo".

Hi Dominic,

If there is no SSL on the foreman server, should one modify line 27
and change URI scheme to 'http' ? Should the SSL parameters be left
blank? Thanks!

[and if puppetmaster with foreman-proxy, and foreman are on different
servers, what should:

$foreman_ssl_ca =
$foreman_ssl_cert =
$foreman_ssl_key =

be set to? ]

··· On Tue, Feb 19, 2013 at 12:28 PM, Dominic Cleal wrote:

> Regards,
> Eugene Vilensky
> evilensky@gmail.com
>
>> Yes, you'd need to manually interpret it… remove the header line(s) at
>> the top, then replace the values in the settings so they're just
>> $foreman_x = "foo".
>
> Hi Dominic,
>
> If there is no SSL on the foreman server, should one modify line 27
> and change URI scheme to 'http' ? Should the SSL parameters be left
> blank? Thanks!

Yes, change URI to http:// and set ssl_* to empty strings ("").

> [and if puppetmaster with foreman-proxy, and foreman are on different
> servers, what should:
>
> $foreman_ssl_ca =
> $foreman_ssl_cert =
> $foreman_ssl_key =
>
> be set to? ]

In a simple setup, you can run everything under a single Puppet CA. So
$foreman_ssl_ca would be the Puppet CA cert (usually
/var/lib/puppet/ssl/certs/ca.pem), and ssl_cert/key would be the
puppetmaster host's Puppet cert, e.g.

$foreman_ssl_cert = "/var/lib/puppet/ssl/certs/FQDN.pem"
$foreman_ssl_key = "/var/lib/puppet/ssl/private_keys/FQDN.pem"

This is how the installer sets things up by default. You can use your
own CA infrastructure if you have it available, there's more info here
about how it can be configured:

http://theforeman.org/manuals/1.1/index.html#5.4SecuringCommunicationswithSSL

··· On 19/02/13 18:43, Eugene Vilensky wrote: > On Tue, Feb 19, 2013 at 12:28 PM, Dominic Cleal wrote:


Dominic Cleal
Red Hat Engineering