Please advise - Foreman as a standalone service for existing puppetmaster

Hello All,
I realize this will look like a hasty rehash of existing threads on similar
topics but I'm really at a loss even after reading those so please bear
with this Foreman/Ruby Newb…

Problem: Unable to get foreman-installer nor manual install methods to
work for the result of a standalone Foreman service.

Environment:

Proxy servers make traditional yum repos impossible so Foreman repos are
synced to RHN Satellite server. This appears to break the installer since
it drops repo files in /etc/yum.repos.d/ for foreman and it all goes
downhill from there…)

  • Homogeneous RHEL 6.4 environment with a standalone puppet master 3.3.0
    (puppet.xyz.com)

  • Puppet master is managed via Subversion w/ post hooks that copy commits
    into the running puppet config

  • Standalone host for testing of Foreman - will receive reports once I can
    get it running. (foreman.xyz.com)

  • Mysql configured as Foreman database. (/etc/foreman/database.yml)

Initial goal:
A working Foreman server that can receive reports from the running puppet
master but do little else (for now).

Installation & Configuration completed thus far:
Packages: (see attached packages.list)
Configuration:
(See attached:
etc-foreman-settings.yaml
etc-foreman-database.yml
- it migrated fine and all mysql stuff is good!
)

Current Blockers:

This is the current problem I'm trying to overcome:

RAILS_ENV=production /opt/rh/ruby193/root/usr/bin/rails

/opt/rh/ruby193/root/usr/bin/ruby: error while loading shared libraries:
libruby.so.1.9: cannot open shared object file: No such file or directory

locate libruby.so.1.9

/opt/rh/ruby193/root/usr/lib64/libruby.so.1.9
/opt/rh/ruby193/root/usr/lib64/libruby.so.1.9.1

I tried this:

LD_LIBRARY_PATH=/opt/rh/ruby193/root/usr/lib64:$LD_LIBRARY_PATH

RAILS_ENV=production /opt/rh/ruby193/root/usr/bin/rails server
Usage:
rails new APP_PATH [options]

So still a fail.

Please advise, and thanks in advance!

packages.list (7.91 KB)

etc-foreman-settings.yaml (578 Bytes)

Adding attachment: /etc/httpd/conf.d/foreman.conf

httpd-confd-foreman.conf (468 Bytes)

Hello there,

what you see in /opt/rh is Software Collections. I highly advice you to
read SCL guides and documentation how to use that.

Hint: You are looking for

scl enable "command to run"

Also, why do you try to start Rails server in webrick? This is not
recommended for production. Use mod_passenger as recommended deployment,
or any other alternative. But it will work with proper SCL command.

··· On Tue, Sep 24, 2013 at 10:31:41AM -0700, Kodiak Firesmith wrote: > This is the current problem I'm trying to overcome: > # RAILS_ENV=production /opt/rh/ruby193/root/usr/bin/rails > /opt/rh/ruby193/root/usr/bin/ruby: error while loading shared libraries: > libruby.so.1.9: cannot open shared object file: No such file or directory > > > # locate libruby.so.1.9 > /opt/rh/ruby193/root/usr/lib64/libruby.so.1.9 > /opt/rh/ruby193/root/usr/lib64/libruby.so.1.9.1 > > I tried this: > # LD_LIBRARY_PATH=/opt/rh/ruby193/root/usr/lib64:$LD_LIBRARY_PATH > RAILS_ENV=production /opt/rh/ruby193/root/usr/bin/rails server > Usage: > rails new APP_PATH [options] > > So still a fail.


Later,

Lukas “lzap” Zapletal
irc: lzap #theforeman

Thanks very much Lukas,
This was my first foray into RH Software Collections, Passenger, and
Foreman. I didn't realize it was an either/or proposition wrt running
rails server vs configuring mod_passenger.

I was able to get mod_passenger working and after chkconfig'ing httpd,
foreman services on I was good to go.

··· On Wednesday, September 25, 2013 4:38:24 AM UTC-4, Lukas Zapletal wrote: > > On Tue, Sep 24, 2013 at 10:31:41AM -0700, Kodiak Firesmith wrote: > > This is the current problem I'm trying to overcome: > > # RAILS_ENV=production /opt/rh/ruby193/root/usr/bin/rails > > /opt/rh/ruby193/root/usr/bin/ruby: error while loading shared libraries: > > libruby.so.1.9: cannot open shared object file: No such file or > directory > > > > > > # locate libruby.so.1.9 > > /opt/rh/ruby193/root/usr/lib64/libruby.so.1.9 > > /opt/rh/ruby193/root/usr/lib64/libruby.so.1.9.1 > > > > I tried this: > > # LD_LIBRARY_PATH=/opt/rh/ruby193/root/usr/lib64:$LD_LIBRARY_PATH > > RAILS_ENV=production /opt/rh/ruby193/root/usr/bin/rails server > > Usage: > > rails new APP_PATH [options] > > > > So still a fail. > > Hello there, > > what you see in /opt/rh is Software Collections. I highly advice you to > read SCL guides and documentation how to use that. > > Hint: You are looking for > > scl enable "command to run" > > Also, why do you try to start Rails server in webrick? This is not > recommended for production. Use mod_passenger as recommended deployment, > or any other alternative. But it will work with proper SCL command. > > -- > Later, > > Lukas "lzap" Zapletal > irc: lzap #theforeman >