Installing¶
Installing Kwapi from source¶
Clone the Kwapi git repository to the management server:
$ git clone https://github.com/lpouillo/kwapi-g5k.git
Data management use numpy, which cannot be installed vi pip. On Debian/Ubuntu, use:
$ apt-get install python-numpy
Run the Kwapi installer and copy the configuration files:
$ pip install kwapi-g5k $ cp -r kwapi-g5k/etc/kwapi /etc/
Installing Kwapi on Grid‘5000¶
Create a VM on the site you want to monitor. You can create a domU with Xen or KVM. The command should be similar to this one:
$ http_proxy="http://proxy:3128/" xen-create-image --hostname=kwapi --ip=ip_address --dist wheezy --role=udev
You can find more informations about this procedure here: https://www.grid5000.fr/mediawiki/index.php/Services_Xen_DomU
Start your VM:
$ xm create /etc/xen/kwapi.cfg
Install configuration tool on the VM. Puppet manifests and files are available in puppet-repo. You must install the right version of Puppet used in Grid‘5000. Installation procedure can be find here: Puppet. After the certificate signing procedure, you should have a new Puppet node named kwapi.site.grid5000.fr.
Configure Kwapi with Puppet. You have to add additional classes on your new Puppet node. Use
puppetplay
to add kwapi-g5k class on the node:$ puppetplay node kwapi.site.grid5000.fr --edit --add-classes kwapi-g5k
Wait one hour or use Capistrano tool to force Puppet execution on the VM.:
$ cap puppet:production HOST=kwapi.site.grid5000.fr MODULE=all SITE=site
Your VM is now configured with latest Grid‘5000 version of Kwapi. You can connect on the node to check Kwapi service status.:
$ ssh kwapi.site.g5kadmin $ sudo service kwapi status
Running Kwapi modules as daemon¶
Kwapi can be started, stoped, restarted with the service command:
$ sudo service kwapi start|stop|restart
This command will start kwapi as a daemon and run the modules indicated in /etc/kwapi/daemon.conf
file.
Running Kwapi modules in foreground (debugging)¶
If you want to manage each Kwapi module individually (drivers and plugins), you can run the following commands.
Start the drivers on all the configured machines:
$ kwapi-drivers
Start the forwarder on this machine and a remote machine (optional):
$ kwapi-forwarder
Start the API plugin if you want to access metrics with the API:
$ kwapi-api
Start the RRD plugin if you want to store data as RRD (mandatory to display graphs in a web browser):
$ kwapi-rrd
Start the HDF5 plugin if you want to store fine grained datas:
$ kwapi-hdf5
Start Live plugin to active Web visualisation of your mesures:
$ kwapi-live
Start Ganglia plugin to push data to the remote Ganglia server:
$ kwapi-ganglia
Warning
Don’t forget to stop Kwapi daemon service before activating modules in foreground or it will result on conflict problems and data corruption !