You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2009/03/08 09:07:17 UTC

[Couchdb Wiki] Update of "Getting started with Amazon EC2" by JasonSmith

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The following page has been changed by JasonSmith:
http://wiki.apache.org/couchdb/Getting_started_with_Amazon_EC2

The comment on the change is:
Add instructions for running SVN HEAD on the Ubuntu Intrepid server AMI

------------------------------------------------------------------------------
  
  All the necessary information has been submitted for inclusion into repository of Amazon Public AMIs, and is listed as [http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1192&categoryID=101 ElasticDB - (Elasticdrive + CouchDB)]. We created support thread at Amazon forums, specifically [http://developer.amazonwebservices.com/connect/thread.jspa?threadID=19405&tstart=0 Amazon SimpleDB (Beta)] and provide limited support there, when time allows and scope is limited to EC2/SimpleDB-related issues.
  
+ = Alternative Method: CouchDB SVN on Ubuntu 8.10 Server =
+ 
+ If you have a credit card and can swing ten cents per hour, here is a method to conveniently try the latests CouchDB code without having to install local software:
+ 
+  1. Set up your Amazon AWS EC2 account, firewall ruleset, etc.  (For example, see [http://www.proven-corporation.com/2009/03/04/how-to-run-a-quick-throwaway-ubuntu-ec2-instance/ this article], steps 1 through 2.6.)
+  1. Start the Ubuntu 8.10 server beta image, AMI-69d73000
+  1. When it is up, copy the public DNS name and run: {{{ssh -l ubuntu <public dns name>}}}
+  1. Once logged in, install the prerequisites:
+    1. {{{sudo apt-get update && apt-get -y upgrade}}}
+    1. {{{sudo apt-get install erlang libmozjs-dev libicu-dev libcurl4-gnutls-dev make subversion automake autoconf libtool help2man}}}
+  1. Fetch, build, and run CouchDB:
+    1. {{{svn checkout http://svn.apache.org/repos/asf/couchdb/trunk couchdb}}} (Instead of trunk, you could try {{{ tags/0.8.0 }}}, {{{ tags/0.8.1 }}}, etc.)
+    1. {{{cd couchdb}}}
+    1. {{{./bootstrap && ./configure && make && sudo make install}}}
+    1. {{{sudo adduser --system --home /usr/local/var/lib/couchdb --no-create-home --shell /bin/bash --group --gecos 'CouchDB account' couchdb}}}
+    1. {{{sudo chown -R couchdb.couchdb /usr/local/var/{lib,log}/couchdb}}}
+    1. {{{sudo vim /usr/local/etc/couchdb/default.ini }}}
+      1. Search for "bind_address" and change it to 0.0.0.0
+      1. Save and exit
+    1. {{{sudo -i -u couchdb couchdb }}}
+  1. Test it by going to {{{http://<public dns name>:5984/_utils/}}}
+ 
+ You can also of course install and try out client libraries.  For example, with [http://github.com/jchris/couchrest/tree/master CouchRest]:
+ 
+  1. {{{sudo apt-get install libxml2-dev libxslt-dev rubygems ruby1.8-dev irb}}}
+  1. {{{sudo gem install couchrest archive-tar-minitar nokogiri rcov hoe}}}
+  1. Try it!
+  {{{irb
+ irb(main):001:0> require 'rubygems'
+ => true
+ irb(main):002:0> require 'couchrest'
+ => true
+ irb(main):003:0> db = CouchRest.database! 'http://127.0.0.1:5984/my_db'
+ => #<CouchRest::Database:0xb7acb338 @root="127.0.0.1:5984/my_db", @bulk_save_cache_limit=50, @server=#<CouchRest::Server:0xb7b335c8 @uri="127.0.0.1:5984", @uuid_batch_count=1000>, @bulk_save_cache=[], @host="127.0.0.1:5984", @name="my_db", @streamer=#<CouchRest::Streamer:0xb7acb1f8 @db=#<CouchRest::Database:0xb7acb338 ...>>>
+ irb(main):004:0> response = db.save :key => 'val', 'another key' => 23
+ => {"rev"=>"1954890697", "id"=>"1ba0b605480824c5d8aa6ba6fdbd7add", "ok"=>true}
+ irb(main):005:0> doc = db.get(response['id'])
+ => {"_rev"=>"1954890697", "_id"=>"1ba0b605480824c5d8aa6ba6fdbd7add", "another key"=>23, "key"=>"val"}
+ }}}
+