Project

General

Profile

Actions

How to Install a Smart-Proxy Plugin

Smart-Proxy plugins are ruby gems. Below are recommended methods for installation.

RPM Installations

Some plugins are available from Foreman repositories packaged as rpms. The repos are available at yum.theforeman.org/plugins. Separate repos are available for each Foreman release, containing plugins that are compatible with that particular version. Packages are not currently GPG signed.

Configure the repo by creating /etc/yum.repos.d/foreman_plugins.repo:

[foreman-plugins]
name=Foreman plugins
baseurl=http://yum.theforeman.org/plugins/nightly/el6/x86_64/
enabled=1
gpgcheck=0

Find the package for the plugin:

yum search rubygem-smart-proxy

Install the package, e.g.

yum install rubygem-smart_proxy_pulp

Restart Smart-Proxy with

service foreman-proxy restart

Some plugins may require configuration in /etc/foreman-proxy/settings.d/, check for any .example files.

Installing from Gems

Use install without dependencies below to avoid building native extensions. Ensure the plugin you want is available from rubygems.org as a gem. Plugins that aren't published (just git repos) can't be installed with this method without being built as a gem.

 gem install --ignore-dependencies smart_proxy_pulp

If you need other dependencies (see the rubygems.org page), check the yum repo above or install the same way with 'gem'. Smart-Proxy relies on bundler for loading of dependencies; you'll need to update bundler configuration as detailed below.
Restart Smart-Proxy with

service foreman-proxy restart

If you hit problems, uninstall the added gems with

gem uninstall -v VERSION GEM

From Source Installations

Chances are plugin that developers already created bundler configuration file that you can use. Check bundler.d/ directory located in plugin gem source directory. Otherwise, It is recommended to use ~foreman-proxy/bundler.d/Gemfile.local.rb so that it is not overwritten by future upgrades. If it's published on rubygems.org, just add the name and the latest released version will be downloaded. Add to bundler.d/Gemfile.local.rb:

gem 'smart_proxy_pulp'

Bundler can install the plugin from a git repository. Add to bundler.d/Gemfile.local.rb:

gem 'smart_proxy_pulp', :git => "https://github.com/theforeman/smart-proxy-pulp" 

Next, as a Foreman user (not root), run the following command:

$ bundle update foreman_sample_plugin

Updated by Anonymous over 10 years ago · 2 revisions