Helping to empower small labs

... and big ones if needed

Bonsai Deployment



1 Introduction

This document intends to give details about deploying BonsaiLIMS. BonsaiLIMS is a web application powered by Django(http://www.djangoproject.com) development environment. Django is a modern, easy-to-use web programming framework written in Python programming language.

Steps given below are tested on tmrc-django-dev server.



2 Environment

  • Basic Installation
    • Windows
    • Apache 2.2
    • Python 2.4.3


  • Sources
    • bonsai.zip
    • site_media.zip


  • Dependencies
    • Django 1.0.2
    • mod_python
    • Oracle Instant Client 11.1 Basic
    • cx_Oracle
    • python-ldap
    • setuptools
    • simplejson


3 Installation Steps

  1. It is assumed that Apache server is already installed.
  2. Download Django 1.0.2 and follow the steps there.
  3. Download and install mod_python
  4. Execute BonsaiLIMS_DDL_Oracle11g.sql as the schema owner of the Oracle database where you are deploying the software.
  5. Download and install Oracle Instance Client 11.1 Basic.
  6. Download and install cx_Oracle
  7. Download and install python-ldap
  8. Download and install setup-tools
  9. Download and install python-simplejson



  10. 4 Validate Install

    (i) CHECK POINT

     
       $ python
       >> import cx_Oracle
       >>

    Open a python shell by going to start > run > cmd. Then type 'Python'. This will bring up a new interactive python shell. Test that the cx_Oracle module can be imported by typing 'include cx_Oracle'. If the installation was successfull you should not get any error messages. messages or warnings.



    4 Installing the Sources

    1. Unzip bonsai.zip and make a note of this location i.e. C:\Apps\Bonsai
    2. Unzip site_media.zip under your Apache server's root folder


    5 Configuring Apache

    Modify httpd.conf and add a referece to bonsai.conf

    bonsai.conf

    <Location "/">
            SetHandler python-program
            PythonHandler django.core.handlers.modpython
            SetEnv DJANGO_SETTINGS_MODULE bonsai.settings
            PythonOption django.root /bonsai
            PythonPath "['C:\MyPythonAddonsDir\', 'C:\Apps\Bonsai'] + sys.path"
            PythonDebug On
    </Location>
     
    <Location "/site_media">
            SetHandler None
    </Location>


    6 Post Installation

    Restart Apache