{"id":500,"date":"2011-02-15T12:57:53","date_gmt":"2011-02-15T17:57:53","guid":{"rendered":"http:\/\/hstore.cs.brown.edu\/"},"modified":"2012-04-14T10:13:07","modified_gmt":"2012-04-14T14:13:07","slug":"running-on-amazon-ec2","status":"publish","type":"page","link":"https:\/\/hstore.cs.brown.edu\/documentation\/deployment\/running-on-amazon-ec2\/","title":{"rendered":"Running on Amazon EC2"},"content":{"rendered":"
Note: These instructions are for manually setting up an H-Store cluster using NFS on Amazon EC2. See this page<\/a> for instructions on how to automatically deploy H-Store on EC2 using its built-in deployment scripts.<\/B><\/p>\n The following instructions are how to setup a Ubuntu-based EC2 cluster to deploy H-Store, including how to use autofs to auto-mount the home directory through NFS on each node in the virtual cluster. This setup assumes that you will use the default ubuntu<\/tt> user for the Canonical-prepared EC2 images and that H-Store will be installed in \/home\/ubuntu\/H-Store<\/tt> ($HSTORE_HOME<\/tt>).<\/p>\n Then install the required packages with the following command:<\/p>\n Change the global.sshoptions<\/a> parameter in $HSTORE_HOME\/properties\/default.properties<\/tt> to be the following:<\/p>\n You can test that the system is working properly on a single node using the following command:<\/p>\n You can also set associate instance to an elastic IP address to ensure that the nodes can always connect to it even after it is restarted. Then add an entry to \/etc\/hosts<\/tt> that maps the hostname hstore-nfs<\/tt> to this IP address. This is the hostname we will use in the examples below.\n<\/li>\n\n
\r\ndeb http:\/\/archive.canonical.com\/ubuntu lucid partner\r\ndeb-src http:\/\/archive.canonical.com\/ubuntu lucid partner\r\n<\/pre>\n
sudo apt-get update\r\nsudo apt-get --yes install subversion gcc g++ sun-java6-jdk valgrind ant<\/pre>\n<\/li>\n
\r\nsvn co https:\/\/database.cs.brown.edu\/svn\/hstore\/trunk\/<\/a> $HSTORE_HOME\r\n<\/pre>\n<\/li>\n
cp hstore.pem ~\/.ssh\/ && chmod 0400 ~\/.ssh\/hstore.pem<\/pre>\n<\/li>\n
global.sshoptions = -i \/home\/ubuntu\/.ssh\/hstore.pem<\/pre>\n<\/li>\n
cd $HSTORE_HOME && ant build<\/tt><\/pre>\n<\/li>\n
ant hstore-prepare<\/tt> hstore-benchmark<\/tt> -Dproject=tpcc<\/pre>\n<\/li>\n
\n
ec2-run-instances --region us-east-1 \\\r\n --group hstore \\\r\n -k hstore \\\r\n --instance-type t1.micro ami-4a0df923<\/a><\/pre>\n
\r\napt-get install nfs-kernel-server \r\necho \"\/home *(rw,async,no_subtree_check)\" >> \/etc\/exports\r\nexportfs -a\r\nservice portmap start\r\n\/etc\/init.d\/nfs-kernel-server start\r\n<\/pre>\n<\/li>\n
apt-get install autofs<\/pre>\n<\/li>\n
10.XXX.XXX.XXX cs227-nfs<\/pre>\n<\/li>\n
mount -t nfs hstore-nfs:\/home\/ubuntu\/H-Store \/home\/ubuntu\/H-Store<\/pre>\n<\/li>\n
\/home \/etc\/auto.home<\/pre>\n<\/li>\n
* hstore-nfs:\/home\/&<\/pre>\n<\/li>\n
\/etc\/init.d\/autofs start<\/pre>\n<\/li>\n<\/li>\n<\/ol>\n