Deploying Grails App to Micro Cloud Foundry

I'm very new to Cloud Foundry and its local VM the Micro Cloud Foundry, so I'm looking for some guidance on deploying a Grails app to the Micro CloudFoundry (v119) using IDEA 12.1 (IU-128.101).  (I have to say, the info from JetBrains on this topic is a bit sparse.)

I downloaded and configured the Micro CloudFoundry.

I then created a very simple, single domain class Grails app. It runs fine in Tomcat.

I defined a WAR artifact and had IDEA build it.  It's WEB-INF/lib contains the Grails JARs.

Finally, I defined a Run config for the Micro Cloud Foundry.

However, when I try to run the Micro Cloud Foundry config, I get an error saying "Cannot compile Groovy files: no Groovy library is defined for module "CloudFoundryDemo"

So clearly, I don't know what I'm doing. :-)  I just don't know what IDEA  or the Micro Cloud Foundry is expecting me to do to make this all work.

Naturally, the folks over at SpringSource have dedicated some time in getting the Eclipse-based SpringSource Tool Suite (STS) to work with VMware's Cloud Foundry as this blog post (and others) reveals: http://blog.springsource.org/2011/04/12/one-step-deployment-with-grails-and-cloud-foundry/

However, I really don't want to switch IDEs just to easily deploy my Grails apps.

Would someone please take mercy on this Cloud Foundry newbie and offer some guidance?

TIA.

--
jack

1 comment

I solved the issues I was having.

It appears the biggest was, I could not connect using the username/password associated with the Micro Cloud Foundry VM itself.  I created a new user account from the VMC command line tool. I then configured the Cloud Foundry Application Server in IDEA to use that account and it all started to work.

In fact, one thing I found very useful was to first try to do everything using the VMC tool. See http://docs.cloudfoundry.com/getting-started.html for complete instructions in doing this.

Once I verified everything was working via the command line, I switched to configuring IDEA.

The only open issue I'm having is that when errors occur, I'm getting no log information on the console in IDEA. I just get an error in the Server output pane that says this:

[2013-03-15 11:09:55,123] Artifact cfdemo: Server is not connected. Deploy is not available.
[2013-03-15 11:10:03,343] Artifact cfdemo: Artifact is being deployed, please wait...
Connected to server
[2013-03-15 11:10:09,221] Artifact cfdemo: Error during artifact deployment. See server log for details.


I configured a log file for the Run configuration, but it's also empty.

(FWIW: I tracked down the issue from the VMC command line. I specify a hibernate.default_schema property in DataSource.groovy. Since the schema doesn't exist, the app errors out. I'll have to init that schema in PostgreSQL before the app can create the tables needed.)

I hope this helps someone else who might struglle with IDEA / Cloud Foundry.

--
jack

0

Please sign in to leave a comment.