[Pacemaker] the crm command line interface
Dejan Muhamedagic
dejanmm at fastmail.fm
Fri Sep 5 14:59:28 UTC 2008
Hi,
Can't read XML? Then this may be something for you...
For some time the command line interface for the CRM/Pacemaker
has been in the works. About one month ago I posted a draft
specification and user guide to the development list. There was
no response, so I assumed that everybody was happy with it ;-)
As I got better grip on how the program could be used, the
specification changed accordingly during the development.
The first release is already in the Pacemaker's development
repository. You can get it here:
http://hg.clusterlabs.org/pacemaker/dev/raw-file/tip/tools/crm.in
To run it, first replace @HA_VARLIBDIR@ with /var/lib or wherever
heartbeat/crm lives. Or compile and install the latest pacemaker
code. Andrew will probably soon make new rpms.
The source of the current documentation:
http://hg.clusterlabs.org/pacemaker/dev/raw-file/tip/doc/crm_cli.txt
It is readable, but to produce an esthetically more pleasing
document, just process it with asciidoc to get PDF or HTML.
CLI consists of two main parts: the management (resource
start/stop, node standby, and similar) and the configuration
part. There is a (very) small language with which it is possible
to specify the cluster configuration. This description is then
translated by the CLI into an XML which the CRM understands.
The management may be used with all versions of heartbeat
v2/pacemaker, as it is using the external tools such as
crm_resource.
The configuration part supports only the development version of
Pacemaker, i.e. it won't work with Pacemaker 0.6.x or Heartbeat
2.1.x versions. If there's a too big an outcry, I may consider
fixing it to support the older releases as well.
To start using it, read the document. If you can't (as most of
you probably won't), just start the program (type crm) and try to
manage with help.
Some things are not implemented yet, but should be there soon
enough:
- tab completion (this seems to me very important, so it is the
first on the list)
- configuring cluster properties (crm_config)
- the "slow" resource configuration (the "enter" command)
Suggestions are, as always, very welcome. If you have a good idea
on how to improve the usability, I'm all ears.
Thanks,
Dejan
More information about the Pacemaker
mailing list