我developped一個Java EE 7的應用程序,在本地運行罰款與WildFly 8WAR文件部署到OpenShift WildFly
我想將它部署到OpenShift。我創建了一個帳戶,添加了一個WildFly 8盒式磁帶,宣佈該應用程序,在本地安裝了Ruby和RHC。
現在,我被困在下一步,我的戰爭文件的部署。
所有文章,OpenShift文檔,其他StackOverflow條目等...提及使用Git!我真的很驚訝,因爲我對使用或學習Git沒有興趣。我已經啓動並運行版本控制,甚至自動構建解決方案(對於好奇的SVN和Maven)。另外我不想讓OpenShift擁有我的應用程序源代碼。我只是想能夠將戰爭文件上傳到OpenShift。
如何將我的war文件簡單地上傳到OpenShift WildFly?
謝謝你的時間。
更新1
我找到了一種方法來選擇手動部署,使用 「RHC配置,應用程序MYAPP --no-自動部署--deployment類型二元」。這工作得很好。
然後我想我應該使用「rhc部署一些\ path \ myapp.war --app myapp」。但這種失敗(有些東西都是由我用「×」隱藏):
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 [email protected] 'oo-binary-deploy'
SSH command finished with exit status = 255
根據該文件,我不知道如果「RHC部署」命令支持標準的戰爭文件。
也許,相反,我應該手動複製文件作爲https://www.openshift.com/kb/kb-e1088-how-to-deploy-pre-compiled-java-applications-war-and-ear-files-onto-your-openshift-gear
公平起見,一旦你部署了戰爭,他們就擁有了你的代碼。期。至於部署,[相關問題](http://stackoverflow.com/q/18695599/785663)提到了這個鏈接:https://www.openshift.com/blogs/getting-started-with-sftp-and -openshift,所以你可以顯然部署一個簡單的副本,一旦你設置了SSH密鑰。 – mabi
該鏈接描述如何使用SFTP上傳源,而不是二進制文件。沒有Cookie給你。 :) –
到目前爲止我發現的最好的是「rhc幫助部署」,提到了從二進制文件部署的可能性。但我仍然不知道如何。 –