Eric D. Schabell: OpenShift Tips & Tricks - create your instance based on an existing project

Wednesday, February 6, 2013

OpenShift Tips & Tricks - create your instance based on an existing project

The latest release of the OpenShift Origin project command line tooling gives us a powerful feature to shorten the steps it takes to setup, for example, the various projects demoed in my OpenShift Primer book. 

Below you will find a single example to demonstrate how much easier it is now to setup existing demo projects. You can update your install on osX with:

$ sudo gem update rhc

If you have not yet installed the client tooling, you can do that as follows on osX:

$ sudo gem install rhc

We used to need various steps to setup a project, like this mobile JBoss project DevDayUK:

Running on OpenShift

Create an account at http://openshift.redhat.com/
Create a jbosseap-6.0 application
rhc app create -a devdayuk -t jbosseap-6.0
Add this upstream cloudtour repo
cd devdayuk
git remote add upstream -m master git://github.com/eschabell/openshift-devdayuk.git
git pull -s recursive -X theirs upstream master
Then push the repo upstream
git push
That's it, you can now checkout your application at:
http://devdayuk-$namespace.rhcloud.com

We can now shorten this list of tasks dramatically as follows:

Running on OpenShift

Create an account at http://openshift.redhat.com/
Create a jbosseap-6.0 application
rhc app create -a devdayuk -t jbosseap-6.0 --from-code git://github.com/eschabell/openshift-devdayuk.git
That's it, you can now checkout your application at:
http://devdayuk-$namespace.rhcloud.com

I will be updating all my README.md files for all my projects over the coming days to reflect this improvement.