<?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>Jayway Team Blog &#187; Adam Skogman</title>
	<atom:link href="http://blog.jayway.com/author/adamskogman/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jayway.com</link>
	<description>Sharing Experience</description>
	<lastBuildDate>Sat, 11 Feb 2012 10:33:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Deleting All Your Files on Amazon S3</title>
		<link>http://blog.jayway.com/2010/04/20/deleting-all-your-files-on-s3/</link>
		<comments>http://blog.jayway.com/2010/04/20/deleting-all-your-files-on-s3/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 14:15:07 +0000</pubDate>
		<dc:creator>Adam Skogman</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=5377</guid>
		<description><![CDATA[How to recursively delete all your files in all your buckets on an S3 account.]]></description>
			<content:encoded><![CDATA[<p>Deleting all your files on S3 is not as easy as you may think, since it requires you to delete all files, one by one, before you can remove the buckets.</p>
<p>Thankfully, this can be done using a small ruby script. First, install the needed ruby gems:</p>
<pre>
>sudo gem install right_aws
</pre>
<p>Then, paste this into your text editor, and edit before you run:</p>
<pre class="ruby">&nbsp;
<span style="color:#008000; font-style:italic;">#!/usr/bin/env ruby -w</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'right_aws'</span>
&nbsp;
s3 = <span style="color:#6666ff; font-weight:bold;">RightAws::S3</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>aws_access_key=<span style="color:#996600;">'your-access-key-here'</span>, aws_secret_access_key=<span style="color:#996600;">'your-secret-access-key-here'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
s3.<span style="color:#9900CC;">buckets</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> |bucket|
&nbsp;
  keys = bucket.<span style="color:#9900CC;">keys</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'max-keys'</span>=&gt;<span style="color:#006666;">1000</span> <span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">while</span> keys.<span style="color:#9900CC;">length</span> &gt; <span style="color:#006666;">0</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    keys.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> |key|
      <span style="color:#CC0066; font-weight:bold;">puts</span> key.<span style="color:#9900CC;">full_name</span>
      key.<span style="color:#9900CC;">delete</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
    keys = bucket.<span style="color:#9900CC;">keys</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'max-keys'</span>=&gt;<span style="color:#006666;">1000</span> <span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  bucket.<span style="color:#9900CC;">delete</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;</pre>
<p>Note that I only get a 1000 keys at a time. Having a lot of files in a bucket will break most GUI tools, because they try to do to much - like listing all of my files...</p>
<p>Happy deleting!</p>
<p><strong>Tip:</strong> Run this for an instance on Amazon, not from your own computer. Running inside Amazon is much faster.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2010/04/20/deleting-all-your-files-on-s3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How-to get a large C: drive for Windows on Amazon</title>
		<link>http://blog.jayway.com/2010/03/31/how-to-get-a-large-c-drive-for-windows-on-amazon/</link>
		<comments>http://blog.jayway.com/2010/03/31/how-to-get-a-large-c-drive-for-windows-on-amazon/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 09:08:11 +0000</pubDate>
		<dc:creator>Adam Skogman</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[ebs]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://blog.jayway.com/?p=5238</guid>
		<description><![CDATA[Amazon has excellent Windows support these days. Many time you'd like a larger C: drive than the 30 GB that come standard with the Amazon images. Here is how you enlarge the boot drive to 100 GB.]]></description>
			<content:encoded><![CDATA[<p>Amazon has excellent Windows support these days, and computers boot up from EBS. Drives are therefor both fast and robust. However, many time you'd like a larger C: drive than the 30 GB that come standard with the Amazon images. Here is how you enlarge the boot drive!</p>
<p>First step is to boot an instance. You need the command line tools for this, as neither the AWS Management Web Console nor ElasticFox currently supports this right now (note to developers - please add!).</p>
<pre>
ec2-run-instances --region eu-west-1 \
     -K pk-YOURKEYHERE.pem \
     -C cert-YOURCERTHERE.pem \
     <strong>-b '/dev/sda1=:100' \</strong>
     ami-d7a78ca3 \
     -g my-security-group -g common-security-group \
     -t m1.large \
     -k thekeyhere \
     --disable-api-termination \
     --instance-initiated-shutdown-behavior stop \
     -z eu-west-1a
</pre>
<ul>
<li>The command is <strong>ec2-run-instances</strong> with an <strong>'s'</strong> in the end. There is another command in the API without the s, which doesn't work.</li>
<li><strong>-b</strong> is the most important flag here. It says to make the boot disk (/dev/sda is Linux speek for C:) 100 GB, despite what the AMI manifest says (which is 30 GB).</li>
<li><strong>ami-d7a78ca3</strong> is the Windows image, in this case a 64bit Windows 2008.</li>
<li>-g security-group you should add as many as you like. Remember to think these through, since you cannot change which groups an instance belongs to.</li>
<li>The flags <strong>--disable-api-termination --instance-initiated-shutdown-behavior stop</strong> are really nice, because that make sure you cannot accidentally terminate the instance, making the harddrive disappear.</li>
<li>Note that I'm running in the EU region here.</li>
</ul>
<p>Ok, so now you have a running Windows server. Once it has booted, you log on using remote desktop (well, as soon as you have the generated password, which takes 15 min). PLease note that the C: drive will show up as 30 GB at this point. The partition is still only 30 GB, even if the virtual harddrive is 100 GB.</p>
<ol>
<li>Go into the windows management console. Go to <strong>disk management</strong>.</li>
<li><strong>Right-click</strong> on the C: drive. Choose <strong>Extend volume</strong> from the context menu.</li>
<li>In the wizard that pops up, just accept the defaults, and click finish.</li>
</ol>
<p>Done! The change is instant (no reboot or anything), and your system drive C: is now 100 GB.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jayway.com/2010/03/31/how-to-get-a-large-c-drive-for-windows-on-amazon/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

