How to install foreman_ipam plugin

Problem:
I would like to install foreman_ipam, but I do not know, how to do this. In the foreman documentation and the Github project is described, how to achieve this. I tried it with the “scl enable tfm bash” and " `gem install --ignore-dependencies foreman_ipam", as well as compile the whole project again. After that, I have restarted the whole server, but no menu icons for phpipam found, yet.

What I am doing wrong? Can you give me some hints please?

Expected outcome:
Install the plugin and connect to PHPIpam for give me the next new unused ip address.

Foreman and Proxy versions: 1.24.2

Foreman and Proxy plugin versions:

Distribution and version: CentOS 7.7.1908 (Core)

Other relevant data:

You also need to make sure the gem is loaded. Foreman :: Plugin Manuals mentions Add to the bundler.d/Gemfile.local.rb file as detailed below. which you probably missed.

On a related note, there’s an open PR to add it to Foreman itself via:

I hope this will be merged in 2.1.

Hi Ewoud,

thanks for your answer and sorry for the delay. I did a fresh installation of foreman and tried again. I installed it on CentOS 7 and created /usr/share/foreman/bundler.d/Gemfile.

After that I run foreman-rake bundler install and this came up:

/opt/theforeman/tfm/root/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'

Caused by:
LoadError: cannot load such file -- rails/i18n
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `block in require'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in `load_dependency'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:49:in `rescue in block in system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:39:in `block in system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in `system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:19:in `block in system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in `system_require'
/usr/share/foreman/config/application.rb:17:in `<top (required)>'
/usr/share/foreman/Rakefile:1:in `<top (required)>'
/opt/theforeman/tfm/root/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'

Caused by:
Gem::ConflictError: Unable to activate rails-i18n-5.1.1, because railties-6.0.2.1 conflicts with railties (< 6, >= 5.0)
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `block in require'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in `load_dependency'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:41:in `block in system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in `system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:19:in `block in system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in `system_require'
/usr/share/foreman/config/application.rb:17:in `<top (required)>'
/usr/share/foreman/Rakefile:1:in `<top (required)>'
/opt/theforeman/tfm/root/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'

Caused by:
Gem::ConflictError: Unable to activate rails-i18n-5.1.1, because railties-6.0.2.1 conflicts with railties (< 6, >= 5.0)
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `block in require'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in `load_dependency'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:41:in `block in system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in `system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:19:in `block in system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in `system_require'
/usr/share/foreman/config/application.rb:17:in `<top (required)>'
/usr/share/foreman/Rakefile:1:in `<top (required)>'
/opt/theforeman/tfm/root/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'

Caused by:
LoadError: cannot load such file -- rails-i18n
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `block in require'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in `load_dependency'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:41:in `block in system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext/runtime.rb:37:in `system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:19:in `block in system_require'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.4.1/lib/bundler_ext.rb:14:in `system_require'
/usr/share/foreman/config/application.rb:17:in `<top (required)>'
/usr/share/foreman/Rakefile:1:in `<top (required)>'
/opt/theforeman/tfm/root/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
(See full trace by running task with --trace)

Unfortunately I am not a ruby developer. I can not debug this on a deeper level. But is this a dependency on the plugin or has it to be solved in the foreman env?

Thanks very much

Hello,

you can’t use this plugin with a stable version. The changes for Foreman core has been merged today! So the first Foreman version that will work is 2.1. We don’t have any installation information yet, but generally speaking you only need Foreman 2.1 (or today’s nightly) and smart_proxy_ipam plugin to have the integration. Then, optionally, you can install foreman_ipam plugin to get the dashboard widget but it does not provide anything else IIRC, so it’s not crucial to have it.

In short, you are a bit too early but we would love to see you testing this. For little bit more info go here: