19

I recently start playing with Openshift and I am wondering if there is a way to deploy ( test) your application on local host before you upload it on openshift. Thing is that every time I make change on the code, it takes some time to push it to openshift and check if it works.

Google app engine SDK ( for Eclipse), for example, includes a web server application (app engine simulator) that allows you to test your app locally before you deploy on google.

thnx Fotis

1 Answer 1

13

There are several options actually (assuming you're creating java projects):

1) deploy it on a local jboss as7: this is completely valid since the runtimes that are offered on OpenShift differ in no way from what you can run locally / in a hosted environment. What's specific to OpenShift is the deployment process. It basically is a git push which triggers a maven build on the PaaS.

2) use the rpms/liveCD: OpenShift is also available as linux rpm packages and as virtual machine appliance (you may run with virtualbox, vm player etc). You'll find more details here: http://blog.jebpages.com/archives/run-openshift-origin-from-livecd-and-make-it-stick/ and here: https://openshift.redhat.com/community/wiki/build-your-own-paas-from-the-openshift-origin-livecd-using-liveinst

3) remote debug the application that is running on OpenShift: You'll find the details here: https://community.jboss.org/en/tools/blog/2012/06/27/deploy-from-eclipse-to-openshift-in-a-breeze

3
  • The JBoss environment on OpenShift differs from a local one in a few trivial ways, i think; OpenShift will pick up a server configuration from .openshift/config/standalone.xml, whereas a local JBoss will need it in configuration. I assume there is a deploy script somewhere in OpenShift that pulls it out and puts it in the right place (OpenShift builds a JBoss server at ~/AppName/jbossas-7/standalone/), but i don't know if there's an easy way to do that locally. Oct 13, 2012 at 13:32
  • if you really want to run jboss as at 100% as it is run on OpenShift, you can tell your local jbossas-7 to run the config file that's used on OpenShift: Simply pass it this config file with the command line parameter --server-config (docs.jboss.org/author/display/AS71/Command+line+parameters) Oct 16, 2012 at 12:59
  • Is there anything else that is different on the OpenShift machines? I had a look through the shell script which starts JBoss there, and there's a lot of stuff going on, but nothing struck me as immediately significant. Oct 16, 2012 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.