diff --git a/README.rst b/README.rst index b5a935c..6965df2 100644 --- a/README.rst +++ b/README.rst @@ -19,11 +19,15 @@ group `_. Usage ===== -In order to use the adapter, you must patch the AppEngine source -distribution, which can be found `here `_ and checked out -by doing:: +Follow the following steps to get Google AppEngine working with MongoDB. - $ svn checkout http://googleappengine.googlecode.com/svn/trunk/ googleappengine-read-only +Get the Google AppEngine Code +----------------------------- + +In order to use the adapter, you must patch the AppEngine source distribution, which can +be found `here `_ and checked out via:: + + $ svn checkout http://googleappengine.googlecode.com/svn/trunk/ googleappengine-read-only Patches are found in the *gae_patches/* directory and are stored by svn revision number. To find the revision number of the respository @@ -31,6 +35,12 @@ that you checked out, go into the root of the repository and type:: $ svn info +Be sure that you meet all the pre-requisites listed in the READM in the AE +directory, and also be sure that you have MongoDB installed and running. + +Patch the AppEngine code +------------------------ + This adapter has been tested against revision 41 from Google AppEngine's svn repository. The following patch (generated by `svn diff`) shows how to modify the AppEngine code in order to use MongoDB:: @@ -85,6 +95,52 @@ you should see output similar to:: If you see no error messages, your patching was successful. +Set the MongoDB Connector Directory +----------------------------------- + +In the AE distribution, we patched *dev_appserver.py* in the previous step, and now we +need to edit it by hand. Open the file in your favorite editor, and look for the line + + "PATH/TO/MONGO-APPENGINE-CONNECTOR/DIRECTORY" + +and change it to the appropriate value. Remember to keep the double quotes. + +Install PyMongo, the Python Driver for MongoDB +---------------------------------------------- + +If you've already installed the MongoDB python driver - PyMongo - you can skip this step. + +To install PyMongo : + + $ easy_install pymongo + +Run the Tests +------------- + +Once AE is patched, pymongo is installed, and MongoDB is up and running, you can test +the installation by running the adapter's unit tests. + +To do so, simply start AE via the SDKs start script *dev_appserver.py* with the full path to the +test/test_site directory in the adapter distribution. So, starting in the root of the +AE SDK : + + $ ./dev_appserver.py /my/path/to/mongodb-appengine-connector/test/test_site + +Then, if you direct your browser to *http://localhost:808* you should see a single test +page that begins with:: + + Datastore API + Test a simple db example... + Test that ids get incremented properly between sessions... + Slightly less simple db test... + Test db exceptions... + Test a delete... + Test a delete on an unsaved object... + ... + +and as long as you don't see the word 'FAIL', all tests pass and you are ready to go. + + Other Notes ===========