2013-02-12 70 views
1

我想將appfuse部署到cloudfoundry。當我運行這些UNIX命令:如何在cloudfoundry或其他地方部署appfuse?

mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-spring-archetype -DarchetypeVersion=2.2.1 -DgroupId=se.ova -DartifactId=artpage -DarchetypeRepository=http://oss.sonatype.org/content/repositories/appfuse 
cd artpage 
mvn clean install -Ppostgresql 
vmc push 
more ~/.vmc/crash 

我得到這個消息:

Time of crash: 
    2013-02-12 11:24:26 +0100 

CFoundry::AppInvalid: 300: Invalid application description 

cfoundry-0.4.21/lib/cfoundry/v1/base.rb:113:in `handle_response' 
cfoundry-0.4.21/lib/cfoundry/baseclient.rb:146:in `block in request_uri' 
/usr/lib/ruby/1.9.1/net/http.rb:745:in `start' 
cfoundry-0.4.21/lib/cfoundry/baseclient.rb:127:in `request_uri' 
cfoundry-0.4.21/lib/cfoundry/baseclient.rb:48:in `request' 
cfoundry-0.4.21/lib/cfoundry/baseclient.rb:44:in `request_path' 
cfoundry-0.4.21/lib/cfoundry/baseclient.rb:193:in `request_with_options' 
cfoundry-0.4.21/lib/cfoundry/baseclient.rb:205:in `post' 
cfoundry-0.4.21/lib/cfoundry/v1/model_magic.rb:34:in `block (2 levels) in define_client_methods' 
cfoundry-0.4.21/lib/cfoundry/v1/model.rb:72:in `create!' 
vmc-0.4.7/lib/vmc/cli/app/push/create.rb:59:in `block in create_app' 
interact-0.5.2/lib/interact/progress.rb:98:in `with_progress' 
vmc-0.4.7/lib/vmc/cli/app/push/create.rb:58:in `create_app' 
vmc-0.4.7/lib/vmc/cli/app/push.rb:95:in `setup_new_app' 
vmc-0.4.7/lib/vmc/cli/app/push.rb:82:in `push' 
mothership-0.3.5/lib/mothership/base.rb:61:in `run' 
mothership-0.3.5/lib/mothership/command.rb:68:in `block in invoke' 
manifests-vmc-plugin-0.4.19/lib/manifests-vmc-plugin/plugin.rb:113:in `call' 
manifests-vmc-plugin-0.4.19/lib/manifests-vmc-plugin/plugin.rb:113:in `block (2 levels) in <class:Manifests>' 
mothership-0.3.5/lib/mothership/callbacks.rb:74:in `with_filters' 
manifests-vmc-plugin-0.4.19/lib/manifests-vmc-plugin/plugin.rb:112:in `block in <class:Manifests>' 
mothership-0.3.5/lib/mothership/command.rb:78:in `instance_exec' 
mothership-0.3.5/lib/mothership/command.rb:78:in `block (2 levels) in invoke' 
mothership-0.3.5/lib/mothership/command.rb:82:in `instance_exec' 
mothership-0.3.5/lib/mothership/command.rb:82:in `invoke' 
mothership-0.3.5/lib/mothership/base.rb:50:in `execute' 
vmc-0.4.7/lib/vmc/cli.rb:106:in `execute' 
mothership-0.3.5/lib/mothership.rb:45:in `start' 
vmc-0.4.7/bin/vmc:11:in `<top (required)>' 
/usr/local/bin/vmc:23:in `load' 
/usr/local/bin/vmc:23:in `<main>' 

有誰有一個想法,什麼是錯的或者我怎麼能在一些其他的PaaS部署AppFuse的? 我已經將roo應用程序部署到了cloudfoundry並且效果很好,但是我有困難來進一步開發roo應用程序,例如添加圖像上傳和電子郵件配置,所以我認爲appfuse會更容易,但我喜歡將它部署到PaaS服務。

回答

3

vmc push假定您要從當前目錄進行部署。這在您的示例中失敗了,因爲沒有可交付應用程序,但是它的來源。

要麼

  • 轉到target/<the_exploded_app>目錄並vmc push
  • 或使用vmc push --path target/<the_exploded_app_or_the_dot_war>

應該這樣做。

+0

謝謝您的建議。我記住這一點,但我仍然得到相同的堆棧跟蹤:'vmc push -path target/artpage-1.0-SNAPSHOT.war'給我回答的vmc問題:我的電子郵件,1個實例,spring和java7 ,512米。我會嘗試一個更簡單的應用程序。我真的不明白服務綁定的一部分,但我想我應該讀更多... – Hurve 2013-02-12 14:29:34

+0

奇怪的確。僅供參考,服務綁定涉及提供某種類型的持久性(例如,我猜你的情況下是MySQL或postgresql),並使您部署的應用程序知道它。反過來,你的應用程序可以明確地連接到它(乏味)或自動地(取決於你的應用程序框架,Spring,Node和RoR支持它)。應該使用appfuse。 – ebottard 2013-02-12 15:38:21

+0

那麼,如果我選擇automagical解決方案,我會在哪裏輸入dbms憑據? – Hurve 2013-02-12 15:40:28

0

如果你看的根本原因,這是遠了堆棧,你會看到一個錯誤的說法,

無法創建索引目錄:/nonexistent/artpage-1.0-SNAPSHOT/index索引組織.appfuse.model.User

這意味着在磁盤上創建索引時沒有寫入權限。 這裏是一個不錯的博客應該幫助你在你的問題:

http://appfuse.547863.n4.nabble.com/Preparing-for-the-2-2-Release-td4655656.html

還記得,創建只會持續只要應用程序實例正在運行的文件。