Inkscope installation (V1.1)
Installation
Inkscope needs severals other products:
Download all the directories of the inkScope project to a folder of your choice
in the following stages, we have chosen /var/www/inkscope
Apache V2 is already installed
-
Choose a tcp port for inkScope
*in the following stages, we have chosen * 8080
-
Modify Apache conf file /etc/apache2/ports.conf to add the following line
Listen 8080
-
Create a virtual host named inkScope
in the folder /etc/apache2/sites-available , create a file inkScope.conf with this content:
<VirtualHost *:8080> ServerName localhost ServerAdmin webmaster@localhost DocumentRoot {inkScope_folder} <Directory "{inkScope_folder}"> Options All AllowOverride All </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> WSGIScriptAlias /inkscopeCtrl {inkScope_folder}/inkscopeCtrl/inkscopeCtrl.wsgi <Directory "{inkScope_folder}/inkScopeCtrl"> Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn ProxyRequests Off # we don't want a "forward proxy", but only a "Reverse proxy" ProxyPass /ceph-rest-api/ {ceph_rest_api_url} CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
Be sure to modify {inkScope_folder} and {ceph_rest_api_url} with the appropriate values
-
Enable proxy module in Apache (if not already enabled)
sudo a2enmod proxy_http sudo service apache2 restart
-
Enable InkScope virtual host:
sudo a2ensite inkScope
No need to restart Apache at this time
-
install mod-wgsi for Apache
sudo apt-get install libapache2-mod-wsgi
-
install python dependencies : simplejson, pymongo, python-requests, and flask 0.10.1
if pip is not installed,
sudo apt-get install python-pip
for simplejson:
sudo easy_install simplejson or sudo pip install simplejson
for pymongo:
sudo easy_install pymongo or sudo pip install pymongo
for flask:
sudo easy_install flask or sudo pip install flask
If you are running Ubuntu 12.04 or an earlier version, you need to get your python-requests module updated to a version >= 1.1.0.
-
run install.sh in inkscope directory to copy conf files in /opt/inkscope/etc and probes binaries
modify /opt/inkscope/etc/inkscope.conf to change:
- mongoDB parameters (mainly mongodb_host)
- ceph-rest-api URL (finishing with /)
- radosgw parameters ( do not forget to grant the required capabilities [usage, users, metadata, buckets] to the admin-user).
The configuration file looks like this:
{ "ceph_conf": "/etc/ceph/ceph.conf", "ceph_rest_api": "10.10.10.11:5000", "mongodb_host" : "10.10.10.10", "mongodb_set" : "mongodb0:27017,mongodb1:27017,mongodb2:27017", "mongodb_replicaSet" : "replmongo0", "mongodb_read_preference" : "ReadPreference.SECONDARY_PREFERRED", "mongodb_port" : 27017, "mongodb_user":"ceph", "mongodb_passwd":"monpassword", "is_mongo_authenticate" : 0, "is_mongo_replicat" : 0, "cluster": "ceph", "status_refresh": 3, "osd_dump_refresh": 3, "pg_dump_refresh": 60, "crushmap_refresh": 60, "df_refresh": 60, "cluster_window": 1200, "osd_window": 1200, "pool_window": 1200, "mem_refresh": 60, "swap_refresh": 600, "disk_refresh": 60, "partition_refresh": 60, "cpu_refresh": 30, "net_refresh": 30, "mem_window": 1200, "swap_window": 3600, "disk_window": 1200, "partition_window": 1200, "cpu_window": 1200, "net_window": 1200, "radosgw_url": "http://127.0.0.1:80", "radosgw_admin": "admin", "radosgw_key": "access-key", "radosgw_secret": "secret-key" }
InkscopeProbe collects Ceph cluster metrics and host metrics and put them in a database named as the cluster and put the data in dedicated mongodb collection. The datamodel is described in datamodel.txt and datamodeloverview.odp
-
needs a mongodb database
-
needs a ceph-rest-api active on a machine ceph-rest-api* can be launched as an apache wsgi application on the same server that inkscopeCtrl. See Configuration tips
-
needs package python-dev (on every host)
sudo apt-get install python-dev
-
needs psutil python module (on every host). Do not install python-psutil but use pip or easy_install to install psutil.
sudo easy_install psutil
-
needs pymongo python module (on every host)
sudo easy_install pymongo
If this have not been done before, run install.sh in inkscope directory to copy conf files in /opt/inkscope/etc and scripts in/opt/inkscope/bin
You could make a link in /etc/init.d
Two daemons are defined:
- sysprobe to collect system information; it must be installed on each machine running Ceph nodes (mon, mds, osd...)
- cephprobe to collect ceph cluster information; it must be installed on only one machine running a Ceph node
Sysprobe collect and push the informations into a mongodb. The config file should be stored at /opt/inkscope/etc/inkscope.conf. The unit of the refresh times is second.
Sysprobe is defined as a daemon:
sysprobe.py start|stop|restart
A Ceph info collector (cephprobe.py) should be run on a node thant can access to ceph-rest-api and the mongodb.
The config file is also /opt/inkscope/etc/inkscope.conf.
Cephprobe is defined as a daemon:
cephprobe.py start|stop|restart
-
Install "Shell in a box"
sudo apt-get install shellinabox
if not available, find package on this page
-
Modify its config file /etc/default/shellinabox:
SHELLINABOX_ARGS="--no-beep -t"
and restart it service shellinabox restart
-
Modify /etc/apache2/site-available/inkScope.conf to add the following line after ProxyPass /ceph-rest-api/ ...:
ProxyPass /shell http://<hostname>:4200/
where hostname is the host where shell in a box is installed.
Then restart apache2.