我正在尝试使用--from-code
从 GitHub 获取应用程序代码的选项来创建 OpenShift 应用程序。我创建了两个不同的 OpenShift 快速入门 - 一个,该--from-code
选项有效,另一个,它不起作用。
很明显,我在 QuickStart 中做错了什么,这不起作用。但我看不出我做错了什么。我要么得到error 504
要么an error occurred
,两者都没有告诉我问题出在哪里,而且似乎没有verbose
标志可以获取有关错误的更多详细信息。
Tests-Mac:~ testuser$ rhc app create sonr diy-0.1 http://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-redis-cart --from-code https://github.com/citrusbyte/SONR.git
The cartridge 'http://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-redis-cart' will be downloaded and installed
Application Options
-------------------
Domain: schof
Cartridges: diy-0.1, http://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-redis-cart
Source Code: https://github.com/citrusbyte/SONR.git
Gear Size: default
Scaling: no
Creating application 'sonr' ... Server returned an unexpected error code: 504
Tests-Mac:~ testuser$ rhc app create sonr diy-0.1 http://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-redis-cart --from-code https://github.com/citrusbyte/SONR.git
The cartridge 'http://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-redis-cart' will be downloaded and installed
Application Options
-------------------
Domain: schof
Cartridges: diy-0.1, http://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-redis-cart
Source Code: https://github.com/citrusbyte/SONR.git
Gear Size: default
Scaling: no
Creating application 'sonr' ...
An error occurred while communicating with the server. This problem may only be temporary. Check that you have correctly specified your
OpenShift server 'https://openshift.redhat.com/broker/rest/domain/schof/applications'.
Tests-Mac:~ testuser$
那就是--from-code
使用这个 repo 创建一个应用程序:https ://github.com/citrusbyte/SONR 。如果我使用这个仓库,它可以完美运行:https ://github.com/citrusbyte/openshift-sinatra-redis
代码本身似乎很好,因为我可以创建一个空的新应用程序,合并 SONR 代码,它可以完美运行。
我究竟做错了什么?
更新:我通过分两个阶段创建应用程序而不是一个阶段来解决这个问题:
rhc app create APPNAME diy-0.1 http://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-redis-cart
cd APPNAME
git remote add github -f https://github.com/citrusbyte/SONR.git
git merge github/master -s recursive -X theirs
git push origin master
不过,我仍然很想知道为什么一步到位会失败。