Thomas James Just a geek.

Technology, Gadgetry, Photography and Software Development

To the cloud ... Mono, CouchDB, DeployFu & AppHarbor


A while ago i wrote a small mvc2 web app to try out CouchDB as database platform. CouchDB is a little different from the regular database offerings in that it is known as a document database, widely known under the NoSQL movement.

CouchDB provides a RESTful interface for storing documents. Documents are JSON strings and operations on documents are atomic in nature. CouchDB also includes powerful Map/Reduce functionality in the form of views, replication and even a built in application server.

So i set out to write a simple application to take advantage of the document store and map-reduce views. I wrote a URL shortener, because the world needs one more URL shortener and in keeping with the spirit of CouchDB it was called Unwind. Rather than hosting the CouchDB instance myself, i’ve been using the cloud hosting provided by CouchOne as its just easier.

I started out by hosting the application myself (on linux with mono-2.8), but only having the database in the cloud just wasn’t enough cloud for me, as in my previous post i was already aware of Moncai, but given it wasn’t available i was made aware of DeployFu and then AppHarbor. Both services have a free tier that i was eager to try out, but unfortunately they both only supported git at the time and i was using hg for version control.

My initial playing around involved a lot of stupid mistakes that koush (of deployfu) graciously helped me out with, usually involving me either committing too much or too little of my hg repo to git and pushing that to deployfu and then my repo structure wasn’t quite right either, but after getting that sorted i had unwind running “in the cloud” on deployfu.

Not wanting to repeat the fun of keeping a git and hg repo in sync i started looking to git/hg bridges and found one, hg-git which was quite easy to setup on the mac after reinstalling Hg using python’s easy_install and then following the hg-git install instructions. Once that it was a simple matter of setting up the git repos to push to and pushing. DeployFu picks up the push, compiles and deploys to AWS EC2.

I did run into a few problems repeating the process with appharbor using hg-git to push to the repo, but thankfully hg-git allows you to export the hg change-sets in git format which allowed me to use the normal git tools, less than idea but still pretty painless. AppHarbor however does run your solutions tests (multiple frameworks supported) and have a few other interesting features at the moment including configuration variables, cname support and collaboration.

Unwind privately hosted vps running debian linux and custom built mono-2.8 with patches

Unwind on DeployFu

Unwind on AppHarbor

Finally keeping the spirit of the cloud the source is hosted on BitBucket.

comments powered by Disqus
  • profile for Thomas James on Stack Exchange, a network of free, community-driven Q&A sites

4g android appharbor apple atrix aws barcamp beer blog brew-smith coding conferencing deployfu docpad ec2 engineering fusion-garage grid10 homebrew hp-mini information insertdatahere ipad joojoo kernel knowroaming leadership linux macbook-air moncai mono n900 ndc netduino netmf open-source opinion pcengines-apu poor-experience professional public-speaking rant ravendb reflection router singapore talks travel ubuntu unconference vagrant vps wifi windows yubikey