JRebel with Red Hat OpenShift¶
JRebel remote server support is compatible with Red Hat OpenShift version 3. OpenShift will automatically download the latest version of JRebel and set it up for use when detecting
Follow the tutorial below to get started with JRebel and OpenShift.
Red Hat OpenShift and JRebel remote server support tutorial¶
Install and configure JRebel on your local workstation.
Follow the instructions to set up the OpenShift environment, including installing Vagrant or Docker (as necessary).
Launch the local OpenShift environment and log in.
Create a new OpenShift project:
$ osc new-project test
Provide a demo application. The demo application needs to meet the following requirements:
5.1 It should be a Maven project, built with a
mvn clean build.
5.2 Configured to use JRebel remote server support. The
WARfile produced by the Maven build has to contain
5.3 The application should be available through a public Git repository. We recommend using GitHub.
Create the new OpenShift application:
$ osc new-app https://github.com/<user>/<repo>
Provide the actual Git repository URL. The URL has to point to the application.
Start the build:
$ osc start-build <app-name> --follow
Consult the output of the previous command (
osc new-app) to get the app name (this should match the GitHub repository name). Once complete, the build output should include the following lines:
JRebel: rebel-remote.xml found in /wildfly/standalone/deployments/<...>.war JRebel: Fetching version index ... JRebel: Latest version is 6.1.3 JRebel: Downloading https://dl.zeroturnaround.com/jrebel/releases/jrebel-6.1.3-nosetup.zip ... JRebel: Extracting jrebel-6.1.3-nosetup.zip ... ...done
Configure your project’s remote server application URL in the IDE to reflect the OpenShift application URL (you can find this from the OpenShift Overview page for the test project).
Press the Synchronize button in your IDE to upload any changes. Now simply refresh the application on the cloud platform and your changes should appear like clockwork! Success!