我做了什么?
创建了application
rhc app create map https://cartreflect-claytondev.rhcloud.com/reflect?github=openshift-cartridges/openshift-wildfly-cartridge
将其配置为binary部署
rhc app configure -a <your application's name> --deployment-type binary
然后我做了
mkdir binary-deployment && cd binary-deployment/ && mkdir -p build-dependencies/.m2 repo/deployments dependencies/jbosseap/deployments
复制战争文件
cp ~/code/IdeaProjects/others/tweetstream/target/tweetstream.war repo/deployments
创建tar.gz
tar -zcvf tweetstream-archive.tar.gz binary-deployment
可以看作是
drwxr-xr-x 5 harith Y\Domain Users 170 Jul 20 18:26 binary-deployment
-rw-r--r-- 1 harith Y\Domain Users 6124729 Jul 20 18:27 tweetstream-archive.tar.gz
现在,当我部署它时,我看到了
Deployment of file '/Users/harith/Downloads/tmp/tweetstream-archive.tar.gz' in progress for application map ...
Starting deploy for binary artifact
Stopping gear
Stopping wildfly cart
Creating new deployment directory
Preparing deployment
Preparing build for deployment
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
/bin/tar: Ignoring unknown extended header keyword `LIBARCHIVE.creationtime'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.dev'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.ino'
/bin/tar: Ignoring unknown extended header keyword `SCHILY.nlink'
Deployment id is b7d53465
Distributing deployment
Distribution status: success
Activating deployment
Deploying WildFly
Starting wildfly cart
Timed out waiting for http listening port
Activation status: failure
Activation failed for the following gears:
undefined method `values' for nil:NilClass
Error deploying local file. You can try to deploy manually with:
ssh -t 53cc68dfe0b8cd921f000035@map-tweetstream.rhcloud.com 'oo-binary-deploy'
SSH command finished with exit status = 255
我做错了什么?
答案 0 :(得分:1)
tweetstream-archive.tar.gz
的布局与OpenShift部署档案的布局不匹配。对于WildFly,正确的布局是:
build_dependencies/
dependencies/
jbosseap/
deployments/
tweetstream.war
repo/
.openshift/ # optional
这是WAR文件必须位于目录dependencies/jbosseap/deployments
中,binary-deployment
目录不能是归档的一部分。另见:https://www.openshift.com/kb/kb-e1088-how-to-deploy-pre-compiled-java-applications-war-and-ear-files-onto-your-openshift-gear