2

what is the easiest method to run a Java program inside a gear on OpenShift?

I don't need a complex framework or web server. I just need a container to which I can upload my Java Files, compile and execute them in the cloud. The application I have in mind is very simple, a program that gathers some information and that I can connect to via RMI and just ask for the data.

Thanks.

Ciri
  • 371
  • 1
  • 6
  • 19

2 Answers2

5

If you don't need an application server you'd better take a look at DIY cartridge. You'd just have to create it from your code:

rhc app-create yourapp diy-0.1 --from-code git://github.com/(...).git

You could even use git hooks to launch it. Take a look at the hooks I use at my Wedding Tables Planner web, based in this template.

juanignaciosl
  • 3,435
  • 2
  • 28
  • 28
  • Perfect, this is exactly what I need! I can't believe I didn't come across this solution earlier, I was making my life difficult with JBossAS7. Thanks! – Ciri May 30 '14 at 10:41
  • 1
    Well, DIY are still "experimental stuff", so they're not as publicized as they could be, and Application Server cartridges seem to be more interesing for many people :) – juanignaciosl May 30 '14 at 12:24
1

I think easiest is tu run a jbossas app and stop the jbossas cart if necessary. Otherwise you may play with the diy app type.

akostadinov
  • 17,364
  • 6
  • 77
  • 85