theforeman / foreman_datacenter

This plugin lets you document your physical servers across multiple datacenters
GNU General Public License v3.0
21 stars 13 forks source link

Plugin installation #33

Open marcoskv opened 4 years ago

marcoskv commented 4 years ago

I would like to install the datacenter plugin on CentOS 7.7 / Foreman 1.24.2 Since the rpm is not available, I started with the gem installation commands

# gem install --ignore-dependencies sprockets
Fetching: sprockets-4.0.0.gem (100%)
ERROR:  Error installing sprockets:
    sprockets requires Ruby version >= 2.5.0.

Is there an up to date installation guide? Or, even better, would it be possible to have the rpm package?

Thanks

marcoskv commented 4 years ago

Hi Everyone,

I just upgraded to foreman 2.0.0... and I noticed that this plugin is finally available as rpm!!??!!?? Many thanks!!! :-)

I immediately installed it... the new menu item appears... but once I click on it, I see an error related to the database

PG::UndefinedTable: ERROR: relation "platforms" does not exist LINE 8: WHERE a.attrelid = '"platforms"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod, c.collname, col_description(a.attrelid, a.attnum) AS comment FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum LEFT JOIN pg_type t ON a.atttypid = t.oid LEFT JOIN pg_collation c ON a.attcollation = c.oid AND a.attcollation <> t.typcollation WHERE a.attrelid = '"platforms"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum

Can it be that the migration was not executed while installing the rpm? Is there a way to force it?

I tried the commands from the old documentation, without success

# RAILS_ENV=production rake db:migrate                                                                                                                                                                                  
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

(See full trace by running task with --trace)

# If it fails
cd /opt/rh/rh-ruby22/root/usr/local/share/gems/gems/foreman_datacenter-0.1.49/db/migrate
for F in `ls`;do  sed -i ${F} -e 's/\[4.2\]//';done;

Nothing happens...

Suggestions?