Installing Kwapi from source¶
Clone the Kwapi git repository to the management server:
$ git clone https://github.com/grid5000/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:
$ xen-create-image --hostname=kwapi --ip=ip_address --dist jessie --role=udev
You can find more informations about this procedure here: https://www.grid5000.fr/w/TechTeam:Puppet_4_admin
Start your VM:
$ xm create /etc/xen/kwapi.cfg
Install configuration tool on the VM. Puppet manifests and files are available (soon) in grid5000-puppet on INRIA Gitlab. 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 hiera YAML file to add grid5000::kwapi class on the node.
Test your new feature on the VM:
$ rake feature:test host=kwapi.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
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:
Start the forwarder on this machine and a remote machine (optional):
Start the API plugin if you want to access metrics with the API:
Start the RRD plugin if you want to store data as RRD (mandatory to display graphs in a web browser):
Start the HDF5 plugin if you want to store fine grained datas:
Start Live plugin to active Web visualisation of your mesures:
Start Ganglia plugin to push data to the remote Ganglia server:
Don’t forget to stop Kwapi daemon service before activating modules in foreground or it will result on conflict problems and data corruption !