Question

I developped a Java EE 7 application, that runs fine locally with WildFly 8.

I'd like to deploy it to OpenShift. I created an account, added a WildFly 8 cartridge, declared the application, installed Ruby and RHC locally.

Now, I'm stuck at the next step, the deployment of my war file.

All articles, OpenShift documentation, other StackOverflow entries, etc... mention using Git! I'm really surprised here, since I have no interest in using or learning Git. I already have up and running version control and even automated build solutions (SVN and Maven for the curious). In addition I do not want OpenShift to have my application sources. I just want to be able to upload the war file to OpenShift.

How do I simply upload my war file to OpenShift WildFly?

Thank you for your time.

Update 1

I found a way to choose manual deployments, using "rhc configure-app myapp --no-auto-deploy --deployment-type binary". This worked fine.

Then I think I'm supposed to use "rhc deploy some\path\myapp.war --app myapp". But this fails (some stuff are hidden by me using "X"s):

Deployment of file 'D:/foo/bar/myapp.war' in progress for application myapp ...
Starting deploy for binary artifact
Stopping gear
Stopping wildfly cart
Creating new deployment directory
Preparing deployment
Preparing build for deployment
gzip: stdin has more than one entry--rest ignored
/bin/tar: Child died with signal 13
/bin/tar: Error is not recoverable: exiting now
An error occurred executing 'gear binary-deploy' (exit code: 2)
Error message: Unable to extract deployment archive using command: /bin/tar -xz

For more details about the problem, try running the command again with the '--trace' option.
Error deploying local file. You can try to deploy manually with:
ssh -t XXXXXXXXXXXXXXXXXXXXXXXX@myapp-mydomain.rhcloud.com 'oo-binary-deploy'
SSH command finished with exit status = 255

According to the documentation, I'm not sure if the "rhc deploy" command supports standard war files.

Maybe, instead, I'm supposed to manually copy the file as described in https://www.openshift.com/kb/kb-e1088-how-to-deploy-pre-compiled-java-applications-war-and-ear-files-onto-your-openshift-gear

OTHER TIPS

You can do rhc port-forward and then access the web console like the directions at the bottom of the readme on this github repo: https://github.com/openshift-cartridges/openshift-wildfly-cartridge

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top