I gave two lightning talks at CommunityOne today, the first of which described deploying Grails applications to Morph AppSpace.
For the uninitiated, Grails is a Ruby on Rails inspired full stack web development framework which brings “convention over configuration” and “DRY” into the Java web development arena. Unlike Rails, it is not an effort from scratch, but rather stands on the shoulders of proven giants in the Java world like the Spring framework and Hibernate. It does this using Groovy, the popular dynamic scripting language for the JVM, as a sort of “DSL for web development.” Find it at http://grails.org.
Morph AppSpace on the other hand is a fully-configured and managed environment for hosting web applications, and currently supports Java, Grails, Rails, and PHP applications. It is a “platform as a service” (PaaS) provider that abstracts away the details of Amazon EC2 and S3 technologies. Systems architecture, backups, monitoring, failover, scalability – all of this is handled by Morph. You simply develop and deploy your application – Morph does the rest. Find it at http://mor.ph/products_appspace.
So to get going, visit http://mor.ph and sign up for a free developer account. Create yourself a Java application subscription, and pick your choice of database (MySQL or PostgreSQL). Create the database, and then download two very important files into the root directory of your Grails project: deployment.properties, which contains the metadata describing your application to the Morph AppSpace platform, and morph_deployer.jar, which contains the client API to the platform.
Next you’ll need to install the Grails morph-deploy plugin. If you’re using Grails 1.1, you’ll need to checkout the trunk version from SVN, as the version in the plugin repository is not 1.1 ready. Install this plugin locally by running “grails install-plugin $PATH_TO_PLUGIN.” Next, you’ll need to edit DataSource.groovy to contain the following:
production {
dataSource {
driverClassName = 'com.mysql.jdbc.Driver'
dbCreate = "update"
jndiName = "java:comp/env/jdbc/morph-ds"
dialect = 'org.hibernate.dialect.MySQLDialect'
}
}
Finally, run “grails war” to build the war file, and “grails deploy” to upload your application to the platform. Once the upload is complete, visit the management interface and check the logs to see that you’ve successfully deployed. Once it’s finished, click on the link to your application. Happy Grails on the cloud!
Here’s the screencast from my talk. Enjoy!








Posted by Marcel Overdijk on June 2, 2009 at 1:08 pm
Note that AppSpace is shutting down in favour of AppCloud. See http://forums.mor.ph/forums/1/topics/229
Posted by Matt on June 2, 2009 at 3:31 pm
@Marcel I had heard this but had not seen a confirmation. The lightning talk was already on the schedule at that point so I pressed on. Hopefully it will still be useful to folks in later incarnations of the appcloud.
Posted by Alain Yap, Morph Labs on June 3, 2009 at 12:32 am
@Matt,
Appreciate the talk you gave for Grails. Regardless of the AppSpace announcement , I’m sure that this will remain relevant considering that Morph Labs will still continue albeit different offering. Again, thanks.
@Marcel
Quite sad, really but we’re pressing forward and hoping that you will still find the new things interesting. Do visit the forums and if possible, we’d like to get all your ideas on how to make things better (or pls state what made AppSpace really great for you). We sure can use your ideas to make things better.
Best.
Alain Yap
Morph Labs / G2iX
Posted by Alain Yap, Morph Labs on June 3, 2009 at 12:35 am
@Matt,
In case you’ve the time, drop by booth 110 and meet a few G2iX teammates.
Wish you a grand time there!
Best.
Alain