The ramblings of Steve-0Posts RSS Comments RSS

Setting up the Nexentastor SA-API on Centos/RHEL 5

Nexentastor, a great storage appliance based on solaris/ZFS, has a pretty powerful API built in for remote management, but building the API on anything other than Ubuntu is an exercise in frustration. Included in this post are my notes on getting it installed and working, after a good bit of work by myself and their support/development team. I’m not going to clean it up too much, but if you follow the steps below on a Centos 5 machine you should be able to get it working. The API tarball has a couple good readme’s that you will definitely want to read/reference, especially for setting up API authentication.

yum install gcc make patch iso-codes-devel libnotify-devel NetworkManager-glib-devel libxml2 libxml2-devel dbus-libs dbus-glib-devel dbus-glib dbus-devel expat-devel perl-XML-Parser perl-XML-Twig

cd /root
wget http://www.nexenta.com/corp/static/files-unstable/NexentaStor-SDK-Linux.tar.gz
tar -xf NexentaStor-SDK-Linux.tar.gz
cd NexentaStor-SDK-Linux/

./build_libs.sh

cd ../examples/C/
make
./example

Enter appliance's IP address: 192.168.1.100

Connection is successful

perl -MCPAN -e shell
cpan> o conf prerequisites_policy follow
cpan> o conf commit
cpan> install Carp::Assert
cpan> install Net::DBus

#Back up /libXX directory, replace dbus libs
mkdir /root/lib64-dbus.bak
cd /lib64
rsync -av *dbus* ~/lib64-dbus.bak/
cd /root/NexentaStor-SDK-Linux/lib
rsync -av *.so* /lib64/

cd /root/NexentaStor-SDK-Linux/examples/perl/
./test.pl 192.168.1.100

To setup authentication using ssh keys, do the following:
On the client machine, generate a rsa key if one doesn’t already exist:
ssh-keygen -N "" -q -f ~/.ssh/id_rsa
And on the nexentastor appliance, add that key. The Key ID should be a name you recognize to keep track of the key, and the key value should start with ssh-rsa AAAAzxvdsa….. and end with XXX== – make sure you leave off the name at the end of the key, this is confusing:

nmc@nexentastor:/$ setup appliance authentication keys add
Key ID : myclient
Key Value : ssh-rsa AAAAB3Nza
......
.....
.... 1I89Q==

Authentication key 'myclient' added

No responses yet

Leave a Reply

You must be logged in to post a comment.