Tuesday, February 7, 2012

Programming In The Cloud

As soon as I got my CR-48 I knew what my first obstacle with an OS that only has a browser would be. How the hell do I program in this thing! I could have easily have flashed Ubuntu on it and been a happy camper, but I already had a laptop and work PC with that, wanted to try something new.


I scrambled the net and found a few decent web based IDEs but they all relied on me to give them my (or my clients) FTP information, are they NUTS!? Plus, who the hell uses FTP anymore? Then I found Cloud9IDE...


Cloud9IDE

Cloud9 is different. It provides both a completely free and open-source download of the software to run on your own server or you can use their web based service which will connect with a Git repo instead of directly FTPing files back and forth, a MUCH better solution. I of course went with the host your own version, here's my setup...


First of all I'm running this on Ubuntu 10.04 servers (have tested with other versions, no issues). You basically just need git to clone the source, it should install all dependencies on it's own.

remote# git clone https://github.com/ajaxorg/cloud9.git

Then just start-up Cloud9 which will check for and download all node.js.

remote# cd cloud9
remote# ./bin/cloud9.sh -p /path/to/project

That's it, it will actually print out the path for you to connect to your IDE, which for security reasons will be limited to that remote machine at 127.0.0.1:3000 by default (check -h for more options). You can then tunnel the port easily to your Chromebook, like so.

local# ssh user@SERVERADDRESS.COM -L 3000:127.0.0.1:3000

Then just switch back to your browser and open up http://127.0.0.1:3000.


I have this setup as a process and proxied through Apache, which handles authentication so I can access and develop from anywhere with out having to shell into the server. I will walk through some of that next time, I'm actually trying to get it to work through Nginx instead.


No comments:

Post a Comment