philwilson.org

Setting up the Play framework on Google App Engine

14 December, 2009

The Play framework is the most fun I’ve had developing Java web applications. It’s fast, natural, comes with a rails-like scaffolding for CRUD operations on your model, has built-in Selenium testing as well as unit and functional tests, and most importantly Just Works.

It also deploys natively onto Google App Engine, but this isn’t described very well in the official documentation so here are the basics:

Get started

  1. Get yourself a GAE account and set up an application. you will need the ID.
  2. Download a recent nightly of the stable 1.0 branch (1.0 final doesn’t work with GAE, and Play needs to sort out its versioning system here)
  3. Unzip
  4. Download the GAE SDK for Java
  5. Unzip
  6. Create your app (although use Siena rather than JPA if you want to persist to the GAE data store) and configure it to use the GAE module
  7. Add your GAE application ID to myapp/war/WEB-INF/appengine-web.xml

Deploy to a local dev GAE environment

  1. run play war myappname -o myappname-war
  2. run APPENGINE_SDK_DIR/bin/dev_appserver myappname-war

Deploy to the GAE server

  1. run play war myappname -o ../myappname-war
  2. run APPENGINE_SDK_DIR/bin/appcfg update myappname-war/
  3. log in to your app engine console and check out your application!

See other posts tagged with gae general java play and all posts made in December 2009.

Comments

Tweets that mention philwilson.org » Blog Archive » Setting up the Play framework on Google App Engine -- Topsy.com
15 December, 2009 at 09:31

[…] This post was mentioned on Twitter by Phil Wilson, Pete Fairhurst. Pete Fairhurst said: RT @pip: Setting up the Play Framework on Google App Engine: http://is.gd/5ogzr (Good work, fella!) #java #web #gae […]

Werbemittel
17 December, 2009 at 11:21

Great info, I was just browsing google for info on this, thanks!

Byju Veedu
21 December, 2009 at 11:52

It is a very usefull post. I was struggling to get it run on GAE and was using 1.1 build. I will see following your instructions.

Tatoluffy
17 May, 2010 at 17:07

Thank you philwilson!!

I think is interesting play with appengine but if you want one aproach to relational databases, persistence with appengine isn’t a properly solution.

Regards,