#rhc app-create tcms python-2.6 mysql-5.1
Then you will get the database information (ipaddress,port,username,password), the app information(ipaddress,port).
(1)create two directory:
#mkdir /tmp/uploads /tmp/log
(2)create database named "nitrate" in mysql
#git clone git@github.com/xltian/nitrate.git
And copy the source code to the app.
# cp -rf nitrate/* tcms/
DATABASE_ENGINE = 'mysql'
DATABASE_NAME = 'nitrate'
DATABASE_USER = os.environ['OPENSHIFT_MYSQL_DB_USERNAME']
DATABASE_PASSWORD = os.environ['OPENSHIFT_MYSQL_DB_PASSWORD']
DATABASE_HOST = os.environ['OPENSHIFT_MYSQL_DB_HOST']
DATABASE_PORT = os.environ['OPENSHIFT_MYSQL_DB_PORT']
#!/usr/bin/python
import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'tcms.settings'
sys.path.append(os.path.join(os.environ['OPENSHIFT_REPO_DIR']))
virtenv = os.environ['OPENSHIFT_PYTHON_DIR'] + '/virtenv/'
os.environ['PYTHON_EGG_CACHE'] = os.path.join(virtenv, 'lib/python2.6/site-packages')
virtualenv = os.path.join(virtenv, 'bin/activate_this.py')
try:
execfile(virtualenv, dict(__file__=virtualenv))
except IOError:
pass
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
SSH into the app
If this is your first time, please run "django-admin.py syncdb", and create superuser, if not, skip this step
django-admin.py syncdb