Openshift (a cloud computing platform from Redhat) does not at present support Hadoop so this is not a route to go down if you have the kind of data that requires map reduce. However it’s not a bad option if you’re just playing with Mahout (see the previous post) and would like to share what you have done in the form of a web app. It’s also free unless you require anything fancy.
Here are some notes I made on how to do it. Assumes you are developing your application in Eclipse.
- Set up an openshift account
- Follow the steps in this post. It shows you how to push your repository to Openshift through the eclipese IDE.
- Because I’m a novice in web app creastion I borrowed the web.xml and servlet code from this post on stack overflow and customised it to call my mahout function. You can see what I mean here Note the server code is placed in the src/main/java folder and the web.xml file is placed in in WEB-INF.
- When compiling the project in eclipse use run Maven install. This generates the WAR file. I found this post invaluable for understanding what is going on.
- I found I then had to copy the WAR file over from the target folder to the deployments folder.
- Switch to the git aspect in Eclipse and commit and push to openshift.
You should then be able to access your web app at the url provided by open shift and use the usual http requests to interact with it. Again see the previous post for an example.