11.3. Submitting resource agents

If you choose not to bundle your resource agent with your own package, but instead wish to submit it to the upstream resource agent repository hosted on the ClusterLabs repository on GitHub, please follow the steps outlined in this section.

Create a working copy (a Git clone) of the upstream repository with the following command:

git clone git://github.com/ClusterLabs/resource-agents

Then, copy your resource agent into the heartbeat subdirectory:

cd resource-agents/heartbeat
cp /path/to/your/local/copy/of/foobar .
chmod 0755 foobar
cd ..

Next, modify the Makefile.am file in resource-agents/heartbeat and add your new resource agent to the ocf_SCRIPTS list. This will make sure the agent is properly installed.

Lastly, open Makefile.am in resource-agents/doc/man and add ocf_heartbeat_<name>.7 to the man_MANS variable. This will automatically generate a resource agent manual page from its metadata, and then install that man page into the correct location.

Now, add your new resource agents, and the two modifications to the Makefiles, to your changeset:

git add heartbeat/foobar
git add heartbeat/Makefile.am
git add doc/man/Makefile.am
git commit

In your commit message, be sure to include a meaningful description, for example:

High: foobar: new resource agent

This new resource agent adds functionality to manage a foobar service.
It supports being configured as a primitive or as a master/slave set,
and also optionally supports superfrobnication.

Now the patch set is good for review on the mailing list:

git send-email --to=linux-ha-dev@lists.linux-ha.org

git send-email will now roll all local commits not in the upstream repository into a nicely formatted email, and submit that to the mailing list. Please consult man git-send-email for details on configuring and using git send-email.

Once your new resource agent has been accepted for merging, one of the upstream developers will push your patch into the upstream repository. At that point, you can update your checkout from upstream, and remove your own patch set.

git reset --hard origin/master
git pull