Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

102 lines (61 sloc) 3.54 kb

Installing

Contents:

  • Introduction
  • Requirements
  • Initial Configuration

Introduction

Plug&Play-1.0RC, is componed by two web2py applications:

  • admin: the poderopedia administrator
  • poderopedia: the poderopedia frontend (public-site)

Requirements for Plug&Play1.0RC

  • github
  • Python 2.7 installed
  • web2py Framework installed and running.
  • A Database (MySql or PostgreSQL) installed
  • Additional Python libs urllib2, request, libxml2, rdflib, rdfAlchemy
  • Web Server (for Production environments) Nginx / Apache (script for config both web-servers are provided in the Script directory). Example scripts> . setup-web2py-nginx-uwsgi-on-centos.sh

Optional Requirements for Production

  • Memcached (if you plan use a caching server)

Install:

You must clone the github repo, under the applications directory in the web2py installation:

cd path_to web2py

git clone https://github.com/poderopedia/plug-and-play-1.0-RC applications

This will create two folder under the applications directory (admin and poderopedia).

 applications
   admin_app
   template_app

Initial Configuration

For admin: There are 3 main config files in the models directory:

  • 0.py - contains all mayor settings (database_uri, meta-content, application name, mail-server settings, etc.)
  • 0_memcached - the connection config for the memcached server.
  • db.py - tou must
  • document_cloud.py - contains the credentials to autentificate in DocumentCloud.org.

You must write your settings in these 3 files.

Additonally in 0.py at first you must change the line:

settings.migrate = False

to

settings.migrate = True

After that you should create a symbolic link for uploads directory.

ln -s /path-web2py/applications/template_app/uploads /path-web2py/applications/admin_app/uploads

If you plan use sqlite database you should create a symbolic link for database directory

ln -s /path-web2py/applications/template_app/databases /path-web2py/applications/admin_app/databases

For poderopedia (frontend):

  • 0.py - contains all mayor settings (database_uri, meta-content, application name, mail-server settings, etc.)
  • 0_memcached - the connection config for the memcached server.

database_uri must have the same credentials that you wrote for the admin application.

Testing the admin Installation

In localhost, you must check http://localhost:8000/admin_app

At this point you have created all data models in your database, you only need Pre-populate some data. After this you need change the migrate attribute in the file 0.py from True to False, for example: settings.migrate=False

Pre - Populate (admin):

Before running the full application you needs some initial data (pre-polulate the database and identifying the super-Adminsitrator. For pre-populate the data you must access to the following url in localhost: http://localhost:8000/admin_app/install

Retrieve Documents Metadata from DocumentCloud (admin)

If you have a Repo in DocumentCloud, you may choose to link all documents in that repo, with Plug&Play. For that purpose you have to choose the 'Load metadata from DocumentCloud' option in the Adminstration > DocumentCloud Menu. The operation takes time if you have a large repo.

Testing the Frontend (poderopedia)

In localhost, you must check http://localhost:8000/. If you have any error ticket or page 404, you need to check your config settings in 0.py

That's it.

Jump to Line
Something went wrong with that request. Please try again.