Binary deployment on OpenShift JBoss EAP
Environment
-
OpenShift Enterprise (OSE)
- 2.x
-
OpenShift Online (OSO)
Issue
- How to perform binary deployment on OpenShift JBoss EAP ?
- We do not want to use
gitfor version control, how can we do binary deployment ?
Resolution
Below are the Steps for enabling and performing binary deployments :
1) Create an application which should not have git enabled :
rhc app create -a kitchensink -t jbossas-7 --no-git
2) Take application's snap-shot :
rhc save-snapshot kitchensink --deployment
3) Extract the tar file.(snapshot)
4) Remove default pom.xml.
5) Put your binaries in repo/deployments.
6) Create the tar-ball again. (With name kitchensink.tar.gz) Make sure build-dependencies, dependencies and repo must be at the root of tar ball.
7) Set the application deployment type to binary :
rhc configure-app kitchensink --deployment-type binary
8) Disable the auto-deployment :
rhc configure-app -a kitchensink --no-auto-deploy
9) Deploy the tarball created in Step-6.
rhc deploy kitchensink.tar.gz -a kitchensink -k
For scaled application
The application becomes unavailable because haproxy makes it down if a valid root url target is not found. One need to copy ROOT.war from dependencies to deployments folder in the extracted tar ball as below and then create the tar file:
cp dependencies/jbosseap/deployments/ROOT.war repo/deployments/
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
