seansp-zz / CIMetricsAggregator

Tool for aggregating and caching metrics regarding Openstack CI testing results built in Python using Django 1.6.5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CIMetricsAggregator

Tool for aggregating and caching metrics regarding Openstack CI testing results built in Python using Django 1.6.5

Dependencies (*nix)

MariaDB (or MySQL) server
PHP5
Django 1.6.5
nginx
mysql-python
ijson
Python 2.7
uwsgi

Dependencies (Windows)

WAMP Server
mod_wsgi (Look here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi)
Django 1.6.5
mysql-python (Get binary here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python)
ijson
Python 2.7
pyWin32

Deployment Instructions (*nix)

Step 1:
Install the dependencies (listed above) and create a database named 'Metrics'

Step 2:
Clone the github repo into /CIMetricsTool

Step 3:
You must enter the correct username/password into openstack-stats/settings.py for the MariaDB/MySQL database.

Step 4:
Generate the SQL structure using the following command:
python manage.py syncdb

Step 5:
Start both nginx, and uwsgi services using the configurations found in the repo. Note: nginx.conf needs to be copied to /etc/nginx/sites-enabled for the configuration to be loaded properly

Step 6:
Navigate to <your_server>/admin and at least add upstream Jenkins to the source model:
project: openstack/nova worker: Jenkins
And,
project: openstack/neutron worker: Jenkins
Step 7:
The service that actually queries Gerrit and saves the resultant data into the database is found in aggregatorService.py. This service must be started manually, or set to autorun on boot. You can use the following upstart config, or write your own config for your init daemon of choice.

description "CIMetrics Aggregator Service"
author "Gabriel Loewen <gabloe@microsoft.com>"

start on runlevel [234]
stop on runlevel [0156]

exec <SOURCE ROOT>/openstack_stats/aggregatorService.py
respawn

Deployment Instructions (Windows)

Step 1:
Install the dependencies (listed above) and create a database named 'Metrics'

Step 2:
Clone the github repo into C:/CIMetricsTool and change the static root location in settings.py to C:\CIMetricsTool\statsproj\openstack_stats\static

Step 3:
You must enter the correct username/password into openstack-stats/settings.py for the MySQL database.

Step 4:
Generate the SQL structure using the following command:
python manage.py syncdb

Step 5: Add the following to your httpd.conf file:

    WSGIScriptAlias / C:/CIMetricsTool/statsproj/openstack_stats/openstack_stats/wsgi.py
    WSGIPythonPath C:/CIMetricsTool/statsproj/openstack_stats
    <Directory C:/CIMetricsTool/statsproj/openstack_stats/openstack_stats>
    <Files wsgi.py>
    Require all granted
    </Files>
    </Directory>
    Alias /static/ C:/CIMetricsTool/statsproj/openstack_stats/static/
    <Directory C:/CIMetricsTool/statsproj/openstack_stats/static>
    Require all granted
    </Directory>

Step 6:
Navigate to <your_server>/admin and at least add upstream Jenkins to the source model:
project: openstack/nova worker: Jenkins
And,
project: openstack/neutron worker: Jenkins

Step 7:
Restart apache

Step 8:
The service that actually queries Gerrit and saves the resultant data into the database is found in aggregatorService.py. This service must be started manually, or set to autorun on boot.

About

Tool for aggregating and caching metrics regarding Openstack CI testing results built in Python using Django 1.6.5


Languages

Language:JavaScript 64.6%Language:HTML 25.6%Language:CSS 6.4%Language:Python 3.0%Language:Shell 0.2%Language:Nginx 0.1%Language:PHP 0.1%Language:Makefile 0.0%