Expanding on this question I am trying to deploy Django on OpenShift but I'm having some problems understanding OpenShift.
I have managed to get as far as setting up a quick app with the git repo https://github.com/openshift/django-example but have the following questions:
- Can I develop locally after git cloning to my local? (virtualenv, adding packages)
- Packages, what's the deal? local, remote, adding, sycing, virtualenv, git, ...
I came across this line in Nate Aune's PaaS Bakeoff (slide 42) for setup.py and it looks quite useful:
install_requires=open('%s/project.txt' % \ os.environ.get('OPENSHIFT_REPO_DIR', PROJECT_ROOT)).readlines(),
(because I know I can pip freeze > requirments.txt
in my virtualenv)
... Is %s/project.txt
in wsgi
or tthe directory below wsgi
? Do I have to set PROJECT_ROOT
with some funky os
stuff?
EDIT
Basically:
- Is it best to ssh into your OpenShift application (lest say you have a
dev
one) and work there or work off a local copy? - How do you install python packages after you have ssh'ed in to your OpenShift app? (virtualenv)
- If you ssh'ed into your OpenShift app do you have to do anything after: creating a project, creating an app (
manage.py startapp ...
), changing code in your django app
If local is the best option:
- How do I use the example locally?
- Do I need to setup a virtualenv to work locally?
- How do I make sure the python packages django needs are on OpenShift?
- How do I add python packages to my OpenShift version (I'm presuming
git
doesn't do that)