Example install of Reviewboard for OpenShift
Switch branches/tags
Nothing to show
Pull request Compare This branch is 12 commits behind openshift-quickstart:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.openshift
data
libs
wsgi
.gitignore
README
setup.py

README

OpenShift - ReviewBoard
=====================

This repository is designed to be used with http://openshift.redhat.com/
applications.  To use, just follow the quickstart below.


Quickstart
==========

1) Create an account at http://openshift.redhat.com/
2) Create a python-2.6 application and attach mysql to it:
    $ rhc app create -a reviewboard -t python-2.6
    $ rhc app cartridge add -a reviewboard -c mysql-5.1
3) Add this upstream reviewboard repo
    $ cd reviewboard
    $ git remote add upstream -m master git://github.com/openshift/reviewboard-example.git
    $ git pull -s recursive -X theirs upstream master
4) Then push the repo upstream
    $ git push
5) That's it, you can now checkout your application at:
    http://reviewboard-$yourlogin.rhcloud.com
6) Default Admin Username: Admin
   Default Password: OpenShiftAdmin

Updates
=======

In order to update or upgrade to the latest reviewboard, you'll need to re-pull
and re-push.

1) Pull from upstream:
    $ cd reviewboard/
    $ git pull -s recursive -X theirs upstream master
2) Push the new changes upstream
    $ git push

Note: When new releases are pushed from the reviewboard dev team, your app will
automatically download them on your next git push.


Repo layout
===========
wsgi/ - Externally exposed wsgi code goes
libs/ - Additional libraries
data/ - For not-externally exposed wsgi code
setup.py - Standard setup.py, specify deps here
../data - For persistent data (also env var: OPENSHIFT_DATA_DIR)
.openshift/action_hooks/build - Script that gets run every push, just prior to
    starting your app


Environment Variables
=====================

OpenShift provides several environment variables to reference for ease
of use.  The following list are some common variables but far from exhaustive:

    os.environ['OPENSHIFT_APP_NAME']  - Application name
    os.environ['OPENSHIFT_DATA_DIR']  - For persistent storage (between pushes)
    os.environ['OPENSHIFT_TMP_DIR']   - Temp storage (unmodified files deleted after 10 days)

When embedding a database using 'rhc app cartridge add', you can reference environment
variables for username, host and password. Example for mysql:

    os.environ['OPENSHIFT_MYSQL_DB_HOST']      - DB host
    os.environ['OPENSHIFT_MYSQL_DB_PORT']      - DB Port
    os.environ['OPENSHIFT_MYSQL_DB_USERNAME']  - DB Username
    os.environ['OPENSHIFT_MYSQL_DB_PASSWORD']  - DB Password

To get a full list of environment variables, simply add a line in your
.openshift/action_hooks/build script that says "export" and push.


Notes about layout
==================
Please leave wsgi, libs and data directories but feel free to create additional
directories if needed.

Note: Every time you push, everything in your remote repo dir gets recreated
please store long term items (like an sqlite database) in ../data which will
persist between pushes of your repo.


Notes about setup.py
====================

Adding deps to the install_requires will have the openshift server actually
install those deps at git push time.