1 Reply Latest reply on Sep 18, 2014 6:16 AM by Andre Dietisheim

    Transform a web or ejb project to Openshift

    Nat Gross Newbie

      1. I am new to openshift. But have it up and running. And deploy from Studio.

      2. I haven't used jboss for serious development since jboss 3/4!

      3. I would like to get "into it' again.

      Anyhow, I would like to work on web and ejb/jps projects on local 7.1 server(s), and from time to time deploy to openshift. In other words I would like to deploy an exisiting AS 7 project/app to Openshift because the continuous deploy-test cycle to openshift takes too long.

      I tried to simply add the project to the openshift server, and it 'took' but running the proj on openshift gets 404 errors.

      Please advise.

      thanks

      nat

        • 1. Re: Transform a web or ejb project to Openshift
          Andre Dietisheim Newbie

          Hi Nat

           

          Publishing to OpenShift works in a slightly different manner: There are actually 2 options at hand: there's a source and a war based based approach.

           

          1. To do the source based approach you'd need a single module maven project (multi-module project dont work correctly out of the box yet. Manual intervention is required). Select "Configure->New/Import OpenShift application" and create a new OpenShift application for your project. Once the wizard is finished you'd have your local project ready to get published to OpenShift. The wizard created a server adapter for your project that you can use to publish your project to OpenShift.

          2. To do the binary approach you create a new OpenShift application (New->OpenShift->OpenShift Application) which clones and imports the OpenShift application to your workspace. This new project will hold a deployments folder that you can put wars into. The simples way to achieve that is to drag and drop your ejb project to the OpenShift server adapter. You'll notice a war showing up in the deployments folder of the OpenShift project (the one that was imported from OpenShift when you created a the new application) in your workspace. To have this war deployed you need to turn the source build off on OpenShift (OpenShift builds the source upon publishing). To achieve this you pick OpenShift->Configure Markers in the context menu of your server adapter (or context menu of your OpenShift project in the Project Explorer) and check "Skip Maven Build". When you now publish the OpenShift project to OpenShift the war in the deployments folder will get pushed and deployed. It will show up on a url that matches the project (maven configured) name <openshift-url>/<project-name> (watch the OpenShift logs via OpenShift Server Adapter->OpenShift->Tail Files to pick the details.

           

          Cheers

          André