The django-example they offer gives a good idea of what the completed Django on OpenShift project should look like, but I thought I'd jot some notes down on how to get there from an existing Django project on Ubuntu Linux.
There are two main parts to this process, (A) OpenShift Tools Set-up, and (B) Set-up Python Django Project for OpenShift.
(A) OpenShift Tools Set-up
(0) Go to OpenShift and sign up for an account.
(1) Install the
rhc
client tool on your local computer.There's some instructions provided, but it boils down to running on your command line:
$ sudo apt-get install ruby-full rubygems git-core
$ sudo gem install rhc
$ rhc #this should now run without errors
(2) Setup your computer to connect to the OpenShift servers.
This should be easy. Just do on the command line:
rhc setup
and follow the on-screen instructions.That should really be all it takes, but note that that will upload your default public encryption key for your computer to OpenShift, namely:
~/.ssh/id_rsa.pub
so you should know the password to that key pair or else you won't be able to connect to OpenShift.If you don't want to use your default key, or some other reason, you can always create a new public/private encryption key pair and upload that (just delete the default one from OpenShift, which you can do through their web interface or on the command line). I'll describe that next.