Running an Ioke web application on Google App Engine using Ikanserve
2009-04-08 11:09:47 +0000
I like to play around with interesting technologies. So what’s on the table today?
2. Ioke E
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 ..
$ 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 email@example.com update ../myikanserveengine
- Stop writing tutorials - start writing Vagrantfiles or Dockerfiles - Make use of modern tools to make tutorials understandable as well as executable
- The missing piece: Operating Systems for web scale Cloud Apps - Operating systems that are optimised for cloud applications regarding configuration support and the distributed nature of apps are not there yet.
- There will be no reliable cloud (part 3) - How I stopped worrying and love the cloud