= Development =

== Tools ==

++++
<ul class="nav">
<li><a href="https://github.com/ClusterLabs/crmsh"><i class="fa fa-code-fork fa-3x fa-fw"></i> Source Repository</a></li>
<li><a href="http://clusterlabs.org/mailman/listinfo/users"><i class="fa fa-envelope fa-3x fa-fw"></i> Mailing List</a></li>
<li><a href="https://github.com/ClusterLabs/crmsh/issues"><i class="fa fa-bug fa-3x fa-fw"></i> Issue Tracker</a></li>
<li><a href="irc://freenode.net/#clusterlabs"><i class="fa fa-comments fa-3x fa-fw"></i> IRC: #clusterlabs on Freenode</a></li>
<li><a href="https://github.com/ClusterLabs/crmsh/commits/master.atom"><i class="fa fa-rss fa-3x fa-fw"></i> Atom feed</a></li>
</ul>
++++

== Source Code ==

The source code for `crmsh` is kept in a
http://git-scm.com/[git] repository
hosted at https://github.com[github]. Use +git+ to get a working copy:

----
git clone https://github.com/ClusterLabs/crmsh.git
----

Dependencies
~~~~~~~~~~~~

Building and installing crmsh requires Python version 2.6 and up (but not 3, yet).

Additionally, the following Python modules are needed:

* `lxml`
* `PyYAML`
* `setuptools`
* `parallax`
* `python-dateutil`

Building
~~~~~~~~

`crmsh` uses the autotools suite to manage the build process.

----
./autogen.sh
./configure
make
make install
----

=== Tests ===

The unit tests for `crmsh` require +nose+ to run. On most distributions, this can be installed
by installing the package +python-nose+, or using +pip+.

To run the unit test suite, go to the source code directory of `crmsh`
and call:

----
./test/run
----

`crmsh` also comes with a comprehensive regression test suite. The regression tests need
to run after installation, on a system which has both crmsh and pacemaker installed. You
will also need to install +pacemaker+ development headers.

* link:https://github.com/ClusterLabs/pacemaker[pacemaker]

To execute the tests, call:

----
/usr/share/crmsh/tests/regression.sh
cat crmtestout/regression.out
----
