When you package resource agents as part of your own project, you should apply the considerations outlined in this section.
![]() | Note |
|---|---|
If you instead prefer to submit your resource agent to the Linux-HA resource agents repository, see Section 11.3, “Submitting resource agents” for information on doing so. |
It is recommended to put your OCF resource agent(s) in an RPM
sub-package, with the name <toppackage>-resource-agents. Ensure that
the package owns its provider directory, and depends on the upstream
resource-agents package which lays out the directory hierarchy and
provides convenience shell functions. An example RPM spec snippet is
given below:
%package resource-agents
Summary: OCF resource agent for Foobar
Group: System Environment/Base
Requires: %{name} = %{version}-%{release}, resource-agents
%description resource-agents
This package contains the OCF-compliant resource agents for Foobar.
%files resource-agents
%defattr(755,root,root,-)
%dir %{_prefix}/lib/ocf/resource.d/fortytwo
%{_prefix}/lib/ocf/resource.d/fortytwo/foobar![]() | Note |
|---|---|
If an RPM spec file contains a |
For Debian packages, like for RPMs, it is
recommended to create a separate package holding your resource agents,
which then should depend on the cluster-agents package.
![]() | Note |
|---|---|
This section assumes that you are packaging with |
An example debian/control snippet is given below:
Package: foobar-cluster-agents Priority: extra Architecture: all Depends: cluster-agents Description: OCF-compliant resource agents for Foobar
You will also create a separate .install file. Sticking with the
example of installing the foobar resource agent as a sub-package of
fortytwo, the debian/fortytwo-cluster-agents.install file could
consist of the following content:
usr/lib/ocf/resource.d/fortytwo/foobar