Running an Ioke web application on Google App Engine using Ikanserve
Wed Apr 08 13:09:47 +0200 2009
I like to play around with interesting technologies. So what’s on the table today?
2. Ioke E
3. Ikanserve
Google App Engine allows you to run Java applications since a few days. But as no one writes web apps in Java anymore you could either use JRuby on App Engine or try out another fine language on the JVM. (That’s why I think the JVM kicks ass and I still like it after several years of programming mostly in Ruby: It’s a great plattform to run things… not just Java programms but any language that’s on the JVM. And there will be more…). But I digress…
So, let’s get into it:
0. Create a temp dir to play in
$ mkdir appgarage
$ cd appgarage
2. Sign Up for the Java App Engine Account – According to TechCrunch the first 10k developers get an account. So hurry up!
3. Get ioke E
You need git and java 1.6 to do that.
$ git clone git://github.com/olabini/ioke.git
$ cd ioke
$ ant
$ cd ..
3. Get Ikanserve
$ git clone git://github.com/olabini/ikanserve.git
$ cd ikanserve
$ ant
$ cd ..
4. Get the Java App Engine SDK
$ unzip appengine-java-sdk-1.2.0.zip
$ cd appengine-java-sdk-1.2.0
$ cd ..
Optional: Try out the app engine demos and/or the ikanserve demo locally
5. Merge Ikanserve with appengine
$ mkdir myikanserveengine
$ cd myikanserveengine
$ unzip ../ikanserve/jetty/webapps/root.war
$ cp ../ioke/lib/ioke.jar lib/
$ cat > WEB-INF/appengine-web.xml
<appengine-web-app xmlns="http://appengine.google.com/ns/1.90">
<application>myikanserveengine</application>
<version>1</version>
^D
$ cd ..
</appengine-web-app>
A few explanations:
You need to unzip the war file because app engine only takes war dirs not files. And you you need to copy the ioke jar because the ioke version supplied with ikanserve (at this point in time) doesn’t work with appengine. The current Ioke version does work.
6. Deploy your application
Go to the App Engine Admin Interface log in and create an application with the same name you choose in your appengine-web.xml file (Here it was “myikanserveengine”).
$ cd appengine-java-sdk-1.2.0
$ bin/appcfg.sh -e yourgoogleaccountemail@yourdomain.com update ../myikanserveengine
Done.
Goto http://myikanserveengine.appspot.com and enjoy your first Ioke web application in the cloud. Try URLs like foo or xxx to see some extra funky stuff ;-)
Related Posts
- Moving from Wordpress on a VPS to Jekyll and Amazon S3 - How and why to move your blog from Wordpress to a static webpage that is hosted on Amazon S3 using the new website hosting feature
- Predictably Irrational - Humans are more irrational than you thought. The book 'Predictably Irrational' by Dan Ariely gives great insight into human behaviour.
- Deploying a Rails application on OpenSolaris with passenger aka modrails - A howto on how to deploy a Rails application on the latest OpenSolaris 2008.11 operating system with modrails aka passenger