Wednesday, May 28, 2014

Gru Setup and Config

Because I like incremental builds, I always start with the very basic functionality needed then grow outwards that way, scaling the environment as needed and refactoring code on the fly(sic).

Since we still haven't got an official home for Gru{he's still homeless :( } I've refrained from making this deployment procedure the official one on bitbucket's README document. However, for a quick and dirty implementation on localhost, here's how to go about it.

Pre-requisites
1. Linux Kernel 2.6+ (M$ Windoze people, sorry)
2. Python (preferably 2.7.x)
3. Selector (pip install selector) -- used for routing on a WSGI server
4. MySQLdb(apt-get install python-mysqldb) -- connector between python and mysql
5. MySQL Server 5.4+(Obviously)
6. Open port(8080)

Steps
Get index.py from the repo and run it with

python index.py &
 Always make sure to stop the server before starting again with
killall python

Error Reporting
Please report any (logical) errors here -- https://bitbucket.org/techxusteam/grus-server-geoaddress/issues?status=new&status=open

N/B: "Python Server is blocking port.."  is NOT an error! Python does not control port access, the OS does. Ask for help first before forming a conclusion on what's possible and what's not.

P/S: Because of the lack of immediate consistency in MySQL, DB changes were not immediately reflected. This has been corrected by explicitly opening and closing the db connection for each subsequent query(just like PHP).

EDIT: Updated README here <--

No comments:

Post a Comment