Installation Guide

Grano is intended to be easy to install and modify. If you just want to experiment with the application, you can also explore the development instance at beta.grano.cc.

These instructions are for making a developer installation of grano. If you want to set up a production site you’ll need to tweak these instructions to run the application behind a proper web server (e.g. using gunicorn).

Dependencies

Before installing grano, make sure you have the following dependencies available on your system (consider using Vagrant or Docker to isolate the project):

  • Python 2.7 and virtualenv
  • Postgres 9.3 or newer (other databases will not work)

When you set up grano, first check out the application from GitHub, create a virtual environment and install the Python dependencies:

git clone https://github.com/pudo/grano.git
cd grano
virtualenv env
source env/bin/activate
pip install -r requirements.txt
python setup.py develop 

If you’re unfamiliar with virtualenv, be aware that you will need to execute the source env/bin/activate command each time you’re working with the project.

Configuration

Next, you’ll need to configure grano. Copy of the file grano/default_settings.py, e.g. as settings.py in the repository base. Open the file and set up the various account configurations, especially the database connection string. Make sure you provide an empty Postgres database with UTF-8 set as the encoding.

Once the new configuration is set up, you need to an environment variables pointing grano to the configuration file you’ve created and then instruct it to create the necessary database schema:

export GRANO_SETTINGS=`pwd`/settings.py
createdb grano
grano db upgrade head

Setting up sample data

Once this is done, you can, optionally, import schema specifications from a flat file (this can also be done via the API or in the administrative user interface):

grano schema_import <projectname> <YOUR_MODEL.yaml>

To load the demo project:

cd ../demo/demo_python
grano schema_import opennews2 ./model.yaml
python ./loader.py

Finally, you can run grano:

grano runserver