RETIRED, Fuel anonymous statistics collector
Go to file
Alexander Kislitsky fb8d179c98 Flask blueprints are used
* blueprints are used
* syntax is fixed for flask8
2014-09-29 16:18:33 +04:00
collector Flask blueprints are used 2014-09-29 16:18:33 +04:00
.gitignore Vim swap files mask added into .gitignore 2014-09-19 12:04:23 +04:00
LICENSE Initial commit 2014-09-11 11:42:12 +04:00
README.md Tox and setup.py added 2014-09-29 14:54:56 +04:00

README.md

collector

Prototype of statistic collector

Operations

Install requirements:

pip install -r test-requirements.txt

By default manage_collector.py works with prod settings. For working with test settings use python manage_collector.py --mode option.

For creating DB migration:

python manage_collector.py --mode test db migrate -m "Migration comment" \
-d collector/api/db/migrations/

Create DB user with password 'collector':

sudo -u postgres createuser -DES collector

or:

sudo -u postgres psql
CREATE ROLE collector WITH NOSUPERUSER NOCREATEDB NOCREATEROLE ENCRYPTED PASSWORD 'colector';

Create DB and grant privileges to it:

sudo -u postgres psql
CREATE DATABASE collector;
GRANT ALL ON DATABASE collector TO collector;

For apply the latest migration:

python manage_collector.py --mode test db upgrade -d collector/api/db/migrations/

For revert all migrations:

python manage_collector.py --mode test db downgrade -d collector/api/db/migrations/

For starting test server:

python manage_collector.py --mode test runserver

Example config for uWSGI is located in collector/uwsgi/collector_test.yaml