Rfaulk has uploaded a new change for review. https://gerrit.wikimedia.org/r/84487
Change subject: add - more docs around virtualenv. ...................................................................... add - more docs around virtualenv. Change-Id: Ic142a7f47adae8e07b88df5fca64dbc9c42596ba --- M README.md 1 file changed, 24 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics refs/changes/87/84487/1 diff --git a/README.md b/README.md index f74c363..2cdadbb 100644 --- a/README.md +++ b/README.md @@ -31,16 +31,6 @@ Now you should be able to browse to [user metrics running locally][local_vagrant_user_metrics_server] and start working. The code that's being served is under the user\_metrics folder and you can use that like any clone of a gerrit repository. -Setup a Virtual Environment ---------------------------- - -Note: instructions to install a virtualenv here - http://www.virtualenv.org/en/latest/. - -Create virtualenv with `virtualenv <your virtualenv>` - -Activate with `source <yourenv>/bin/activate` - - Installing Umapi ---------------- @@ -49,14 +39,35 @@ Navigate to `user-metrics` and run `pip install -e .` +Setup a Virtual Environment +--------------------------- + +Note: instructions to install a virtualenv here - http://www.virtualenv.org/en/latest/. + +Create virtualenv with `virtualenv <your virtualenv>` + +Activate with `source <yourenv>/bin/activate` + +Once in the virtualenv run navigate to your user-metrics project folder (contains setup.py) and do a local install of +user-metrics with: + + $ pip install -e . + +This should take care of all of the dependencies for the project. + +To leave the virtualenv simply call: + + $ deactivate + + Configure the clone ------------------- In user_metrics/config run `cp settings.py.example settings.py` and configure as instructed below to point to datasources. Ensure that -datasource hosts are reachable from your environment. To run the server execute: +datasource hosts are reachable from your environment. In the virtualenv, create a 'logs' folder and run the server with: - $ python user_metrics/api/run.py - $ python user_metrics/api/run_handlers.py + $ nohup python -u user_metrics/api/run.py > logs/access.log & + $ nohup python -u user_metrics/api/run_handlers.py > logs/access.log & The module run.py initiates the flask web server and is also the wsgi target if the instance is being run via Apache. Also it is necessary to execute run_handlers.py which initiates the job handling processes. If you are running the -- To view, visit https://gerrit.wikimedia.org/r/84487 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic142a7f47adae8e07b88df5fca64dbc9c42596ba Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk <rfaulk...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits