Deploying Grails applications on AppFog. First impressions.

[Edit: Aug 1 – Appfog has now released their pricing. It is free for developers who want a 2gig ram 1gig db setup and $100/month to double that. It’s quite compelling and I highly recommend it. – https://console.appfog.com/pricing ]

I had a chance to play a little bit with AppFog today. Appfog is a version of VMware’s Cloud Foundry hosted by the makers of PHPFog that aims to overcome some of the limitations of the VMware product. It’s very nice.

In their announcement blog post, AppFog stated: “Cloud Foundry alone has no web interface, no pricing, no plans, no IaaS integration (no AWS, no S3), no support. That is where AppFog shines.”

True to their word, AppFog provides deployment to 4 different providers and offers 64 gigs of memory for a monthly rate of $29.99 (Gringo Dollars).

In this post, I’ll walk briefly over my first impressions deploying a Grails application on AppFog. Overall, it is a much richer and pleasant experience than Cloud Foundry and looks like we finally have a competitor to Heroku or Cloudbees.

Deployment

Since appfog has the same underlying structure as CloudFoundry, deploying a new application to it was the same as the traditional Cloud Foundry plugin.

One consideration is that you needed to specify the deployment target.

In grails-app/conf/Config.groovy, add the following lines


grails.plugin.cloudfoundry.username = "email@example.com"
grails.plugin.cloudfoundry.password = "mypassword"
grails.plugin.cloudfoundry.target = "http://api.aws.af.cm"

After building your application, you simply deploy it like a typical cloudfoundry application


grails prod cf-push

After deployment, you should see your application deployed correctly. Mine can be found at http://grails.aws.af.cm

Targets – Deploying to stuff besides VMware iron.

AppFog offers 4 different type of targets aside from the one offered by VMware:

  • api.aws.af.cm – AppFog’s Amazon-based service
  • api.rackspace.af.cm – AppFog’s Rackspace-based service
  • api.hp.af.cm – AppFog’s HP Cloud-based service
  • api.joyent.af.cm – AppFog’s Joyent-based service

However, it doesn’t seem that you are able to have further control over this, so it wasn’t very clear that you could specify that you wanted your Amazon servers to be based in Ireland, for example.

Services

Appfog offers support for MongoDB and MySQL.

By default, the cloud foundry plugin will ask if you want to provision a service for MySQL and Postgres. Selecting that you wanted to deploy a Postgres service broke the deploy script by returning a null.

Tunneling support to access services on AppFog is provided.

Admin UI

What makes AppFog really exciting compared to the VMware solution is the Admin UI that they offer for your application.

Your application appears on screen after you have logged in,

you can also view the services you have provisioned.

Clicking on your application takes you to a quick admin console.

Taking a page out of Heroku, you can quickly configure the number of instances of your application you want to run at the time. I was able to quickly and easily add another instance of my grails application with little hassle.

Appfog also provides the ability to map custom domains, something that CloudFoundry has promised for over 10 months and has done nothing about.

You can also easily modify your application settings and see the statistics. Overall, it is very nicely done for a preview version:


One of the niceties of Appfog is that you can create a github or dropbox based repo and it will automatically build this and deploy it for you. Unfortunately, this is not available for Java or Grails.

Pricing

Another element missing from Cloud Foundry since it’s introduction is pricing. Appfog seems to suggest that for $29 / month, you are able to get 64 gigs of memory. This might just be a placeholder value, but it’s nice to see that at least they are trying to attach a figure to hosting on their services.

Summary

Overall, I was very impressed with the AppFog Beta. It seem compatible with the grails plugin for Cloud Foundry and deployment seems to be fairly painless.

The lack of Grails / Java github support is disappointing. I would still probably use Heroku or Cloudbees for a git-based continous deployment approach.

As a long time Cloud Foundry user, it feels like a lot of holes in the VMware offering are plugged by Appfog. It is quite refreshing to see a company taking the Cloud Foundry project into the commercial sphere instead of just being an academic exercise. Appfog is what Cloud Foundry should have been when it launched.

You can request early beta access for appfog on their site here.

However, there seems to be quite a wait for this, as I remember requesting access when the service was first announced back in August.

9 thoughts on “Deploying Grails applications on AppFog. First impressions.

  1. Pingback: » Blog Archive

  2. Pingback: An Army of Solipsists » Blog Archive » This Week in Grails (2012-04)

  3. Chris

    I got quite excited when I saw $29 for up to 64GB, but then realised that of course you still pay the cloud provider the cost of the VMs.

    The free 1-2GB tier seems like a good deal for pet projects, especially if you can squeeze a grails app onto an Amazon micro instance.

    Reply
  4. Luc Perkins

    Dear Tomas,

    First of all, great write-up! Thanks for taking the time to do this. The effort really shows and there’s a lot of great insight here. We just wanted to let you know, though, that AppFog has changed pretty significantly since you first gave us a spin. First of all, the prices that you listed are for our PHP Fog service, which is fundamentally separate from AppFog. Second, we’re currently in public beta (and still offering Java support, plus Grails and Spring jumpstarts!). Third, the code modifications you list here are no longer necessary. Fourth, custom domain names are indeed supported. This is only to begin to enumerate the changes that have been made. We’d strongly recommend giving it another spin (console.appfog.com). If you have any questions, please don’t hesitate to contact me!

    All the best,
    Luc

    Reply
  5. mycue1981

    Hi everyone!
    Somehow I could not get it working with grails.plugin.cloudfoundry.target = “http://api.aws.af.cm”. After a while of trying I had figured out that grails.plugin.cloudfoundry.target = “https://api.appfog.com” works now.
    Johannes

    Reply
  6. Pingback: An Army of Solipsists » Blog Archive » This Week in Grails (2012-04)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s