When exploring OpenSAF, working on a bug or a new feature it is probably best to use the simplest and smallest possible target system. OpenSAF can be built, installed and run unprivileged locally on a system. Of course this is a "single node cluster" but HA features of software components can still be tested since for example active/standby entities can be located on the same node.
These are the steps:
Create a directory where OpenSAF will be installed:
$ mkdir -p $HOME/local/bin
Build OpenSAF with one important option, namely "--prefix"
$ cd <my OpenSAF="" repo="">
$ ./bootstrap.sh
Note: Running the bootstrap.sh is not applicable when using the downloaded OpenSAF tarball.
$ ./configure --prefix=$HOME/local --with-initscriptdir=$HOME/local/bin <whatever other="" options="" you="" want...="">
$ make -j
Install OpenSAF to the specified local directory
$ make -j install
Configure opensaf as normal:
Set up the environment:
$ export PATH=$HOME/local/bin:$PATH
$ export PYTHONPATH=$HOME/local/lib/python2.7/site-packages:PYTHONPATH
$ export LD_LIBRARY_PATH=$HOME/local/lib:$LD_LIBRARY_PATH
Start OpenSAF:
$ opensafd start
Display IMM contents
$ immfind
Display AMF state:
$ amf-state
Stop OpenSAF:
$ opensafd stop
Note no sudo or virtualization!
Currently there are a few ugly logs from OpenSAF that could be fixed but those can be ignored.
Good instructions but i had some small problems when following it.
To help others not get suck on the same, here is what i got stuck on.
The line export PYTHONPATH=$HOME/local/lib/python2.7/site-packages:PYTHONPATH is missing a $ sign on the last PYTHONPATH so copy paste does not work.
Also i would like to clarify that my short hostname it is for example the "SC-1" etc not the one you get from "hostname -s".
You need to use the flag "CPPFLAGS=-DRUNASROOT" or configure the opensaf user as described in the README.conf