Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A library for developing API's following the HAL spec
Python HTML

Merge pull request #89 from ox-it/descendants-include-id

Include id of oxpoints entity for which the descendants are being returned
latest commit bcc3496158
@ahaith ahaith authored
Failed to load latest commit information.
docs
moxie
.gitignore
.travis.yml
LICENSE.txt Added license file
MANIFEST.in
README.md
fabfile.py
requirements.txt
requirements_dev.txt
runserver.py
runtests.py
setup.py

README.md

moxie

Build Status

The new Mobile Oxford

This repository contains the (server-side) JSON API.

Documentation

Available at Read the docs

Documentation is also available at /docs in the repo, you need to install required packages (Sphinx) from requirements_dev.txt.

You can generate HTML documentation by running make html inside the docs directory.

Requirements

  • Solr 4.4
  • Redis
  • libgeos2
  • pip (easy_install pip)

How to run

Installation

  • pip install -r requirements.txt

Running the application

  • celery worker --app moxie.worker
  • python runserver.py

Options available for runserver.py

  • run with a profiler: python runserver.py --profiler
  • specify the logging level (INFO by default): python runserver.py --log-level DEBUG

Periodically, and the first time, you have to run importers to import data into the search index. You can do this via a Python shell:

>>> from moxie.places.tasks import import_all
>>> import_all.delay()

Deploying with Fabric

Steps:

  • Add your public SSH key to /srv/moxie/.ssh/authorized_keys
  • Execute the fabric script on your local machine, which will then connect to the designated server and run the pre-programmed tasks:

    fab deploy_api:GIT_BRANCH -g USER@GATEWAY -H moxie@PRIVATE_IP

    For example:

    fab deploy_api:master -g martinfilliau@mox-api-front.oucs.ox.ac.uk -H moxie@192.168.2.102

  • Optional: Use an ssh_config file to define the gateway to and provide aliases for machines behind the front-end server, and the user to connect as. Then the -g flag and username become unnecessary and memorable hostnames can be used instead of IP addresses:

    fab deploy_api:master -H mox-api-1.oucs.ox.ac.uk

    See puppet/fabric/ubuntu-ssh/ssh_config for examples.

Something went wrong with that request. Please try again.