Jump to: navigation, search



Stackalytics depends on the following applications:

* Git - used to retrieve project repos and get their log 
* Memcached - used to store commits
* Mongo - used to store persistent data, like list of repos, engineers, configs

Web dashboard is made on Flask framework. Typical deployment of Flask application uses nginx as front-end server and uwsgi as app container. For development purposes Stackalytics may be run on DevStack. The project doesn't require any libraries not listed in OpenStack requirements project.


Stackalytics deployment is verified on both Ubuntu and CentOS, however the first option is preferable since it has all necessary components as system packages.

1. Install necessary applications

 sudo apt-get install mongodb memcached

2. Create folders needed for Stackalytics

 mkdir /opt/stack/stackalytics
 mkdir /var/local/stackalytics 

The last folder is a place where all repos are checked out.

3. Check out Stackalytics code

 cd /opt/stack/stackalytics
 git clone git://github.com/stackforge/stackalytics.git

4. Install Stackalytics:

 cd /opt/stack/stackalytics
 sudo python setup.py install

This will install Stackalytics and all needed libraries into the system.

5. Sync default data (users, repos, companies)

 stackalytics-processor --sync-default-data

This command loads all default data into mongo.

6. Process all registered repos:


This command checks out all repos and parses them. Debugging may be enabled by passing --debug parameter (--verbose for error debugging)

7. Run dashboard in development mode:


This command starts dashboard to listen on port 5000. The port may be changed by --listen-port parameter.

Production deployment

Production deployment is done with help of uwsgi and nginx.

uwsgi config:


nginx config:

server {
	listen   80; 
	location / {
        	uwsgi_pass  unix:///tmp/stackalytics.sock;
        	include     uwsgi_params;
	location  /static/ {
        	alias  /opt/stack/stackalytics/dashboard/static/;