Sunday, November 28, 2010

diaspora on aws cloud install...

Wanted to try and see if an aws m1.tiny is a good enough development instance for diaspora. It is a little small in the way of resources, but was certainly worth a shot to see if it will run. Summary, it does run, but needs a little more horsepower in my opinion, but if you are cheap and can wait a bit for all the ruby stuff to spin up, you will be in good shape! The stuff below was all executed on our same (m1.tiny) amazon instance from the previous post over at:

So here we go, using this wonderful guide as a reference:

These cmds issued on our tiny amazon instance, from where we last left it:

ubuntu@amazon:~$ sudo apt-get install build-essential libxslt1.1 libxslt1-dev libxml2
ubuntu@amazon:~$ sudo apt-get install ruby-full
now time to edit and add this to the sources.list:
ubuntu@amazon:~$ sudo vi /etc/apt/sources.list
deb 10.10 10gen
then add in Richard's keys:
ubuntu@amazon:~$ sudo apt-key adv --keyserver --recv 7F0CEB10
quick update - always love that aws has a local mirror, very cool!
ubuntu@amazon:~$ sudo apt-get update
Hit maverick
After this operation, 179MB of additional disk space will be used.
Do you want to continue [Y/n]?
other bits and pieces needed for the install:
ubuntu@amazon:~$ sudo apt-get install imagemagick libmagick9-dev
ubuntu@amazon:~$ sudo apt-get install git-core
ubuntu@amazon:~$ sudo apt-get install rubygems
ubuntu@amazon:~$ sudo gem install bundler
Successfully installed bundler-1.0.7
ok now on to the final push, let's go grab the code:
ubuntu@amazon:~/diaspora$ git clone
Initialized empty Git repository in /home/ubuntu/diaspora/diaspora/.git/
remote: Counting objects: 36181, done.
now install diaspora using bundle:
ubuntu@amazon:~/diaspora$ sudo /var/lib/gems/1.8/bin/bundle install
Installing rake (0.8.7)
Installing abstract (1.0.0)
Installing activesupport (3.0.1)
Installing will_paginate (3.0.pre2)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
start up mongodb (love that name)
ubuntu@amazon:~/diaspora$ sudo service mongodb start
mongodb start/running, process 11659
start jammit
ubuntu@amazon:~/diaspora$ sudo bundle exec jammit
ubuntu@amazon:~/diaspora$ sudo ./script/server
mkdir: created directory `log/thin/'

wait a bit on the micro instance - it is really tight on resource,
takes a few mins to spin up but just about makes it

>> Thin web server (v1.2.7 codename No Hup)
>> Maximum connections set to 1024
>> Listening on, CTRL+C to stop
Now finally log in from my mac with an ssh port forward
isrv:.ssh jcuff$ ssh -L8081:localhost:3000 aws
Linux amazon 2.6.35-22-virtual #35-Ubuntu SMP Sat Oct 16 23:57:40 UTC 2010 i686 GNU/Linux
Look at http://localhost:8081 and tada! diaspora page popped up. So far all looking good and done. You can also (just about) run the test suite:
ubuntu@amazon:~/diaspora$ sudo apt-get install rake
ubuntu@amazon:~/diaspora$ rake spec

Now to configure it to be useful, set up things like smtp_server, etc. I also set pod_url: "http://localhost:8081/" for this simple test instance.
ubuntu@amazon:~/diaspora/config$ cp app_config.yml.example app_config.yml

Then you are pretty much all set to bounce the server, log in and enjoy - screen shot below!

[any opinions here are all mine, and have absolutely nothing to do with my employer]
(c) 2011 James Cuff