Create the docker container.
$ docker run --privileged -it -h SC-1 ubuntu:16.04
Inside the container, install packages needed for OpenSAF.
$ apt update
# packages for development
$ apt install -y mercurial gcc g++ libxml2-dev automake m4 autoconf libtool pkg-config make python-dev libsqlite3-dev rpm vim
# packages for runtime
$ apt install -y sqlite3 libxml2 psmisc
Clone source OpenSAF.
$ hg clone http://hg.code.sf.net/p/opensaf/staging opensaf-staging
Build & Install.
$ cd opensaf-staging
$ ./bootstrap
$ ./configure --enable-tipc CPPFLAGS="-DRUNASROOT"
$ make
$ make install
$ ldconfig
Generate /etc/opensaf/imm.xml
.
$ cd /usr/local/share/opensaf/immxml/
# generate nodes.cfg
$ ./immxml-clustersize --sc-count 1
Successful, result stored in the file ./nodes.cfg
$ ./immxml-configure
Successfully generated the imm file: ./imm.xml.20241012_1044
$ cp imm.xml.20241012_1044 /etc/opensaf/imm.xml
Edit /etc/opensaf/dtmd.conf
.
DTM_NODE_IP=172.17.0.2
# 172.17.0.2: IP of the eth0 interface.
Edit /etc/opensaf/node_name
.
SC-1
# SC-1: hostname.
Start OpenSAF.
$ /etc/init.d/opensafd start
Check status.
$ /etc/init.d/opensafd status
safSISU=safSu=SC-1\,safSg=NoRed\,safApp=OpenSAF,safSi=NoRed1,safApp=OpenSAF
saAmfSISUHAState=ACTIVE(1)
safSISU=safSu=SC-1\,safSg=2N\,safApp=OpenSAF,safSi=SC-2N,safApp=OpenSAF
saAmfSISUHAState=ACTIVE(1)
If you prefer to install on virtual machine, you can use the below iso images: