<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cantina Consulting &#187; Amazon Web Services</title>
	<atom:link href="http://www.cantinaconsulting.com/category/amazon-web-services/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cantinaconsulting.com</link>
	<description></description>
	<lastBuildDate>Tue, 27 Jul 2010 18:47:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Amazon EC2: 1st Impressions Mounting S3</title>
		<link>http://www.cantinaconsulting.com/2007/12/08/amazon-ec2-first-impressions-mounting-s3/</link>
		<comments>http://www.cantinaconsulting.com/2007/12/08/amazon-ec2-first-impressions-mounting-s3/#comments</comments>
		<pubDate>Fri, 07 Dec 2007 19:18:28 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Amazon Web Services]]></category>

		<guid isPermaLink="false">http://www.cantinaconsulting.com/2007/12/08/amazon-ec2-first-impressions-mounting-s3/</guid>
		<description><![CDATA[We&#8217;ve got a small internal project at Cantina that aims to make use of the Groovy on Grails framework and some of our Grails plugins, and we plan on using S3 as the persistent storage for the project.&#160; We decided to test out a small EC2 instance at Amazon to use as an integration point [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve got a small internal project at Cantina that aims to make use of the Groovy on Grails framework and some of our <a href="/grails-plugins/">Grails plugins</a>, and we plan on using S3 as the persistent storage for the project.&nbsp; We decided to test out a small EC2 instance at Amazon to use as an integration point for the project for a couple reasons:</p>
<ul>
<li>EC2 instances are very quick to setup</li>
<li>They are not charged for data transfer to S3</li>
<li>They are presumably the closest you can be to your S3 storage in terms of network latency</li>
</ul>
<p>Setting up our initial EC2 instance was incredibly easy.&nbsp; There&#8217;s a wealth of pre-built Amazon Machine Images, or AMIs, out there with various configurations for different application servers, including Apache, MySQL, JBoss, Tomcat, and, our new favourite, Red5.&nbsp; I was able to get one up and running fairly quickly with the packages I needed (I love <a href="http://linux.duke.edu/projects/yum/">yum</a>).&nbsp;</p>
<p>Actually, I was floored by how fast I had a brand new server up and running, considering I&#8217;ve had requests submitted to fairly large enterprise grade hosting companies for such intensely complicated things as, say opening a new port in the firewall, take over a week.&nbsp; I guess the landscape is changing, but I digress&#8230;</p>
<p>In order to use Amazon S3 as the backing store for our new EC2 instance, we seemed to have a few options:</p>
<ol>
<li>Code our application to manage the transfer and synchronization of files to S3, perhaps via our <a href="/grails-plugins/amazon-s3-plugin/">Amazon S3 Grails Plugin</a></li>
<li>Utilize an S3-aware file synchronization tool such as the <a href="http://jets3t.s3.amazonaws.com/applications/applications.html#synchronize">jets3t Synchronize tool</a>, or the Ruby <a href="http://s3sync.net">s3sync</a> tool</li>
<li>Mount S3 as a filesystem in the EC2 instance</li>
</ol>
<p>Since we&#8217;ve already been doing #1, and #2 isn&#8217;t exactly real-time, we decided to give #3 a go.&nbsp; To do so, we enlisted the help of a couple of tools:</p>
<ul>
<li><a href="http://www.jungledisk.com">JungleDisk</a>: A multi-platform tool that provides a local WebDAV interface to S3, suitable for mounting as a filesystem from the Mac OS X Finder, or from Linux using&#8230;</li>
<li><a href="http://dav.sourceforge.net/">davfs2</a>: Linux filesystem driver that will mount a WebDAV URL to a mount point in the local filesystem</li>
</ul>
<p>JungleDisk is a great tool in general for interacting with an S3 account, and I&#8217;ve been using it for a little while now for my own backup purposes on my Mac development laptop.&nbsp; The Linux version provides a standalone command line program (in addition to the GUI that comes on all platforms) which can be run as a daemon and scripted to startup on boot.&nbsp;</p>
<p>The setup was surprisingly simple.&nbsp; To get JungleDisk running from the command line client, you need to provide a configuration file, commonly called jungledisk-settings.ini.&nbsp; The documentation says that you should run the GUI first to generate the file before running the command line version, but I was able to copy over the file from my Mac laptop and update the values for the EC2 instance.&nbsp; Here&#8217;s an example of the configuration file:</p>
<p><code>LoginUsername=<br />
LoginPassword=PROTECTED:<br />
AccessKeyID=XXXXXXXXXXXXXXXXXXXXX<br />
SecretKey=PROTECTED:XXXXXXXXXXXXXXXXXXXXX<br />
Bucket=default<br />
CacheDirectory=/var/cache/jungledisk<br />
ListenPort=2667<br />
CacheCheckInterval=120<br />
AsyncOperations=1<br />
Encrypt=0<br />
ProxyServer=<br />
EncryptionKey=PROTECTED:<br />
DecryptionKeys=PROTECTED:<br />
MaxCacheSize=1000<br />
MapDrive=<br />
UseSSL=0<br />
RetryCount=3<br />
FastCopy=1<br />
WebAccess=0<br />
LogDuration=30<br />
ArchiveFlag=5<br />
ArchiveDuration=60<br />
PasswordPrompt=0</code></p>
<p>I setup jungledisk to startup on boot using a really handy /etc/init.d script from the JungleDisk forums found <a href="http://forum.jungledisk.com/viewtopic.php?t=6337">here</a>.</p>
<p>Once JungleDisk was configured and running, I had a local WebDAV server running at http://localhost:2667.&nbsp; This could be used in the KDE to browse the filesystem, but since I&#8217;d like my web application to be able to access it via the filesystem, the next step was to get davfs2 running.</p>
<p>The EC2 instance did not have davfs2 installed by default (at least not the AMI I chose, which was based on the default AMI), so I simply downloaded the source distribution and compiled locally on the EC2 instance.&nbsp; The base AMI I was using did not have gcc or the neon development libraries (<a href="http://www.webdav.org/neon/">Neon</a> is a WebDAV library that davfs2 uses for communicating with WebDAV servers).&nbsp; Luckily yum was installed on the EC2 instance so getting these dependencies was pretty straightforward.</p>
<p>davfs2 can be configured to run by non-root users, or by root.&nbsp; The configuration of davfs2 depends on your choice here as some configuration options are intended only for system wide davfs2 configuration started from root.&nbsp; I opted to take this approach, setup my /usr/local/etc/davfs2.conf file with the following configuration options:</p>
<p><code> dav_user&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mydavuser<br />
dav_group&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mydavgroup<br />
kernel_fs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fuse<br />
ask_auth&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0</code></p>
<p>Since JungleDisk provides WebDAV access to localhost only, and does not require authentication, setting ask_auth to 0 is useful to prevent davfs2 from prompting for a password when mounting the WebDAV URL.&nbsp; Last but not least, I added an entry to /etc/fstab to configure the mount:</p>
<p><code>http://localhost:2667 /mountpoint davfs nolocks,noaskauth,rw</code></p>
<p>Voila!&nbsp; Now my S3 instance is mounted to the local Linux filesystem on my EC2 instance.&nbsp; I have not done any performance testing or cache tuning, but this <a href="http://info.rightscale.com/2007/11/29/network-performance-in-ec2-and-s3">article</a> over at Right Scale looks promising.&nbsp; Once we have our application and up and running, I&#8217;ll post back with some more information on how this configuration is working.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cantinaconsulting.com/2007/12/08/amazon-ec2-first-impressions-mounting-s3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hot Off The Press: An Amazon S3 Plugin for Groovy on Grails</title>
		<link>http://www.cantinaconsulting.com/2007/11/06/hot-off-the-press-an-amazon-s3-plugin-for-groovy-on-grails/</link>
		<comments>http://www.cantinaconsulting.com/2007/11/06/hot-off-the-press-an-amazon-s3-plugin-for-groovy-on-grails/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 18:22:44 +0000</pubDate>
		<dc:creator>adam</dc:creator>
				<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[Groovy on Grails]]></category>

		<guid isPermaLink="false">http://www.cantinaconsulting.com/2007/11/06/hot-off-the-press-an-amazon-s3-plugin-for-groovy-on-grails/</guid>
		<description><![CDATA[We&#8217;ve released our first ever plugin for the Groovy on Grails web application framework!&#160; You can see the details over on our new Grails Plugins page.&#160;
In short, we wanted to build something that would manage static file assets such as images, movies, audio, Flash, and perhaps down the road, site backups, on the Amazon Simple [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve released our first ever plugin for the Groovy on Grails web application framework!&nbsp; You can see the details over on our new <a href="http://www.cantinaconsulting.com/grails-plugins/">Grails Plugins</a> page.&nbsp;</p>
<p>In short, we wanted to build something that would manage static file assets such as images, movies, audio, Flash, and perhaps down the road, site backups, on the Amazon Simple Storage Service (S3).&nbsp;</p>
<p>This is a very preliminary version of the plugin, and we&#8217;re hoping to get some good feedback from the <a href="http://grails.codehaus.org/Mailing+lists" target="_blank">Grails Community</a> and you on what we can do better.&nbsp; However, there may be some bugs that we haven&#8217;t quite gotten to yet.&nbsp;</p>
<p>Feel free to leave comments regarding the plugin on this posting.&nbsp; We know we have a lot more testing to do and features to add, so any feedback is most welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cantinaconsulting.com/2007/11/06/hot-off-the-press-an-amazon-s3-plugin-for-groovy-on-grails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
