Hurve
Hurve

Reputation: 173

How to deploy appfuse on cloudfoundry or elsewhere?

I would like to deploy appfuse into cloudfoundry. When I run these unix commands:

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

I get this message:

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>'

Does anybody has an idea what is wrong or how I can deploy appfuse on some other PaaS? I have deployed roo applications to cloudfoundry and it works great, but I have diffculties to further develop roo apps and for example adding image upload and email configuration so I thought appfuse would be easier, but I like to deploy it somehow to a PaaS service.

Upvotes: 1

Views: 372

Answers (2)

Ali Moghadam
Ali Moghadam

Reputation: 1270

If you look at the root cause, which is far down the stack, you would see an error saying,

Unable to create index directory: /nonexistent/artpage-1.0-SNAPSHOT/index for index org.appfuse.model.User

This means that there is no write permission as the indexing was being creating on the disk. Here is a nice blog which should help you out on your issue:

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

Also remember that, the files created will only last as long as the app instance is running.

Upvotes: 1

ebottard
ebottard

Reputation: 1997

vmc push assumes that you want to deploy from the current directory. This fails in your example because what is there is not a deliverables app, but the sources for it.

Either

  • go to the target/<the_exploded_app> directory and do vmc push
  • or use vmc push --path target/<the_exploded_app_or_the_dot_war>

that should do it.

Upvotes: 3

Related Questions