We have developed one rails application based on Foreman APIs and that
application is used to deploy platforms(with multiple hosts). Now we wanted
to convert it to foreman plugin and use that feature from foreman
application. Here my application using some other gems like
"delayed_job_active_record", "daemons", "paperclip" etc. My question is how
to include these gems in foreman plugin? Is there any plugin exists like
this scenario ? Please suggest
Typically you specify these as dependencies in the plugin gemspec, e.g.
A plugin is a gem itself, so can depend on others. When installing your
plugin gem, any dependencies that are defined will also be installed.
This does make it harder to package as an RPM or deb, so it's good to
minimise or at least re-use common dependencies.
···
On 12/01/15 11:39, Nagarjuna Rachaneni wrote:
> Hi Foreman Dev,
>
> We have developed one rails application based on Foreman APIs and that
> application is used to deploy platforms(with multiple hosts). Now we
> wanted to convert it to foreman plugin and use that feature from foreman
> application. Here my application using some other gems like
> "delayed_job_active_record", "daemons", "paperclip" etc. My question is
> how to include these gems in foreman plugin? Is there any plugin exists
> like this scenario ? Please suggest
Thanks for your reply, So when i add "delayed_job_active_record",
"daemons", "paperclip" gems as dependencies in the gem spec and install RPM
package, will it install these gems also ?
Regards,
Nagarjuna
···
On Monday, 12 January 2015 17:13:12 UTC+5:30, Dominic Cleal wrote:
>
> On 12/01/15 11:39, Nagarjuna Rachaneni wrote:
> > Hi Foreman Dev,
> >
> > We have developed one rails application based on Foreman APIs and that
> > application is used to deploy platforms(with multiple hosts). Now we
> > wanted to convert it to foreman plugin and use that feature from foreman
> > application. Here my application using some other gems like
> > "delayed_job_active_record", "daemons", "paperclip" etc. My question is
> > how to include these gems in foreman plugin? Is there any plugin exists
> > like this scenario ? Please suggest
>
> Typically you specify these as dependencies in the plugin gemspec, e.g.
>
>
> https://github.com/theforeman/foreman-docker/blob/master/foreman_docker.gemspec#L21
>
> A plugin is a gem itself, so can depend on others. When installing your
> plugin gem, any dependencies that are defined will also be installed.
>
> This does make it harder to package as an RPM or deb, so it's good to
> minimise or at least re-use common dependencies.
>
> --
> Dominic Cleal
> Red Hat Engineering
>
If you install it via a gem install (for source or Debian installs) then
it will install those dependencies, but to package the plugin as an RPM
then you need to package those gems as RPMs too.
As an example, foreman_docker depends on docker-api and so it's
specified in the gemspec, which ensures it's installed:
Plus we have both foreman_docker and docker-api RPMs, and the
foreman_docker one depends on the latter:
Thanks for your reply, So when i add “delayed_job_active_record”,
“daemons”, “paperclip” gems as dependencies in the gem spec and install
RPM package, will it install these gems also ?
Regards,
Nagarjuna
On Monday, 12 January 2015 17:13:12 UTC+5:30, Dominic Cleal wrote:
On 12/01/15 11:39, Nagarjuna Rachaneni wrote:
> Hi Foreman Dev,
>
> We have developed one rails application based on Foreman APIs and
that
> application is used to deploy platforms(with multiple hosts). Now we
> wanted to convert it to foreman plugin and use that feature from
foreman
> application. Here my application using some other gems like
> "delayed_job_active_record", "daemons", "paperclip" etc. My
question is
> how to include these gems in foreman plugin? Is there any plugin
exists
> like this scenario ? Please suggest
Typically you specify these as dependencies in the plugin gemspec, e.g.
https://github.com/theforeman/foreman-docker/blob/master/foreman_docker.gemspec#L21
<https://github.com/theforeman/foreman-docker/blob/master/foreman_docker.gemspec#L21>
A plugin is a gem itself, so can depend on others. When installing
your
plugin gem, any dependencies that are defined will also be installed.
This does make it harder to package as an RPM or deb, so it's good to
minimise or at least re-use common dependencies.
--
Dominic Cleal
Red Hat Engineering