<?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>fiveclouds &#187; ec2</title>
	<atom:link href="http://www.fiveclouds.com/tag/ec2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fiveclouds.com</link>
	<description>collaboration, creativity and the next big thing</description>
	<lastBuildDate>Tue, 25 May 2010 11:06:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>The Cloud Market is Live!</title>
		<link>http://www.fiveclouds.com/2009/05/21/the-cloud-market-is-live/</link>
		<comments>http://www.fiveclouds.com/2009/05/21/the-cloud-market-is-live/#comments</comments>
		<pubDate>Thu, 21 May 2009 14:07:45 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[business]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[cloudmarket]]></category>
		<category><![CDATA[ec2]]></category>

		<guid isPermaLink="false">http://www.fiveclouds.com/?p=154</guid>
		<description><![CDATA[<p>We have opened the doors on <a href="http://www.thecloudmarket.com">The Cloud Market</a>!  We have a lot more features yet to release, so do keep checking up on progress and you can also follow us on <a href="http://twitter.com/thecloudmarket">twitter</a>.</p>
<p><img class="aligncenter size-full wp-image-134" title="picture-1" src="http://www.fiveclouds.com/wp-content/uploads/2009/03/picture-1.png" alt="picture-1" width="375" height="154" /></p>
<p>We are hoping over time to build up more and more functionality to help people find the AWS images they need quickly and effectively and also allowing them to track the evolution of images (both paid and free).  Also we have already just added support for EU images!</p>
<p>I&#8217;m sure I&#8217;ll have more to blog on it in the future &#8211; right now its&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>We have opened the doors on <a href="http://www.thecloudmarket.com">The Cloud Market</a>!  We have a lot more features yet to release, so do keep checking up on progress and you can also follow us on <a href="http://twitter.com/thecloudmarket">twitter</a>.</p>
<p><img class="aligncenter size-full wp-image-134" title="picture-1" src="http://www.fiveclouds.com/wp-content/uploads/2009/03/picture-1.png" alt="picture-1" width="375" height="154" /></p>
<p>We are hoping over time to build up more and more functionality to help people find the AWS images they need quickly and effectively and also allowing them to track the evolution of images (both paid and free).  Also we have already just added support for EU images!</p>
<p>I&#8217;m sure I&#8217;ll have more to blog on it in the future &#8211; right now its back to cooking up business ideas.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiveclouds.com/2009/05/21/the-cloud-market-is-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle in the Cloud</title>
		<link>http://www.fiveclouds.com/2008/09/22/oracle-in-the-cloud/</link>
		<comments>http://www.fiveclouds.com/2008/09/22/oracle-in-the-cloud/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 21:36:20 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://www.fiveclouds.com/?p=68</guid>
		<description><![CDATA[<p>Over the past couple of months I&#8217;ve been working on a few different things,  and I&#8217;ve been a little overloaded &#8211; thus the lack of blogging.  One of those things has been working on building a dynamic integration test environment for a company based on using EC2.   Part of that environment has required the provisioning of Oracle servers for the test platform.  Initially I took a Centos 5 base and installed the Oracle 11g instance on it,  though I have to admit getting the first image ready for use took a long time and was a lot more painful&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Over the past couple of months I&#8217;ve been working on a few different things,  and I&#8217;ve been a little overloaded &#8211; thus the lack of blogging.  One of those things has been working on building a dynamic integration test environment for a company based on using EC2.   Part of that environment has required the provisioning of Oracle servers for the test platform.  Initially I took a Centos 5 base and installed the Oracle 11g instance on it,  though I have to admit getting the first image ready for use took a long time and was a lot more painful than I had hoped (not least because of the silent installers in Oracle).  </p>
<p>So when I saw on Justin Kestelyn <a href="https://twitter.com/oracletechnet">twitter</a> than Oracle now has a <a href="http://www.oracle.com/technology/tech/cloud/index.html">Cloud Computing Center </a>I had to give it a go.  After only playing for a very short while I have to say I really liked the experience from the AMI&#8217;s,   I thought the easiest way to tell you about it was just to give some basic instructions on getting going.  First I&#8217;m going to assume you have an AWS account and that you have also set-up the EC2 command line tools to get you going (if you are having trouble with the command line tools I find the tools at <a href="http://www.rightscale.com">RightScale</a> just rock for managing the servers).</p>
<p>So to get started I kicked up a terminal on my trusty mac and listed down the available images.</p>
<pre class="brush: xml;">pdodds:/usr/local/ec2/bin$ ./ec2-describe-images -a | grep oracle-corporation
IMAGE	ami-02cb2f6b	/oracle-corporation/database-ami/64-bit/oracle_11106_SE_SE1_64Bit-image.manifest.xml	725966715235	available	public		x86_64	machine	aki-0d9f7b64	ari-369f7b5f
IMAGE	ami-7acb2f13	oracle-corporation/database-ami/32-bit/oracle_10g_XE_32Bit-image.manifest.xml	725966715235	available	public		i386	machine	aki-c5e703ac	ari-c2e703ab
IMAGE	ami-cecb2fa7	oracle-corporation/database-ami/32-bit/oracle_11106_EE_32Bit-image.manifest.xml	725966715235	available	public		i386	machine	aki-c5e703ac	ari-c2e703ab
IMAGE	ami-7ecb2f17	oracle-corporation/database-ami/64-bit/oracle_11106_EE_64Bit-image.manifest.xml	725966715235	available	public		x86_64	machine	aki-0d9f7b64	ari-369f7b5f
IMAGE	aki-c5e703ac	oracle-corporation/oracle_linux_kernels/32_bit/2.6.18-53.1.13.9.2.el5xen/vmlinuz-2.6.18-53.1.13.9.2.el5xen.manifest.xml	725966715235	available	public		i386	kernel
IMAGE	ari-c2e703ab	oracle-corporation/oracle_linux_ramdisks/32_bit/2.6.18-53.1.13.9.2.el5xen/initrd-2.6.18-53.1.13.9.2.el5xen.img.manifest.xml	725966715235	available	public	i386	ramdisk
</pre>
<p>Since I just wanted a little instance to play with I picked up the /oracle_11106_EE_32Bit,  and started that,  note that I had already created a default security group (with port 22 access) and a default keypair which I had on my machine.</p>
<pre class="brush: xml;">pdodds:/usr/local/ec2/bin$ ./ec2-run-instances -k primary-keypair -g default ami-cecb2fa7
RESERVATION	r-2ed30047	207015290718	default
INSTANCE	i-0b842462	ami-cecb2fa7			pending	primary-keypair	0	m1.small	2008-09-22T21:14:17+0000	us-east-1a	aki-c5e703ac	ari-c2e703ab
pdodds:/usr/local/ec2/bin$
</pre>
<p>Next up I wanted to stick the database on an EBS volume to I decided to create one of those while I&#8217;m here (and waiting for that server to start).  Note that since I was a bit lazy on setting the availability zone I wanted for the server I&#8217;ll be a little more disciplined on the volume (note that volumes need to be in the same availability zone as the server).</p>
<pre class="brush: xml;">pdodds:/usr/local/ec2/bin$ ./ec2-create-volume -s 5 -z us-east-1a
VOLUME	vol-1104e178	5		us-east-1a	creating	2008-09-22T21:17:14+0000
pdodds:/usr/local/ec2/bin$
</pre>
<p>Now if all is well I should be able to check back on my EC2 instance to see if it is available.</p>
<pre class="brush: xml;">pdodds:/usr/local/ec2/bin$ ./ec2-describe-instances i-0b842462
RESERVATION	r-2ed30047	207015290718	default
INSTANCE	i-0b842462	ami-cecb2fa7	ec2-75-101-230-110.compute-1.amazonaws.com	domU-12-31-39-00-E0-07.compute-1.internal	running	primary-keypair	0		m1.small	2008-09-22T21:14:17+0000	us-east-1a	aki-c5e703ac	ari-c2e703ab
pdodds:/usr/local/ec2/bin$
</pre>
<p>Once it is available,  as above then we can attach the EBS volume that we created.</p>
<pre class="brush: xml;">pdodds:/usr/local/ec2/bin$ ./ec2-attach-volume vol-1104e178 -i i-0b842462 -d /dev/sdh
ATTACHMENT	vol-1104e178	i-0b842462	/dev/sdh	attaching	2008-09-22T21:24:02+0000
pdodds:/usr/local/ec2/bin$
</pre>
<p>While that is getting hooked up,  we can now log into the new server &#8211; with simple ssh -i primary-keypair root@ec2-75-101-230-110.compute-1.amazonaws.com.</p>
<p>At this point we accept the license terms and then set the new password,  though I would recommend switching off password based connections to the server (for anyone).  When we get to the &#8220;Would you like to create a database now [y|n]:&#8221; lets say no first time.  Since we still need to get that EBS drive ready for use.  This will drop you back to the root login,  though it is easy to get back to the script.</p>
<pre class="brush: xml;">$ mkfs /dev/sdh
mke2fs 1.39 (29-May-2006)
/dev/sdh is entire device, not just one partition!
Proceed anyway? (y,n) y
</pre>
<p>I&#8217;m probably far to lazy,  but this will just get me a drive ready for use, and then its back to the Oracle script,  this time we select our new device for our database to be stored,  and also the flash recovery area.</p>
<pre class="brush: xml;">/home/oracle/scripts/run_dbca.sh
The Oracle Database Software (ORACLE_HOME) has been installed at
/u01/app/oracle/product/11.1.0/db_1.
Before you can use the Oracle Software, you will need to create a database.

Would you like to create a database now [y|n]:  y

You chose to create a database now.  Before we begin, please provide the following details: 

Select a disk device to store your datafiles and redo logs on:

ID  DEVICE_NAME
--- -----------
[1] /dev/sda2
[2] /dev/sdh 

Type in the ID from the list above [DEFAULT: 1]:
2
Enter the mount point you would like this device mounted as [DEFAULT:  /u02]:

You have selected to mount /dev/sdh on to /u02, is this correct [y|n] [DEFAULT:  n]:
y

Select a disk device to store your flash recovery area files on:

ID  DEVICE_NAME
--- -----------
[1] /dev/sda2
[2] /dev/sdh 

Type in the ID from the list above [DEFAULT: 1]:
2
Using mount point /u02

You have selected to mount /dev/sdh on to /u02, is this correct [y|n] [DEFAULT:  n]:
y

Checking disk devices and mount points for Datafiles and Logfiles
Checking if directory /u02 exists...

Creating directory /u02
Trying to mount /dev/sdh on /u02
DBFILES:  /u02/oradata
FRA:  /u02/flash_recovery_area

Please enter the name for your Oracle Database.
This name will be used as your
ORACLE SID (System Identifier):
</pre>
<p>From here on in its a simple case of providing a name for the database and all the passwords for the Oracle users,  and away it goes.  After just a few minutes you will have your database ready to roll,  the files stored on EBS and running against the Oracle AMI.   It will have started the Enterprise Manager web server etc (though to be honest I kinda wish that was optional since I don&#8217;t tend to use it a whole lot).</p>
<p>All in all I have to say the experience was smooth and quick,  making Oracle suddenly a lot more welcoming in a cloud environment and I&#8217;m sure with Oracle World in full swing we&#8217;ll be hearing a lot more about it.</p>
<p>And as always once you are done its nice and easy to clean up&#8230;</p>
<pre class="brush: xml;">pdodds:/usr/local/ec2/bin$ ./ec2-terminate-instances i-0b842462
INSTANCE	i-0b842462	running	shutting-down
pdodds:/usr/local/ec2/bin$ ./ec2-detach-volume vol-1104e178
ATTACHMENT	vol-1104e178	i-0b842462	/dev/sdh	detaching	2008-09-22T21:24:02+0000
pdodds:/usr/local/ec2/bin$ ./ec2-delete-volume vol-1104e178
VOLUME	vol-1104e178
pdodds:/usr/local/ec2/bin$
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.fiveclouds.com/2008/09/22/oracle-in-the-cloud/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting off the ground with EC2</title>
		<link>http://www.fiveclouds.com/2008/05/03/getting-off-the-ground-with-ec2/</link>
		<comments>http://www.fiveclouds.com/2008/05/03/getting-off-the-ground-with-ec2/#comments</comments>
		<pubDate>Sat, 03 May 2008 12:21:59 +0000</pubDate>
		<dc:creator>Philip</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[paas]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.fiveclouds.com/?p=43</guid>
		<description><![CDATA[<a href="http://www.fiveclouds.com/wp-content/uploads/2008/05/images.jpeg"><img align="left" class="size-medium wp-image-44" title="Amazon" src="http://www.fiveclouds.com/wp-content/uploads/2008/05/images.jpeg" alt="Amazon" width="150" height="44" /></a>Over the past couple of months I have been playing around with <a href="http://aws.amazon.com">Amazon Web Services</a>,  I have to admit they are an interesting and powerful solution to many of the IT as a Service models that have hung around in the past.  While the technology is definitely still low level I thought I would spend a rainy Saturday in Manila playing around with the Ruby EC2 library and see what I could.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.fiveclouds.com/wp-content/uploads/2008/05/images.jpeg"><img align="left" class="size-medium wp-image-44" title="Amazon" src="http://www.fiveclouds.com/wp-content/uploads/2008/05/images.jpeg" alt="Amazon" width="150" height="44" /></a>Over the past couple of months I have been playing around with <a href="http://aws.amazon.com">Amazon Web Services</a>,  I have to admit they are an interesting and powerful solution to many of the IT as a Service models that have hung around in the past.  While the technology is definitely still low level I thought I would spend a rainy Saturday in Manila playing around with the Ruby EC2 library and see what I could.</p>
<p>In order to get things started I simply set-up the new <a href="http://github.com/grempe/amazon-ec2/wikis">Amazon EC2</a> gem.</p>
<pre><code class="terminal"># ONE TIME ONLY
# Execute this on each machine where you install gems to add github as a gem source
gem sources -a http://gems.github.com/

# ONE TIME ONLY
# Only if you had a previous version of the gem installed from RubyForge before we moved to GitHub
# Say 'Y' to remove all previous versions and all binaries when prompted.
sudo gem uninstall amazon-ec2

# Finally install the gem
sudo gem install grempe-amazon-ec2
</code></pre>
<p>Once installed we need to add a couple of environment variables  to our .bash_profile,  this is useful to have around if you want to use the EC2 CLI anyway.  Here&#8217;s what I put in my .bash_profile (on Leopard):</p>
<pre><code class="terminal">export RUBYOPT="rubygems"

# For amazon-ec2 and amazon s3 ruby gems
export AMAZON_ACCESS_KEY_ID="YOUR_ACCESS_KEY_ID"
export AMAZON_SECRET_ACCESS_KEY="YOUR_SECRET_ACCESS_KEY_ID"
</code></pre>
<p><code class="terminal"> </code></p>
<p> </p>
<p>Before going too far we will need to create a key pair that we can use,  this is easy enough &#8211; lets start up the ec2sh and create a new keypair.  We store this in a local file.</p>
<pre><code class="terminal">&gt;&gt; File.open("pdodds-keypair","w") { |file| file.write(@ec2.create_keypair(:key_name=&gt;"pdodds-keypair").keyMaterial); file.close }
&gt;&gt; File.chmod 0700,"pdodds-keypair"
</code></pre>
<p>First up I thought I would take a look around the images that are available so that I can pick up something that I could use,  since I&#8217;m bedding slowly into the Ruby world I thought I would use ec2sh and get back some information on what is available.</p>
<pre><code class="terminal">&gt;&gt; @ec2.describe_images(:owner=&gt;'amazon').imagesSet.item.each { |image| puts "#{image.imageId} #{image.imageLocation}" } == true
</code></pre>
<p>Beside the scruffy ==true on the end basically this prints out the ID&#8217;s and locations of the Amazon owned images.  For those new to EC2 these are the images of operating systems that we can use to boot our instance.  EC2 machines currently only support persistent filesystems for those lucky enough to get on the beta (anyone going to invite me?).  These means that when you boot up a machine the image is all you have, and when you power down anything you have written to disk is lost.  In a while we&#8217;ll touch upon bundles &#8211; this is a way to allow you to build AMIs (Amazon Machine Image) and store them away.</p>
<p>The output of our command should give us a nice list,  we can do a little to filter down the results (since their is a fair few to choose from).</p>
<pre><code class="terminal">&gt;&gt; @ec2.describe_images(:owner=&gt;'amazon').imagesSet.item.each { |image| puts "#{image.imageId} #{image.imageLocation}" if image.imageLocation =~ /rails/} == true
</code></pre>
<p>This gave me a few to choose from</p>
<pre><code class="terminal">ami-0cf61365 ec2-on-rails-0.9.2/ec2-on-rails.manifest.xml
ami-540aef3d ec2onrails/ec2onrails-v0_9_7-x86_64.manifest.xml
ami-5c0aef35 ec2onrails/ec2onrails-v0_9_7-i386.manifest.xml
ami-6bcd2802 rails1-51193934437/rails1-51193934437.img.manifest.xml
ami-86c025ef ec2onrails/ec2onrails-v0_9_5-i386.manifest.xml
ami-99c025f0 ec2onrails/ec2onrails-v0_9_5-x86_64.manifest.xml
ami-99f712f0 ec2-on-rails-0.9.1/ec2-on-rails.manifest.xml
ami-a38b6eca amis.winelibrary.com/rails_svn.manifest.xml
ami-a3f91cca ec2onrails/ec2onrails-v0_9_3.manifest.xml
ami-a93adfc0 webficient/ec2_images/fc8-rails2-nginx-mysql/image.manifest.xml
ami-e620c58f ec2onrails/ec2onrails-v0_9_6-i386.manifest.xml
ami-ecc12485 ec2onrails/ec2onrails-v0_9_4-i386.manifest.xml
ami-efc12486 ec2onrails/ec2onrails-v0_9_4-x86_64.manifest.xml
ami-f920c590 ec2onrails/ec2onrails-v0_9_6-x86_64.manifest.xml
</code></pre>
<p>So lets get down to business &#8211; time to provision one of those servers for our use,  I have to admit this was the bit that I always thought was cool,  we can just use a simple command from ec2sh to create an instance of a server.  Back to ec2sh.</p>
<pre><code class="terminal">&gt;&gt; @ec2.run_instances :image_id=&gt;"ami-a93adfc0", :key_name=&gt;"pdodds-keypair"
</code></pre>
<p>This will dump out a bunch of XML,  basically the response from the web service.  You could probably have done something to pretty up the response,  however for now we can look up our instances to see if it is running</p>
<pre><code class="terminal">&gt;&gt; @ec2.describe_instances.reservationSet.item.each{ |reservation| puts "Reservation: #{reservation.reservationId}"; reservation.instancesSet.item.each {|item| puts "Instance: #{item.instanceId} #{item.instanceType} #{item.launchTime} #{item.dnsName}" }} == true
</code></pre>
<p>This will output the happy information,  as long as the server has had a few minutes to provision and start.</p>
<pre><code class="terminal">i-9e5a97f7 m1.small 2008-05-03T09:19:12.000Z ec2-75-101-212-159.compute-1.amazonaws.com
</code></pre>
<p>Next we need to authorize the access to the server</p>
<pre><code class="terminal">&gt;&gt; @ec2.authorize_security_group_ingress :group_name=&gt;"default",:from_port=&gt;22,:ip_protocol=&gt;"tcp", :to_port=&gt;22, :cidr_ip=&gt;"0.0.0.0/24"
</code></pre>
<p>Finally now from terminal we can SSH into the server,  note that we do need to include the key that we created.</p>
<pre><code class="terminal">ssh -i pdodds-keypair root@ec2-75-101-212-159.compute-1.amazonaws.com
</code></pre>
<p>There we go &#8211; we have an instance of that Unix box, up and running, we can play around with the instance and when it&#8217;s time to say goodbye its a simple as going back to our ec2sh session and running:</p>
<pre><code class="terminal">&gt;&gt; @ec2.terminate_instances :instance_id=&gt;"i-9e5a97f7"
</code></pre>
<p>I&#8217;ll follow up this blog post with how you can modify and then store images, later however I hope this shows how you can use the Ruby EC2 API to play around and create servers :) happy provisioning in the cloud&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fiveclouds.com/2008/05/03/getting-off-the-ground-with-ec2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
