<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8612900155488851021</id><updated>2012-02-16T02:00:45.540-08:00</updated><category term='pixi plus'/><category term='cloud'/><category term='chuck'/><title type='text'>smoser's thoughts</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>30</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-973032278408251275</id><published>2012-01-04T17:29:00.000-08:00</published><updated>2012-01-04T17:36:13.231-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pixi plus'/><title type='text'>$40 mp3 player with wifi, speaker, linux support (palm pixi plus)</title><content type='html'>&lt;p&gt;For almost 4 years I have used a mp3 player from Creative Labs named &lt;a href="http://support.creative.com/Products/ProductDetails.aspx?catID=213&amp;CatName=MP3+Players&amp;subCatID=213&amp;subCatName=ZEN&amp;prodID=17437&amp;prodName=ZEN+Stone+Plus+with+built-in+speaker"&gt;"ZEN Stone Plus with built-in speaker"&lt;/a&gt;.  It was used it to play music for our toddler all night long, nearly every night.&lt;/P&gt;&lt;p&gt;It was an absolutely wonderful product.  Battery life via rechargeable battery was excellent, it was small enough to forget about in your pocket, and the speaker was sufficient for what we needed&lt;/P&gt;&lt;p&gt;The only deficiency in my opinion was that it could not play music while plugged into AC power.  That meant that a.) the battery would have to last the 10+ hours every night and b.) we had to plug it into AC power every morning to charge it.  In the end, it was the latter that caused me to need to replace it.  After probably 1000+ plug-in and remove (many by a child under 5 years old) the pins in the USB connection eventually failed.&lt;/P&gt;&lt;p&gt;If you're looking for a portable MP3 player with a built-in speaker, your options are very few.   The Ipod Touch (and Iphone) are perfectly good solutions, but come a hefty price tag even used.  So, I had to get creative.&lt;/P&gt;&lt;p&gt;I'd seen the Palm Pixi appear on a couple "deal-a-day" websites at the $30 price range, and that lead me to consider the Palm Pixi Plus.  The Pixi Plus has the following features that made it look *very* tempting:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;8GB storage&lt;/li&gt;&lt;li&gt;Internal Speaker&lt;/li&gt;&lt;li&gt;wifi&lt;/li&gt;&lt;li&gt;web browser&lt;/li&gt;&lt;li&gt;GPS&lt;/li&gt;&lt;li&gt;Camera&lt;/li&gt;&lt;li&gt;Touch screen and physical keyboard&lt;/li&gt;&lt;li&gt;can play music while charging&lt;/li&gt;&lt;li&gt;runs linux! (just geeky)&lt;/li&gt;&lt;li&gt;open development platform&lt;/li&gt;&lt;/UL&gt;&lt;/P&gt;&lt;p&gt;However, I googling left me unsure about a couple things:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Could I use the pixi's wifi without first activating it with some carrier?  I had no interest in a phone, or a monthly bill. It did seem that worst case, I could activate on a pay-as-you-go provider and get going for probably less than $10 total.&lt;/li&gt;&lt;li&gt;If I could manage to avoid activation, could I still have access to the Palm WebOS Store?  Having an "App Store" was an unnecessary upgrade from the zen stone we had before, but sure would be nice.&lt;/li&gt;&lt;/ul&gt;&lt;/P&gt;&lt;p&gt;In the end, the answer to each of the above questions was 'Yes'.  I now have a MP3 player with a builtin speaker, that also has all the functions generally associated with a smart phone (see above).  I'm &lt;i&gt;really&lt;/i&gt; happy with it.  It cost me &lt;a href="http://www.amazon.com/Palm-Pixi-Plus-Verizon-Screen/dp/B004IPAC10"&gt;$40 shipped in 2 days&lt;/a&gt; (I do have amazon prime, so total cost may be a little bit more). The only two issues at the moment are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Getting it plugged in for charge is a bit of a pain, and it seems to me that likely the thing that will end up failing is that connection, because its not 100% trivial (and remember, toddlers/young kids are using it).  There is, however, a $15 solution for that.  I've not purchased it yet, so I'm not 100% certain, but it looks like I can get a &lt;a href="http://www.amazon.com/Palm-Touchstone-Charging-Dock-Pixi/dp/B002CMEIWK/ref=pd_sbs_misc_1"&gt;Touchstone Palm Pixi Charging Dock&lt;/a&gt; and &lt;a href="http://www.amazon.com/Palm-3452WW-Pixi-Touchstone-Cover/dp/B002UHKPGU/ref=sr_1_1?s=wireless&amp;ie=UTF8&amp;qid=1325726703&amp;sr=1-1"&gt;Palm Pixi Touchstone Cover&lt;/a&gt; shipped for under $10.&lt;/li&gt;&lt;li&gt;The music player stops somewhere after 2 hours or so when its on repeat of a single song.  Obviously this is not an issue for many people, but it affects my use case.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;In Summary, if you think an 8GB mp3 player with GPS, speaker, camera would be a generally cool toy for $40, then buy one today.  I'm really happy with this one.  I'll try to write another article soon that describes how to use Meta Doctor to flash with activation disabled and then run the first use program to set up a profile.&lt;br /&gt;&lt;/P&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-973032278408251275?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/973032278408251275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2012/01/40-mp3-player-with-wifi-speaker-linux.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/973032278408251275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/973032278408251275'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2012/01/40-mp3-player-with-wifi-speaker-linux.html' title='$40 mp3 player with wifi, speaker, linux support (palm pixi plus)'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-4082513955922021891</id><published>2011-11-17T10:27:00.000-08:00</published><updated>2011-11-17T10:27:18.449-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='chuck'/><title type='text'>Chuck sightings</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;b&gt;Chuck loves the Red Wings!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-L8vRh3kbWC8/TsVQwJ0BSUI/AAAAAAAAANI/xsw1uCRN7QM/s1600/chuckStanleyCup2.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="240" width="320" src="http://1.bp.blogspot.com/-L8vRh3kbWC8/TsVQwJ0BSUI/AAAAAAAAANI/xsw1uCRN7QM/s320/chuckStanleyCup2.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-TyGnemZGIbk/TsVQv2e5ToI/AAAAAAAAAMw/H2N1r9ZL6BM/s1600/chuckRedWingsBench.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="240" width="320" src="http://4.bp.blogspot.com/-TyGnemZGIbk/TsVQv2e5ToI/AAAAAAAAAMw/H2N1r9ZL6BM/s320/chuckRedWingsBench.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;b&gt;Chuck has a 4 year old&lt;/b&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-uQHAPRzFZic/TsVRdgWdOFI/AAAAAAAAANU/YhBvpqu9xBo/s1600/chuckSesameStreet.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="128" width="320" src="http://3.bp.blogspot.com/-uQHAPRzFZic/TsVRdgWdOFI/AAAAAAAAANU/YhBvpqu9xBo/s320/chuckSesameStreet.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-4082513955922021891?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/4082513955922021891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/11/chuck-sightings.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/4082513955922021891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/4082513955922021891'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/11/chuck-sightings.html' title='Chuck sightings'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-L8vRh3kbWC8/TsVQwJ0BSUI/AAAAAAAAANI/xsw1uCRN7QM/s72-c/chuckStanleyCup2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-1720727575362744545</id><published>2011-08-29T09:49:00.000-07:00</published><updated>2011-08-29T09:49:17.605-07:00</updated><title type='text'>RFC: anyone using vmdk or ovf files from cloud-images?</title><content type='html'>Friday I posted the following on &lt;a href="https://groups.google.com/group/ec2ubuntu/browse_frm/thread/69d7a94e32642b1b"&gt;ec2ubuntu&lt;/a&gt; and &lt;a href="https://lists.ubuntu.com/archives/ubuntu-cloud/2011-August/thread.html#655"&gt;ubuntu-cloud&lt;/a&gt; mailing lists.  I'm posting here in an effort to reach a larger audience.&lt;br /&gt;&lt;br /&gt;If you are using the OVF files or VMDK files, please respond.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Date: Fri, 26 Aug 2011 16:34:41&lt;br /&gt;From: Scott Moser&lt;br /&gt;Subject: Anyone using the .ovf and/or .vmdk files on cloud-images?&lt;br /&gt;&lt;br /&gt;Hey all,&lt;br /&gt;&lt;br /&gt;   Is anyone using the .vmdk or .ovf files on&lt;br /&gt;http://cloud-images.ubuntu.com [1] ?&lt;br /&gt;&lt;br /&gt;   In the 11.04 cycle, I started building .ovf files with corresponding&lt;br /&gt;.vmdk images.  The goal of this was to make Ubuntu available for use via&lt;br /&gt;software that supported importing OVF.&lt;br /&gt;   I chose to to create the disk as VMDK formated images rather than a&lt;br /&gt;more open-source friendly format such as qcow.   The OVF file and&lt;br /&gt;associated disk image is consumable by both vmware tools and by&lt;br /&gt;VirtualBox.  There are no OVF consumers that I'm aware of that would&lt;br /&gt;function with a qcow (or even 'raw') disk image.  I feel compelled to also&lt;br /&gt;mention that this format of vmdk (compressed) is not supported by qemu-img&lt;br /&gt;or kvm.&lt;br /&gt;   Since having an OVF that could not be used by any software is not&lt;br /&gt;significantly more useful than not having an OVF, we went with vmdk.&lt;br /&gt;&lt;br /&gt;   Largely prompted by the interest in providing a download format that is&lt;br /&gt;ideal for OpenStack users [2], I am re-considering my decision.  I would&lt;br /&gt;like to avoid adding another full disk image format to the output of the&lt;br /&gt;build scripts.  As a result I'm thinking about replacing the .vmdk images&lt;br /&gt;with compressed qcow images and updating the OVF files to reference those.&lt;br /&gt;&lt;br /&gt;   The reason behind not wanting to just add yet another deliverable is&lt;br /&gt;that more downloads are confusing, and disk space is not necessarily free.&lt;br /&gt;If I can drop a deliverable not used by anyone, then I'd like to do that.&lt;br /&gt;&lt;br /&gt;   So, would anyone object to the removal of .vmdk files from&lt;br /&gt;cloud-images?  Is anyone using these that could not just as easily use&lt;br /&gt;qcow2 formated images?&lt;br /&gt;&lt;br /&gt;   Thanks,&lt;br /&gt;   Scott&lt;br /&gt;&lt;br /&gt;--&lt;br /&gt;[1] http://cloud-images.ubuntu.com/server/oneiric/current/&lt;br /&gt;[2] https://bugs.launchpad.net/ubuntu/+bug/833265&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-1720727575362744545?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/1720727575362744545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/08/rfc-anyone-using-vmdk-or-ovf-files-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/1720727575362744545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/1720727575362744545'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/08/rfc-anyone-using-vmdk-or-ovf-files-from.html' title='RFC: anyone using vmdk or ovf files from cloud-images?'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-5229276231590979625</id><published>2011-08-09T08:46:00.000-07:00</published><updated>2011-08-09T17:24:04.390-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>Amazon issues with EBS affect Ubuntu images in the EU-WEST region</title><content type='html'>&lt;p&gt;&lt;i&gt;Note: This blog post has been updated in-place.&lt;br /&gt;&lt;br /&gt;We have received information from Amazon that the EBS snapshots for our released 10.04 images from 20110719 were &lt;b&gt;not affected&lt;/B&gt; (ami-5c417128 and ami-52417126).  &lt;strike&gt;It seems that an api issue incorrectly marked them as such&lt;/strike&gt;.  It was an error in our logic that associated snapshot-ids with amis that gave us the incorrect output.  The only Ubuntu images that were affected were old daily builds and milestone releases.  If you are interested in reading the original message, please do so on the &lt;a href="https://lists.ubuntu.com/archives/ubuntu-cloud-announce/2011-August/thread.html#0"&gt;Ubuntu cloud-announce mailing list archives&lt;/a&gt;.&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;We received this morning an automated email[1] from Amazon informing us of possible loss of data in EBS snapshots on the EU-WEST-1 region.  Our engineering team immediately started an assessment of the damages this might have caused to the EBS images that we publish for our users.  We are working with Amazon to re-mediate customer impact and prevent any future outages.&lt;/P&gt;&lt;p&gt;A number of non-current daily build and old alpha or beta images have been affected, but we hope that no one would have been using these images for production use; we are not planning corrective actions for these images. You can see the full list of AMIs affected at &lt;a HREF="http://paste.ubuntu.com/662210"&gt;http://paste.ubuntu.com/662210/&lt;/A&gt;.&lt;/P&gt;&lt;p&gt;To have this type of announcements sent to your email directly, please subscribe to our ubuntu-cloud-announce mailing list at &lt;a HREF="https://lists.ubuntu.com/mailman/listinfo/ubuntu-cloud-announce"&gt;https://lists.ubuntu.com/mailman/listinfo/ubuntu-cloud-announce.&lt;/A&gt;.&lt;/P&gt;Our support services are available to help customers of the Ubuntu Advantage Cloud Guest program.  Details about this program can be found at &lt;a HREF="http://www.canonical.com/enterprise-services/ubuntu-advantage/cloud"&gt;http://www.canonical.com/enterprise-services/ubuntu-advantage/cloud&lt;/A&gt;&lt;br /&gt;&lt;br /&gt;[1] Email received from Amazon on Aug 9 2011 at 9:11 UTC&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;Hello,&lt;br /&gt;&lt;br /&gt;We've discovered an error in the Amazon EBS software that cleans up unused snapshots.  This has affected at least one of your snapshots in the EU-West Region.  &lt;br /&gt;&lt;br /&gt;During a recent run of this EBS software in the EU-West Region, one or more blocks in a number of EBS snapshots were incorrectly deleted. The root cause was a software error that caused the snapshot references to a subset of blocks to be missed during the reference counting process. This process compares the blocks scheduled for deletion to the blocks referenced in customer snapshots. As a result of the software error, the EBS snapshot management system in the EU-West Region incorrectly thought some of the blocks were no longer being used and deleted them. We've addressed the error in the EBS snapshot system to prevent it from recurring.&lt;br /&gt;&lt;br /&gt;We have now disabled all of your snapshots that contain these missing blocks. You can determine which of your snapshots were affected via the AWS Management Console or the DescribeSnapshots API call. The status for any affected snapshots will be shown as "error."&lt;br /&gt;&lt;br /&gt;We have created copies of your affected snapshots where we've replaced the missing blocks with empty blocks. You can create a new volume from these snapshot copies and run a recovery tool on it (e.g. a file system recovery tool like fsck); in some cases this may restore normal volume operation. These snapshots can be identified via the snapshot Description field which you can see on the AWS Management Console or via the DescribeSnapshots API call. The Description field contains "Recovery Snapshot snap-xxxx" where snap-xxx is the id of the affected snapshot. Alternately, if you have any older or more recent snapshots that were unaffected, you will be able to create a volume from those snapshots without error. For additional questions, you may open a case in our Support Center: https://aws.amazon.com/support/createCase&lt;br /&gt;&lt;br /&gt;We apologize for any potential impact this might have on your applications.&lt;br /&gt;&lt;br /&gt;Sincerely,&lt;br /&gt;AWS Developer Support&lt;br /&gt;&lt;br /&gt;This message was produced and distributed by Amazon Web Services LLC, 410 Terry Avenue North, Seattle, Washington 98109-5210&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-5229276231590979625?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/5229276231590979625/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/08/amazon-issues-with-ebs-affect-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/5229276231590979625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/5229276231590979625'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/08/amazon-issues-with-ebs-affect-ubuntu.html' title='Amazon issues with EBS affect Ubuntu images in the EU-WEST region'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-1478237934661793432</id><published>2011-07-29T17:22:00.000-07:00</published><updated>2011-07-29T17:22:52.630-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>How to find the right Ubuntu AMI with tools</title><content type='html'>A while ago, I gave instructions on how you could &lt;a href="/2011/07/how-to-find-right-ubuntu-ami-on-ec2.html"&gt;find the right Ubuntu AMI&lt;/a&gt;.  I promised to write about how you could accomplished programmaticly.&lt;br /&gt;&lt;br /&gt;When we publish Ubuntu AMIs, we simultaneously publish machine consumable data to &lt;a href="https://cloud-images.ubuntu.com/query/"&gt;https://cloud-images.ubuntu.com/query/&lt;/a&gt;.  The data there contains information so that you can:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Find the latest ami of a given type (hvm/ebs/instance-store), arch, and region.&lt;/li&gt;&lt;li&gt;Download the pristine image files&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;I think the format of the data is generally discernible, but there is some more information on the &lt;a href="https://help.ubuntu.com/community/UEC/Images#Machine%20Consumable%20UEC%20Images%20Availability%20Data"&gt;Ubuntu Wiki&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I've put an &lt;a href="https://gist.github.com/1100458"&gt;example client&lt;/a&gt; together. Here is some example usage:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Launch the latest released image in us-east-1&lt;/b&gt;&lt;/li&gt;&lt;BR&gt;&lt;code&gt;$ euca-run-instances --instance-type t1.micro --key mykey $(ubuntu-ami)&lt;/code&gt;&lt;BR&gt;&lt;li&gt;&lt;b&gt;Open the Amazon EC2 console to launch the latest Oneiric daily build&lt;/b&gt;&lt;/li&gt;&lt;BR&gt;You can now &lt;a href="http://aws.typepad.com/aws/2011/04/aws-management-console-bookmarking.html"&gt;directly link&lt;/a&gt; to launching an image in Amazon EC2 console, combine that with this tool to open your browser to the right page.&lt;BR&gt;&lt;code&gt;$ ami=$(ubuntu-ami us-west-1 oneiric daily i386)&lt;BR&gt;$ gnome-open https://console.aws.amazon.com/ec2/home?region=us-west-1#launchAmi=${ami}&lt;/code&gt;&lt;BR&gt;&lt;li&gt;&lt;b&gt;Download and extract the latest tarball for lucid&lt;/b&gt;&lt;/li&gt;Here, 'pubname' is the recommended "publish name" of this AMI, which happens to correspond to the basename of the name on EC2, and "url" is a fully qualified url to http://cloud-images.ubuntu.com .&lt;BR&gt;&lt;code&gt;$ wget $(ubuntu-ami -f "%{url} -O %{pubname}.tar.gz")&lt;BR&gt;$ &lt;a href="http://manpages.ubuntu.com/manpages/lucid/man1/uec-publish-tarball.1.html"&gt;uec-publish-tarbal&lt;/a&gt;l *.tar.gz my-ubuntu-images&lt;/code&gt;&lt;/ul&gt;&lt;br /&gt;I don't think I'll get this into 11.10, but I'd like to have something with this function into 12.04, and support launching AMIs directly through it for ease of use.  I'd love to hear input on what you'd like a "ubuntu-run-instance" command to look like and do.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-1478237934661793432?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/1478237934661793432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/07/how-to-find-right-ubuntu-ami-with-tools.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/1478237934661793432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/1478237934661793432'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/07/how-to-find-right-ubuntu-ami-with-tools.html' title='How to find the right Ubuntu AMI with tools'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-5367152146159517272</id><published>2011-07-25T08:36:00.000-07:00</published><updated>2011-07-25T08:36:10.715-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>Updated AWS tools PPA for Ubuntu</title><content type='html'>I thought I would post a quick entry to spread the word about a ppa I've been maintaining with up to date versions of some of the AWS tools.  It is named simply awstools.  You can find it &lt;a href="https://launchpad.net/~awstools-dev/+archive/awstools"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Right now the ppa has the following packages:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://aws.amazon.com/developertools/351"&gt;ec2-api-tools&lt;/a&gt; : Amazon's EC2 command line tools&lt;/li&gt;&lt;li&gt;&lt;a href="http://aws.amazon.com/developertools/368"&gt;ec2-ami-tools&lt;/a&gt; : Amazon's EC2 AMI tools (rebundling and uploading images)&lt;/li&gt;&lt;li&gt;&lt;a href="http://aws.amazon.com/developertools/AWS-Identity-and-Access-Management/4143"&gt;iamcli &lt;/a&gt;: Identity Access Management (IAM) Command Line Toolkit &lt;/li&gt;&lt;li&gt;&lt;a href="http://aws.amazon.com/developertools/2928"&gt;rdscli&lt;/a&gt; : Command Line Toolkit for the Amazon Relational Database Service&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;To add this repository its as easy as:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ sudo apt-add-repository ppa:awstools-dev/awstools&lt;br /&gt;$ sudo apt-get update&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then, to install the newest available version of ec2-api-tools, do:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ sudo apt-get install ec2-api-tools&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I hope hope that is helpful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-5367152146159517272?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/5367152146159517272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/07/updated-aws-tools-ppa-for-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/5367152146159517272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/5367152146159517272'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/07/updated-aws-tools-ppa-for-ubuntu.html' title='Updated AWS tools PPA for Ubuntu'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-1122556804916175507</id><published>2011-07-18T07:01:00.000-07:00</published><updated>2011-07-18T07:01:19.630-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>How to find the right Ubuntu AMI on EC2</title><content type='html'>For anyone getting started on EC2, the first obstacle they're faced with is selecting an AMI (Amazon Machine Image).  If your trying to find an Ubuntu image either via the Amazon Console or via the output of ec2-describe-images, you're likely to be overwhelmed.  The success of Ubuntu as a platform and Ubuntu's commitment to refreshing AMIs means that there are literally thousands of of images on Amazon EC2 with "ubuntu"in their name.  That, combined with and the lack of Ubuntu on the "Quick Start" menu makes this a non-trivial task.&lt;br /&gt;&lt;br /&gt;The purpose of this post is to document how you can easily, quickly and safely find the Official Ubuntu AMIs on EC2 via the Amazon EC2 console or via your web browser.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Some General Ubuntu Information&lt;/h3&gt;You already may be aware of these items, but I want to point them out for those who are just getting started with Ubuntu or EC2.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Ubuntu releases every 6 months.  Each release has a version number and a codename.  The most important thing to note here is that every 2 years a LTS (Long Term Support) release is made.  If you want stability and support for 5 years, select an LTS release.  If you want the newest packages, select the most recent release. See the &lt;a href="http://en.wikipedia.org/wiki/List_of_Ubuntu_releases"&gt;wikipedia entry&lt;/a&gt; for more information.&lt;br /&gt;&lt;li&gt;At the time of this writing, there are 5 "regions" in Amazon EC2.  Each region represents a geographical location.  Each region has its own AMI ids. Inside each region there are 2 architectures (x86_64, i386) and 2 "root store" types (EBS or instance).  That means that for each build Ubuntu releases, we generate 20 ami ids.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ul&gt;&lt;h3&gt;Easiest: Find AMIs From Your Web Browser&lt;/h3&gt;You can choose your interface for selecting images.  Go to either: &lt;ul&gt;&lt;li&gt;&lt;a href="http://cloud.ubuntu.com/ami"&gt;http://cloud.ubuntu.com/ami&lt;/a&gt;&lt;/li&gt;At the bottom of this page, you can select the region, release, arch or root-store.  You're only shown the most recent releases here.  When you've made your selection, you can copy and paste the ami number, or just click on it to go right to the EC2 console launch page for that AMI. or&lt;li&gt; &lt;a href="https://cloud-images.ubuntu.com/server/releases/"&gt;https://cloud-images.ubuntu.com/server/releases/&lt;/a&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Select Your release by number or code-name&lt;/li&gt;&lt;li&gt;Select 'release/': We keep historical builds around for debugging, but the 'release/' directory will always be the latest.&lt;/li&gt;&lt;li&gt;Select your AMI from the table and click to launch in the console or copy and paste a command line.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;h3&gt;Search through the Amazon EC2 Console&lt;/h3&gt;The &lt;a href="https://console.aws.amazon.com/ec2/home"&gt;EC2 Console&lt;/a&gt; is a graphical way to sort through AMIs and select one to launch.  To Launch an Official Ubuntu Image here, follow the steps below. &lt;ul&gt;&lt;li&gt;Select the region you want in the top left, under 'Navigation'&lt;/li&gt;Example: "Us East (Virginia)"&lt;li&gt;Click "AMIs"&lt;/li&gt;Do not click "Launch Instance", see note below&lt;/li&gt;&lt;li&gt;for 'Viewing', select "All Images"&lt;/li&gt;&lt;li&gt;Limit the results to Ubuntu Stable Release images by typing &lt;b&gt;ubuntu-images/&lt;/B&gt;&lt;/li&gt;You should expand the 'AMI Name' field as wide as possible (maybe shrink the others).&lt;li&gt;Limit the results to a specific release by appending '.*&lt;release&gt;'.&lt;/li&gt;For example: &lt;b&gt;ubuntu-images/.*10.04&lt;/B&gt;&lt;li&gt;Limit the results to a given arch by appending '.*i386' or '.*amd64'&lt;/li&gt;Note: If you want to run a m1.small or c1.medium, you need 'i386'.  If you want to run a t1.micro, you will need to select an 'ebs' image.&lt;li&gt;Sort your results by AMI Name and make selection&lt;/li&gt;By sorting by AMI name, you can more easily see the newest AMI for a given set.  Each AMI ends with a number in the format YYYYMMDD (year,month,day).  You want the most recent one.&lt;li&gt;&lt;b&gt;Verify the Owner is 099720109477&lt;/b&gt;!&lt;br /&gt;Any user can register an AMI under any name.  Nothing prevents a malicious user from registering an AMI that would match the search above. So, in order to be safe, you need to verify that the owner of the ami is '099720109477'.&lt;br /&gt;If "Owner" is not a column for you, click "Show/Hide" at the top right and select "Owner" to be shown.&lt;br /&gt;&lt;li&gt;Click on the AMI name, then Click 'Launch'&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ul&gt;&lt;h3&gt;Notes&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;HTTPS Access&lt;/b&gt;&lt;/li&gt;Of the options above, right now https://cloud-images.ubuntu.com/server/releases/ is the only one that provides data over https.  This may be important to you if you are concerned about potential "Man in the Middle" attacks when finding a AMI id.  I've requested &lt;a href="http://foss-boss.blogspot.com"&gt;Ahmed&lt;/a&gt; [kim0 in irc] to support https access to https://cloud.ubuntu.com/ami .&lt;li&gt;&lt;b&gt;Web Console 'Launch Instance' dialog&lt;/B&gt;&lt;/li&gt;I saw no way in the 'Launch Instance' dialog to see the Owner ID.  Because if this, I suggest not using that dialog to find "Community AMIs".  There is simply no way you can reliably know who the owner of the image is from within the console.  For advanced users, I will blog sometime soon on a way to find AMIs programmatically [&lt;a href="https://cloud-images.ubuntu.com/query"&gt;Hint&lt;/a&gt;].&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-1122556804916175507?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/1122556804916175507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/07/how-to-find-right-ubuntu-ami-on-ec2.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/1122556804916175507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/1122556804916175507'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/07/how-to-find-right-ubuntu-ami-on-ec2.html' title='How to find the right Ubuntu AMI on EC2'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-6447932296973618697</id><published>2011-07-15T14:04:00.000-07:00</published><updated>2011-07-15T14:04:38.616-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>Getting a larger root volume on a cluster compute instance</title><content type='html'>At this point, all of the Ubuntu EBS root images are 8GB.  This is nice and small.  I previously covered how you could increase the size of those disks.&lt;br /&gt;&lt;br /&gt;On Cluster Compute instances, its a bit more difficult.  The cluster compute instances have their root filesystem in a partition inside of the disk attached.  Thats all well and good, and most likely a partitioned disk is more familiar to you than one that is not partitioned.  The cluster compute images have grub2 installed in the MBR of that disk.&lt;br /&gt;&lt;br /&gt;The problem with the partition on the disk is that you can no longer simply launch the instance with a larger root volume and then 'resize2fs /dev/sda1'.  This is because the kernel won't re-read the partition table of a disk until all of its partitions are unmounted.  For the disk that holds your root partition, that means you basically have to reboot after a change.&lt;br /&gt;&lt;br /&gt;To avoid that waste of precious time, we've included a utility called 'growpart' inside of the initramfs on the Ubuntu images.  It is invoked by the 'cloud-initramfs-growroot' package.  This code runs before the root fileystem is busy, so the request for the kernel to re-read the partition table will work without requiring a reboot.  To try it out, do:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# us-east-1 ami-1cad5275 hvm/ubuntu-natty-11.04-amd64-server-20110426&lt;br /&gt;$ ec2-run-instances --region us-east-1 --instance-type cc1.4xlarge \&lt;br /&gt;--block-device-mapping /dev/sda1=:20 ami-1cad5275&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;When you get to the instance, you'll have a 20G filesystem on /.  And, if you're interested enough to look in the console output, you'll see something like:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;GROWROOT: CHANGED: partition=1 start=16065 old: size=16755795 end=16771860 new: size=41913585,end=41929650&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-6447932296973618697?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/6447932296973618697/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/07/getting-larger-root-volume-on-cluster.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/6447932296973618697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/6447932296973618697'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/07/getting-larger-root-volume-on-cluster.html' title='Getting a larger root volume on a cluster compute instance'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-8107022712593347053</id><published>2011-03-02T13:43:00.000-08:00</published><updated>2011-03-02T16:10:40.827-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>start a 11.04 instance with a larger root filesystem</title><content type='html'>In order to fit inside the Amazon "Free Tier", Ubuntu made the decision to change its root volume size from 15G to 8G.  That decision was made for all refreshed EBS root images.  So, our current set of 10.04, 10.10 and 11.04 images have 8G root filesystems.&lt;br /&gt;&lt;p&gt;If you find that space somewhat limiting, it is easy to give yourself a larger root volume at instance creation time.  Its easy&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Launch the instance with appropriate block-device-mapping arguments&lt;/h3&gt;&lt;code&gt;&lt;br /&gt;$ ec2-run-instances $AMI --key mykey --block-device-mapping /dev/sda1=:20&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;p&gt;That will create you an instance with a 20G root volume.  &lt;i&gt;However&lt;/i&gt; the filesystem on that volume will still only occupy 8G of the space.  Essentially, you'd have 12G of unused volume at the end of the disk.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Resize the root volume&lt;/h3&gt;&lt;p&gt;if you've launched an 11.04 based image newer than alpha-2, &lt;b&gt;this step is not necessary&lt;/b&gt;. Cloud-init will do it for you.  It is just assumed that you want your root filesystem to fill all space on its partition.  I honestly cannot think of a reason why you would not want that.&lt;/p&gt;&lt;p&gt;Now, if you are using 10.04 or 10.10 images, you can resize your root volume easily enough after the boot.  Just login, and issue:&lt;/p&gt;&lt;code&gt;&lt;br /&gt;$ sudo resize2fs /dev/sda1&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;That operation should take only a few seconds or less, and you'll then have all the space you need.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-8107022712593347053?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/8107022712593347053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/03/todo-start-1104-instance-with-larger.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/8107022712593347053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/8107022712593347053'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/03/todo-start-1104-instance-with-larger.html' title='start a 11.04 instance with a larger root filesystem'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-9012843427628583754</id><published>2011-02-03T18:59:00.000-08:00</published><updated>2011-06-28T07:14:57.132-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>Migrating to pv-grub kernels for kernel upgrades</title><content type='html'>&lt;p&gt;After the release of the Ubuntu 10.04 LTS images that use the pv-grub kernel, there were some questions on what to do if you're running from an older AMI and want to take advantage of what pv-grub offers.&lt;/p&gt;&lt;p&gt;Heres a short list of how you might be affected:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;If you are running an EBS root instance launched from or rebundled from an Official Ubuntu image of 10.04 LTS (Lucid Lynx) released 20110201.1 or later, 10.10 (Maverick Meerkat), Natty Narwhal, or later, then you do not need to do anything.  You already are using pv-grub, and can simply apply software updates and reboot to get new kernel updates. You can stop reading now.&lt;/li&gt;&lt;li&gt;If you are running an instance-store instance that is not using a pv-grub kernel, there is nothing you can do.  There is simply no way to change the kernel of an instance store instance.&lt;/li&gt;&lt;li&gt;If you are running an EBS-root based instance rebundled from a Ubuntu 9.10 (Karmic Koala) or older, then there is currently no supported path to getting kernel upgrades.  There were no officially released EBS-root based Ubuntu images of 9.10, and with Karmic's end of life coming in April, there is not likely to be support for this new feature.&lt;/li&gt;&lt;li&gt;If you are running an EBS-root instance launched from or rebundled from an official Ubuntu release of 10.04, read on.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;Updating a 10.04 based image basically entails 2 steps, setting up /boot/grub/menu.lst, and then modifying your instance to have a pv-grub kernel.&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Step 1: installing grub-legacy-ec2.&lt;/h3&gt;&lt;p&gt;If you launched or rebundled your instance from an Ubuntu 10.04 numbered &lt;a href="http://uec-images.ubuntu.com/releases/10.04/release-20101020/"&gt;20101020&lt;/a&gt; or earlier, you need to do this step.  If you started from a release of &lt;a href="http://uec-images.ubuntu.com/releases/10.04/release-20101020/"&gt;20101228&lt;/a&gt; you can skip this step.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Apply software updates.&lt;br /&gt;&lt;br /&gt;Depending on how out of date you are, this might take a while.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;sudo apt-get update &amp;&amp; sudo apt-get dist-upgrade&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Install grub-legacy-ec2&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The 'grub-legacy-ec2' package is what the images use to manage /boot/grub/menu.lst.  If you had used Ubuntu prior to the default selection of grub2, you will be familiar with how it works.  grub-legacy-ec2 is basically just the menu.lst managing portion of the Ubuntu grub 0.97 package with some EC2 specifics thrown in.&lt;/p&gt;&lt;p&gt;To get a functional /boot/grub/menu.lst, all you have to do is:&lt;/p&gt;&lt;code&gt;&lt;br /&gt;sudo apt-get install grub-legacy-ec2&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h3&gt;Step 2: modifying the instance to use pv-grub kernels&lt;/h3&gt;Now, your images should have a functional /boot/grub/menu.lst, and grub-legacy-ec2 should be properly installed such that future kernels will get automatically added and selected on reboot.  However, you have to change your instance to boot using pv-grub rather than the old kernel aki that you originally started with.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Shut down the instance&lt;br /&gt;&lt;br /&gt;The best way to do this is probably to just issue '/sbin/poweroff' inside the instance.  Alternatively, you could use the ec2 api tools, or do so from the AWS console.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;% sudo /sbin/poweroff&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Modify the instance's kernel to be a pv-grub kernel&lt;br /&gt;&lt;br /&gt;Once the instance is moved to "stopped" state, you can modify its kernel to be a pv-grub kernel.  The kernel you select depends on the arch and region.  See the table below for selecting which you should use:&lt;br /&gt;&lt;table&gt;&lt;tr&gt;&lt;th&gt;region&lt;/th&gt;&lt;th&gt;arch&lt;/th&gt;&lt;th&gt;aki id&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ap-southeast-1&lt;/td&gt;&lt;td&gt;x86_64&lt;/td&gt;&lt;td&gt;aki-11d5aa43&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;ap-southeast-1&lt;/td&gt;&lt;td&gt;i386&lt;/td&gt;&lt;td&gt;aki-13d5aa41&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;eu-west-1&lt;/td&gt;&lt;td&gt;x86_64&lt;/td&gt;&lt;td&gt;aki-4feec43b&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;eu-west-1&lt;/td&gt;&lt;td&gt;i386&lt;/td&gt;&lt;td&gt;aki-4deec439&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;us-east-1&lt;/td&gt;&lt;td&gt;x86_64&lt;/td&gt;&lt;td&gt;aki-427d952b&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;us-east-1&lt;/td&gt;&lt;td&gt;i386&lt;/td&gt;&lt;td&gt;aki-407d9529&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;us-west-1&lt;/td&gt;&lt;td&gt;x86_64&lt;/td&gt;&lt;td&gt;aki-9ba0f1de&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;us-west-1&lt;/td&gt;&lt;td&gt;i386&lt;/td&gt;&lt;td&gt;aki-99a0f1dc&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;Then, assuming you have $AKI represents the appropriate aki above, and $IID represents your instance id, and $REGION represents your region, you can update the instance and then start it with:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ ec2-modify-instance-attribute --region ${REGION} --kernel ${AKI} ${IID} &lt;br /&gt;$ ec2-start-instances --region ${REGION} ${IID}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;Your instance will start with a new hostname/IP address, so get that out of describe-instances and ssh to your instance.  You can check that it has worked by looking at /proc/cmdline.  Your kernel command line should look something like this:&lt;/p&gt;&lt;code&gt;&lt;br /&gt;$ cat /proc/cmdline &lt;br /&gt;root=UUID=7233f657-c156-48fe-8d60-31ae6400d0cf ro console=hvc0 &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;In the future, your instance will now behave much more like a "normal server".  If you apply software updates (apt-get dist-upgrade) and reboot, you'll boot into a fresh new kernel.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-9012843427628583754?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/9012843427628583754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/02/migrating-to-pv-grub-kernels-for-kernel.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/9012843427628583754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/9012843427628583754'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/02/migrating-to-pv-grub-kernels-for-kernel.html' title='Migrating to pv-grub kernels for kernel upgrades'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-9125465972252275027</id><published>2011-02-03T11:34:00.000-08:00</published><updated>2011-02-03T11:34:29.321-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>Getting ephemeral devices on EBS images</title><content type='html'>&lt;p&gt;When you launch an instance in EC2, be it EBS root or instance-store, you are "entitled" to some amount of ephemeral storage.  Ephemeral storage is basically just extra local disk that lives in the host machine where your instance will run.  How much instance-store disk you are entitled to is described with the &lt;a HREF="http://aws.amazon.com/ec2/instance-types/"&gt;instance size descriptions&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;The described amount of ephemeral storage is allocated to all instance-store instances.  However, at register time of EBS-root instances the default "block-device-mapping" is set.  Because an EBS-root AMI may be run with different instance-types, it is impossible to set the correct mapping for all scenarios.  For the Ubuntu images, the default mapping only includes ephemeral0, which is present in all but t1.micro sizes.&lt;/p&gt;&lt;p&gt;So, if you want to "get all that you're paying for", you'll have to launch instances with different '--block-device-mapping' arguments to ec2-run-instances (or euca-run-instances).  I've written a little utility named &lt;a href="https://gist.github.com/809587"&gt;bdmapping&lt;/a&gt; to make that easier, and hold the knowledge.&lt;/p&gt;&lt;p&gt;You can use it to show the mappings for a given instance type:&lt;/p&gt;&lt;code&gt;&lt;br /&gt;$ ./bdmapping&lt;br /&gt;--block-device-mapping=sdb=ephemeral0 --block-device-mapping=sdc=ephemeral1&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Or, use it with command substitution when you launch an instance:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ ec2-run-instances $(bdmapping -c m1.xlarge) --key mykey ami-c692ec94&lt;br /&gt;#&lt;br /&gt;# the above is the same as running:&lt;br /&gt;# ec2-run-instances --block-device-mapping=sdb=ephemeral0 \&lt;br /&gt;#   --block-device-mapping=sdc=ephemeral1 --instance-type=m1.large \&lt;br /&gt;#   --key mykey ami-c692ec94&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;You can view or download 'bdmapping' at &lt;a href="https://gist.github.com/809587"&gt;https://gist.github.com/809587&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;!---&lt;code&gt;&lt;br /&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;Usage() {&lt;br /&gt;cat &amp;lt;&amp;lt;EOF&lt;br /&gt;${0##*/} [-c] instance-type&lt;br /&gt;&lt;br /&gt;print ephemeral store block-device-mapping arguments for 'instance-type'&lt;br /&gt;If '-c' given, also print "--instance-type &amp;lt;instance-type&amp;gt;"&lt;br /&gt;&lt;br /&gt;examples:&lt;br /&gt;* ${0##*/} m1.large&lt;br /&gt;--block-device-mapping=sdb=ephemeral0 --block-device-mapping=sdc=ephemeral1&lt;br /&gt;* ec2-run-instances \$(${0##*/} -c m1.xlarge) --key mykey ami-c692ec94&lt;br /&gt;is the same as running:&lt;br /&gt;ec2-run-instances --block-device-mapping=sdb=ephemeral0 \\&lt;br /&gt;--block-device-mapping=sdc=ephemeral1 --instance-type=m1.large \\&lt;br /&gt;--key mykey ami-c692ec94&lt;br /&gt;EOF&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;[ "$1" = "-h" -o "$1" = "--help" ] &amp;amp;&amp;amp; { Usage; exit 0; }&lt;br /&gt;print_type=0&lt;br /&gt;[ "$1" = "-c" ] &amp;amp;&amp;amp; { print_type=1; shift; }&lt;br /&gt;[ $# -eq 1 ] || { Usage 1&amp;gt;&amp;amp;2; exit 1; }&lt;br /&gt;itype=${1}&lt;br /&gt;&lt;br /&gt;# data cleaned from from http://aws.amazon.com/ec2/instance-types/&lt;br /&gt;# t1.micro     NONE    # m2.2xlarge    850   # c1.xlarge    1690&lt;br /&gt;# m1.small      160    # m1.large      850   # m1.xlarge    1690&lt;br /&gt;# c1.medium     350    # cc1.4xlarge  1690   # cc1.4xlarge  1690&lt;br /&gt;# m2.xlarge     420    # m2.4xlarge   1690   # cg1.4xlarge  1690&lt;br /&gt;bdmaps=""&lt;br /&gt;ba="--block-device-mapping="&lt;br /&gt;case "${itype}" in&lt;br /&gt;t1.micro) bdmaps="";; # there is no ephemeral store on t1.micro&lt;br /&gt;m1.small|c1.medium)&lt;br /&gt;bdmaps="";; # the first on i386 always attached. sda2=ephemeral0&lt;br /&gt;m2.xlarge) bdmaps="";; # one 420 for m2.xlarge&lt;br /&gt;m1.large|m2.2xlarge|cg1.*|cc1.*)&lt;br /&gt;bdmaps="${ba}sdb=ephemeral0 ${ba}sdc=ephemeral1";;&lt;br /&gt;m1.xlarge|m2.4xlarge|c1.xlarge)&lt;br /&gt;bdmaps="${ba}sdb=ephemeral0 ${ba}sdc=ephemeral1"&lt;br /&gt;bdmaps="${bdmaps} ${ba}sdd=ephemeral2 ${ba}sde=ephemeral3";;&lt;br /&gt;*) echo "unknown instance type $itype" 1&amp;gt;&amp;amp;2; exit 1;;&lt;br /&gt;esac&lt;br /&gt;[ ${print_type} -eq 0 ] &amp;amp;&amp;amp; echo "${bdmaps}" ||&lt;br /&gt;echo "${bdmaps} --instance-type=${itype}"&lt;br /&gt;exit 0&lt;br /&gt;# vi: ts=4 noexpandtab&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;--&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-9125465972252275027?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/9125465972252275027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/02/getting-ephemeral-devices-on-ebs-images.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/9125465972252275027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/9125465972252275027'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/02/getting-ephemeral-devices-on-ebs-images.html' title='Getting ephemeral devices on EBS images'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-2922638515752281934</id><published>2011-02-03T08:03:00.000-08:00</published><updated>2011-02-03T08:08:23.217-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>New Ubuntu 10.04 LTS images with pv-grub support</title><content type='html'>&lt;p&gt;Yesterday I &lt;a href="https://lists.ubuntu.com/archives/ubuntu-cloud/2011-February/000517.html"&gt; announced&lt;/a&gt; the availability of updated Ubuntu images on EC2 for 10.04 LTS (Lucid Lynx).&lt;/p&gt;&lt;p&gt;This post is mainly to mirror that one to a possibly wider audience, but also to go into more detail on the key change in these images:&lt;/p&gt;&lt;blockquote&gt;&lt;b&gt;You can now upgrade the kernel inside your 10.04 based EC2 image by running 'apt-get update &amp;&amp; apt-get dist-upgrade &amp;&amp; reboot!&lt;/b&gt;&lt;/blockquote&gt;&lt;p&gt;Now, for a little more detail on that.&lt;/p&gt;&lt;p&gt;Around the time that 10.04 released, or shortly there after, Amazon released a new feature of EC2 as &lt;a href="http://aws.typepad.com/aws/2010/07/use-your-own-kernel-with-amazon-ec2.html"&gt;"Use Your Own Kernel with Amazon EC2"&lt;/a&gt;.  What this really meant was that there were now "kernels" on EC2 that were really versions of grub.  By selecting this kernel, and providing a /boot/grub/menu.lst inside your image, the instance would be in control of the kernel booted.  Previously, the loading of a kernel was done by the xen hypervisor, and could not be changed at all for a instance-store image, and only non-trivially for an EBS-root instance&lt;/p&gt;&lt;p&gt;Yes, you read that right, midway through the year of 2010 you were able to change the kernel that you were running in an EC2 instance with a software update and a reboot.&lt;/p&gt;&lt;p&gt;We took advantage of this support in our 10.10 images, but for many people, only LTS (Long Term Support) releases are interesting.  So, to satisfy those people, we've brought the function into our 10.04 images.&lt;/p&gt;&lt;p&gt;If you're using our images, or have rebundled an image starting from them, I *strongly* suggest updating to the &lt;a href="http://uec-images.ubuntu.com/releases/lucid/release-20110201.1/"&gt;20110201.1 images&lt;/a&gt; or anything later. You'll want to do that because&lt;/p&gt;&lt;ul&gt;&lt;li&gt;You can receive kernel upgrades as normal software upgrades to your running instance.&lt;/li&gt;&lt;li&gt;This is by far the most supportable route for upgrade from 10.04 to our next LTS (12.04).  If your instance is not using the pv-grub kernel, and you want to upgrade to a newer release, you will have to upgrade, shutdown the instance, modify the associated kernel, and start up the instance.  That is both more painful, and will result in larger downtime.&lt;br /&gt;&lt;/ul&gt;&lt;p&gt;So, in short, grab our &lt;a href="http://uec-images.ubuntu.com/releases/lucid/release/"&gt;new images&lt;/a&gt;!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-2922638515752281934?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/2922638515752281934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/02/new-ubuntu-1004-lts-images-with-pv-grub.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/2922638515752281934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/2922638515752281934'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/02/new-ubuntu-1004-lts-images-with-pv-grub.html' title='New Ubuntu 10.04 LTS images with pv-grub support'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-8297063220781705824</id><published>2011-01-11T10:47:00.000-08:00</published><updated>2011-01-20T10:13:19.217-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>Failsafe and manual management of kernels on EC2</title><content type='html'>On 10.10 and later, Ubuntu images use the Amazon provided pv-grub to load kernels that live inside the image.  The selected kernel is controlled by /boot/grub/menu.lst.  This makes it possible to install a new kernel via 'dpkg -i' or 'apt-get dist-upgrade' and then reboot into the new kernel.&lt;br /&gt;&lt;br /&gt;The file /boot/grub/menu.lst is managed by grub-legacy-ec2 package.  The program 'update-grub-legacy-ec2' is called on installation of Ubuntu kernels through files that are installed in /etc/kernel/postinst.d and /etc/kernel/postrm.d.&lt;br /&gt;&lt;br /&gt;By default, as with other Ubuntu systems, the kernel with the highest revision will be the behavior will be automatically selected as the default, and selected on the next boot.  Because EC2 images is read-only, you may want to manually manage your selected kernel.  This can be done by modifying /boot/grub/menu.lst to use the grub "fallback" code.&lt;br /&gt;&lt;br /&gt;I'll launch an instance of the current released maverick (ami-ccf405a5 in us-east-1 ubuntu-maverick-10.10-i386-server-20101225).  Then, on the instance, create hard links to the default kernel and ramdisk so even on apt removal, they'll stick around, and then change /boot/grub/menu.lst to use those kernels.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;sudo ln /boot/vmlinuz-$(uname -r) /boot/vmlinuz-failsafe&lt;br /&gt;sudo ln /boot/initrd.img-$(uname -r) /boot/initrd.img-failsafe&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then, copy the existing entry in /boot/grub/menu.lst to a new entry above the automatic section.  I've changed/added:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# You can specify 'saved' instead of a number. In this case, the default entry&lt;br /&gt;# is the entry saved with the command 'savedefault'.&lt;br /&gt;# WARNING: If you are using dmraid do not use 'savedefault' or your&lt;br /&gt;# array will desync and will not let you boot your system.&lt;br /&gt;default         saved&lt;br /&gt;&lt;br /&gt;...&amp;lt;snip&amp;gt;...&lt;br /&gt;&lt;br /&gt;# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST&lt;br /&gt;&lt;br /&gt;# this is the failsafe kernel, it will be '0' as it is the first&lt;br /&gt;# entry in this file&lt;br /&gt;title           Failsafe kernel&lt;br /&gt;root            (hd0)&lt;br /&gt;kernel          /boot/vmlinuz-failsafe root=LABEL=uec-rootfs ro console=hvc0 FAILSAFE&lt;br /&gt;initrd          /boot/initrd.img-failsafe&lt;br /&gt;savedefault&lt;br /&gt;&lt;br /&gt;title           Ubuntu 10.10, kernel 2.6.35-24-virtual&lt;br /&gt;root            (hd0)&lt;br /&gt;kernel          /boot/vmlinuz-2.6.35-24-virtual root=LABEL=uec-rootfs ro console=hvc0 TEST-KERNEL&lt;br /&gt;initrd          /boot/initrd.img-2.6.35-24-virtual&lt;br /&gt;savedefault     0&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And then update grub to store that the first kernel is the 'saved', which for grub 1 (or 0.97) modifies /boot/grub/default.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;sudo grub-set-default 0&lt;br /&gt;sudo reboot&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now, a reboot will boot into the failsafe kernel (which we can verify by checking /proc/cmdline) and see 'FAILSAFE'.  Then, to test our "TEST-KERNEL", run:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;sudo grub-set-default 1&lt;br /&gt;sudo reboot&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;After this reboot, the system come up into "TEST-KERNEL" (per /proc/cmdline) but /boot/grub/default will contain '0', indicating that on subsequent boot, the FAILSAFE will run.  In this way, if your kernel failed to boot all the way up, you can then just issue:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;euca-reboot-instances i-15b77779&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And you'll boot back into the FAILSAFE kernel.&lt;br /&gt;&lt;br /&gt;The above basically allows you to manually manage your kernels while letting grub-legacy-ec2 still write entries to /boot/grub/menu.lst.&lt;br /&gt;&lt;br /&gt;I chose to use hardlinks for the 'failsafe' kernels, so that even on dpkg removal, the files would still exist.  Because the 10.10 Ubuntu kernels have the EC2 network and disk drivers built in, you'll still be able to boot even after a dpkg removal of the failsafe kernel or an errant 'rm -Rf /lib/modules/2*'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-8297063220781705824?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/8297063220781705824/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/01/failsafe-and-manual-management-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/8297063220781705824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/8297063220781705824'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/01/failsafe-and-manual-management-of.html' title='Failsafe and manual management of kernels on EC2'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-201953022072671766</id><published>2011-01-07T07:25:00.000-08:00</published><updated>2011-01-07T07:29:12.301-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>Using euca2ools rather than ec2-api-tools with EC2</title><content type='html'>The &lt;a href="http://uec-images.ubuntu.com/"&gt;Ubuntu UEC Images&lt;/a&gt; that Ubuntu produces on EC2 are in every way fully supported, "Official Ubuntu".  As with other official releases, access to source code for security and maintenance reasons affects our decisions on what is included.  &lt;br /&gt;&lt;br /&gt;In the UEC images, the most notable packages left out are '&lt;a href="http://aws.amazon.com/developertools/351"&gt;ec2-api-tools&lt;/a&gt;' and '&lt;a href="http://aws.amazon.com/developertools/368"&gt;ec2-ami-tools&lt;/a&gt;'.  I personally use the ec2-api-tools and ec2-ami-tools quite frequently and Amazon has done a great job with them.  However, the license and lack of source code prevents them from being in Ubuntu 'main'.&lt;br /&gt;&lt;br /&gt;Fortunately&lt;br /&gt;a.) There are packages made available in the Ubuntu '&lt;a href="https://help.ubuntu.com/community/Repositories/Ubuntu"&gt;multiverse&lt;/a&gt;' component.&lt;br /&gt;b.) The euca2ools package is installed by default and provides an almost drop in replacement for the ec2-api-tools and ec2-ami-tools.&lt;br /&gt;&lt;br /&gt;I think that many users of EC2 aren't aware of the euca2ools, so I'd like to give some information on how to use them here.&lt;br /&gt;&lt;br /&gt;The ec2-api-tools use the SOAP interface and thus use the "EC2_CERT" and "EC2_PRIVATE_KEY".  The euca2ools sit on top of the excellent &lt;a href="https://code.google.com/p/boto/"&gt;boto&lt;/a&gt; project.  Boto uses the AWS REST api, which means authentication is done with your "Access Key" and "Secret Key".  As a result, configuration is a little different.  (Note, bundling images, you still need the EC2_CERT and EC2_PRIVATE_KEY for encryption/signing).&lt;br /&gt;&lt;br /&gt;Configuration for euca2ools can be done via environment variables (EC2_URL, EC2_ACCESS_KEY, EC2_SECRET_KEY, EC2_CERT, EC2_PRIVATE_KEY, S3_URL, EUCALYPTUS_CERT) or via config file.  I personally prefer the configuration file approach.&lt;br /&gt;&lt;br /&gt;Here is my ~/.eucarc that is configured to operate with the EC2 us-east-1 region.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;CRED_D=${HOME}/creds/aws-smoser&lt;br /&gt;EC2_REGION="${EC2_REGION:-us-east-1}"&lt;br /&gt;EC2_CERT=${CRED_D}/cert.pem&lt;br /&gt;EC2_PRIVATE_KEY=${CRED_D}/pk.pem&lt;br /&gt;EC2_ACCESS_KEY=ABCDEFGHIJKLMNOPQRST&lt;br /&gt;EC2_SECRET_KEY=UVWXYZ0123456789abcdefghijklmnopqrstuvwx&lt;br /&gt;EC2_USER_ID=950047163771&lt;br /&gt;EUCALYPTUS_CERT=/etc/ec2/amitools/cert-ec2.pem&lt;br /&gt;EC2_URL=https://ec2.${EC2_REGION}.amazonaws.com&lt;br /&gt;S3_URL=https://s3.amazonaws.com:443&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Things to note above:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;euca2ools sources the ~/.eucarc file with bash, and then reads out the values of EC2_REGION, EC2_CERT, EC2_PRIVATE_KEY, EC2_ACCESS_KEY, EC2_USER_ID, EC2_URL, S3_URL.  This means that you use other bash functionality in the config file as I've done above with 'EC2_REGION'.  This allows me to do something like:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;EC2_REGION=us-west-1 euca-describe-images&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;li&gt;If there is no configuration file specified with '--config', then those values will be read from environment variables&lt;/LI&gt;&lt;br /&gt;&lt;li&gt;Amazon's public certificate from the ami tools is included with euca2ools in ubuntu, and located in /etc/ec2/amitools/cert-ec2.pem&lt;/LI&gt;&lt;br /&gt;&lt;li&gt;Many of the euca2ools commands will run significantly faster than the ec2-api-tools.  The reason for slowness of the ec2-api-tools is their man java dependencies (please correct me if I'm wrong).&lt;br /&gt;&lt;li&gt;Your ~/.eucarc file contains credentials and therefore it should be protected with filesystem permissions (ie 'chmod go-r ~/.eucarc').&lt;br /&gt;&lt;/UL&gt;Hopefully this will make it easier for you to use euca2ools with EC2 on Ubuntu.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-201953022072671766?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/201953022072671766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/01/using-euca2ools-rather-than-ec2-api.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/201953022072671766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/201953022072671766'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2011/01/using-euca2ools-rather-than-ec2-api.html' title='Using euca2ools rather than ec2-api-tools with EC2'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-1439904720084010230</id><published>2010-12-14T12:07:00.000-08:00</published><updated>2010-12-14T14:06:26.259-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>Ubuntu Natty Narwhal Cluster Compute Instances</title><content type='html'>&lt;p&gt;Some time ago, Amazon &lt;a href="http://aws.amazon.com/hpc-applications/"&gt;announced&lt;/a&gt; two new instance types aimed at high performance computing.  The new types differ from Amazon's previous offerings in that&lt;/p&gt;&lt;ul&gt;&lt;li&gt;They use &lt;a href="https://secure.wikimedia.org/wikipedia/en/wiki/Xen"&gt;Xen "hvm"&lt;/a&gt; (Hardware Virtualization Mode) rather than 'paravirtualization'&lt;br /&gt;&lt;li&gt;Only priviledged accounts can create images of the 'hvm' virtualization-type.&lt;br /&gt;&lt;/ul&gt;&lt;p&gt;The result is that there are very few public images for cluster compute nodes, and up until today, there were no Ubuntu images.&lt;/p&gt;&lt;p&gt;I'm happy to announce that you can now run Official Ubuntu images on cluster compute instance types.  From today forward we will be publishing daily builds of Natty Narwhal builds.&lt;/p&gt;&lt;p&gt;These images are identical to the other Ubuntu images.  For AMI ids, you can browse the list at &lt;a href="http://uec-images.ubuntu.com/server/natty/current/"&gt;http://uec-images.ubuntu.com/server/natty/current/&lt;/a&gt;, or use more machine friendly data at &lt;a href="http://uec-images.ubuntu.com/query"&gt;http://uec-images.ubuntu.com/query&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;There is one known bug (&lt;a href="http://bugs.launchpad.net/bugs/690286"&gt;bug 690286&lt;/a&gt;) that prevents you from using ephemeral storage on the CC nodes.&lt;/p&gt;&lt;p&gt;If you've got a couple dollars burning a whole in your pocket, you can try one out with:&lt;/p&gt;&lt;code&gt;   qurl="http://uec-images.ubuntu.com/query/" &lt;BR&gt;ami_id=$(curl --silent "${qurl}/natty/server/daily.current.txt" | &lt;BR&gt;&amp;nbsp; &amp;nbsp; awk '-F\t' '$11 == "hvm" &amp;&amp; $7 == "us-east-1" { print $8 }')&lt;BR&gt;  ec2-run-instances --key mykey --instance-type cc1.4xlarge "${ami_id}" &lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-1439904720084010230?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/1439904720084010230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/12/ubuntu-natty-cluster-compute-instances.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/1439904720084010230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/1439904720084010230'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/12/ubuntu-natty-cluster-compute-instances.html' title='Ubuntu Natty Narwhal Cluster Compute Instances'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-422356914214451780</id><published>2010-12-07T07:33:00.000-08:00</published><updated>2010-12-07T07:33:21.668-08:00</updated><title type='text'>lvm resizing is easy</title><content type='html'>I have a local mirror of the ubuntu archive, using some scripts based on the &lt;a href="https://wiki.ubuntu.com/Mirrors/Scripts"&gt;Ubuntu Wiki&lt;/a&gt;.  When I set up "/archive" on my local mirror, I used lvm.  The reason for that was primarily so that I could use &lt;a href="https://help.ubuntu.com/community/SbuildLVMHowto"&gt;sbuild with lvm&lt;/a&gt;.  &lt;br /&gt;&lt;br /&gt;Since then, 2 things have happened:&lt;br /&gt;&lt;ul&gt; &lt;li&gt;sbuild has gained the ability to use aufs rather than LVM snapshots.  The solution is much lighter weight, and doesn't require some lvm space sitting around waiting to be used.&lt;/li&gt; &lt;li&gt;The ubuntu archive has grown in size from ~ 250G to ~ 400G right now.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;So, it was time for me to resize the filesystem that had my archive up to accommodate. For my own record, and possibly others, I thought I'd share what I did.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ sudo pvscan&lt;br /&gt;  PV /dev/sdb    VG smoser-vol1   lvm2 [931.51 GiB / 315.57 GiB free]&lt;br /&gt;  PV /dev/sda1   VG nelson        lvm2 [148.77 GiB / 44.00 MiB free]&lt;br /&gt;$ sudo lvscan&lt;br /&gt;  ACTIVE            '/dev/smoser-vol1/smlv0' [585.94 GiB] inherit&lt;br /&gt;  ACTIVE            '/dev/smoser-vol1/hardy_chroot-i386' [5.00 GiB] inherit&lt;br /&gt;  ACTIVE            '/dev/smoser-vol1/lucid_chroot-i386' [5.00 GiB] inherit&lt;br /&gt;  ACTIVE            '/dev/smoser-vol1/karmic_chroot-i386' [5.00 GiB] inherit&lt;br /&gt;  ACTIVE            '/dev/smoser-vol1/karmic_chroot-amd64' [5.00 GiB] inherit&lt;br /&gt;  ACTIVE            '/dev/smoser-vol1/lucid_chroot-amd64' [5.00 GiB] inherit&lt;br /&gt;  ACTIVE            '/dev/smoser-vol1/hardy_chroot-amd64' [5.00 GiB] inherit&lt;br /&gt;  ACTIVE            '/dev/nelson/root' [142.65 GiB] inherit&lt;br /&gt;  ACTIVE            '/dev/nelson/swap_1' [6.07 GiB] inherit&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I had 2 physical volumes, sdb and sda1. 'sdb' had my old sbuild snapshots on it, and also some free space.  So, I deleted sbuild snapshots with:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ sudo lvremove /dev/smoser-vol1/hardy_chroot-i386 \&lt;br /&gt;   /dev/smoser-vol1/lucid_chroot-i386 /dev/smoser-vol1/karmic_chroot-i386 \&lt;br /&gt;   /dev/smoser-vol1/karmic_chroot-amd64 /dev/smoser-vol1/lucid_chroot-amd64 \&lt;br /&gt;   /dev/smoser-vol1/hardy_chroot-amd64&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then, resized the 'smlv0' volume that had my '/archive' on it up to the largest that I could on that physical volume:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ sudo vgdisplay smoser-vol1&lt;br /&gt;  VG Name               smoser-vol1&lt;br /&gt;  System ID             &lt;br /&gt;  Format                lvm2&lt;br /&gt;&amp;lt;snip&amp;gt;&lt;br /&gt;  VG Size               931.51 GiB&lt;br /&gt;...&lt;br /&gt;$ sudo lvresize /dev/smoser-vol1/smlv0 --size 931.51G&lt;br /&gt;  Rounding up size to full physical extent 931.51 GiB&lt;br /&gt;  Extending logical volume smlv0 to 931.51 GiB&lt;br /&gt;  Logical volume smlv0 successfully resized&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then, just resize the ext4 filesystem on that volume:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ grep archive /proc/mounts&lt;br /&gt;/dev/mapper/smoser--vol1-smlv0 /archive ext4 rw,relatime,barrier=1,data=ordered 0 0&lt;br /&gt;$ sudo resize2fs /dev/mapper/smoser--vol1-smlv0&lt;br /&gt;resize2fs 1.41.11 (14-Mar-2010)&lt;br /&gt;Filesystem at /dev/mapper/smoser--vol1-smlv0 is mounted on /archive; on-line resizing required&lt;br /&gt;old desc_blocks = 37, new_desc_blocks = 59&lt;br /&gt;Performing an on-line resize of /dev/mapper/smoser--vol1-smlv0 to 244190208 (4k) blocks.&lt;br /&gt;&lt;br /&gt;The filesystem on /dev/mapper/smoser--vol1-smlv0 is now 244190208 blocks long.&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;That last operation did take probably 30 minutes, but in the end, I now have:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ df -h /archive/&lt;br /&gt;Filesystem            Size  Used Avail Use% Mounted on&lt;br /&gt;/dev/mapper/smoser--vol1-smlv0&lt;br /&gt;                      917G  544G  327G  63% /archive&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-422356914214451780?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/422356914214451780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/12/lvm-resizing-is-easy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/422356914214451780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/422356914214451780'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/12/lvm-resizing-is-easy.html' title='lvm resizing is easy'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-3750049446241448072</id><published>2010-11-03T13:47:00.000-07:00</published><updated>2011-01-20T10:20:18.364-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>Using Ubuntu Images on AWS "Free Tier"</title><content type='html'>&lt;p&gt;&lt;B&gt;[Update 2011-01-20]&lt;/B&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;B&gt;&lt;br /&gt;There are now official Ubuntu AMIs that fit into the Free Tier disk requirements.  You can get a list of the AMIs for &lt;A HREF="http://uec-images.ubuntu.com/releases/lucid"&gt;10.04&lt;/A&gt; or &lt;A HREF="http://uec-images.ubuntu.com/releases/maverick"&gt;10.10&lt;/A&gt;.&lt;br /&gt;&lt;/B&gt;&lt;br /&gt;This article is still useful as documentation, but is not necessary if you only want to use Ubuntu on Amazon's Free Tier.&lt;br /&gt;&lt;/blockquote&gt;&lt;/p&gt;Amazon AWS recently announced an &lt;a href="http://aws.amazon.com/free/"&gt;AWS Free Usage Tier&lt;/a&gt;.  The summary of which is that new AWS customers can run a t1.micro instance 24x7 for the next year and pay nothing (or at least very little).&lt;br /&gt;&lt;br /&gt;There are various restrictions on what you get for free, but the most interesting to the Ubuntu images is:&lt;br /&gt;&lt;blockquote&gt;10 GB of Amazon Elastic Block Storage, plus 1 million I/Os, 1 GB of snapshot storage, 10,000 snapshot Get Requests and 1,000 snapshot Put Requests*&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;The Official Ubuntu Images have a 15GB root filesystem.  What that means is if you're using any of our official images (&lt;a href="http://uec-images.ubuntu.com/releases/lucid"&gt;10.04&lt;/a&gt;, &lt;a href="http://uec-images.ubuntu.com/releases/maverick"&gt;10.10&lt;/a&gt;), then you will be charged for 5GB of provisioned storage per month.  In the us-east-1 region that would be $0.50/month.  In other regions, that would be $0.55/month.&lt;br /&gt;&lt;br /&gt;This issue has been &lt;a href="http://developer.amazonwebservices.com/connect/thread.jspa?messageID=201038&amp;#201038"&gt;raised&lt;/a&gt; on the &lt;a href="http://developer.amazonwebservices.com/connect/category.jspa?categoryID=3"&gt;AWS Discussion Forums&lt;/a&gt;, but it seems like Amazon is not willing to budge.&lt;br /&gt;&lt;br /&gt;Similarly, bug &lt;a href="https://bugs.launchpad.net/ubuntu-on-ec2/+bug/670161"&gt;670161&lt;/a&gt;  was opened requesting "10GB root partition for EBS boot AMIs on EC2".  If you're interested in following this discussion, subscribe yourself to that bug.  I will make sure that it is kept up to date.&lt;br /&gt;&lt;br /&gt;I don't want to comment right now on whether or not we will release future EBS root AMIs of 10.04 and and 10.10 with a 10GB filesystem instead of a 15G filesystem.  What I &lt;i&gt;do&lt;/i&gt; want to discuss is how you can create your own AMI that has a 10G (or smaller) root filesystem, which will perform otherwise identically to the official images.&lt;br /&gt;&lt;br /&gt;If you want to use Ubuntu on the Amazon Free Tier *right now*, then you can follow these instructions, which assume you have the ec2-api-tools correctly configured on your laptop.  And you have a keypair named "mykey" available in the target region.&lt;br /&gt;&lt;br /&gt;In the code (shell prompt) snippits below, '$' prompt indicates command run on my laptop.  '%' prompt indicates command run on the ec2 instance.  lines beginning with a '#' are comments.&lt;br /&gt;&lt;br /&gt;Launch an instance to work with:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# us-east-1 ami-548c783d canonical ebs/ubuntu-maverick-10.10-amd64-server-20101007.1&lt;br /&gt;$ ec2-run-instances --region us-east-1 --instance-type t1.micro \&lt;br /&gt;--key mykey ami-548c783d&lt;br /&gt;$ iid=i-1855ea75&lt;br /&gt;$ zone=$(ec2-describe-instances $iid |&lt;br /&gt;awk '-F\t' '$2 == iid { print $12 }' iid=${iid} )&lt;br /&gt;$ echo ${zone}&lt;br /&gt;us-east-1d&lt;br /&gt;$ host=$(ec2-describe-instances $iid |&lt;br /&gt;awk '-F\t' '$2 == iid { print $4 }' iid=${iid} )&lt;br /&gt;$ echo ${host}&lt;br /&gt;ec2-174-129-61-12.compute-1.amazonaws.com&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;create a volume in correct zone of the desired size to attach to the instance.  Change '10' to '5' if you wanted a 5GB root filesystem.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ ec2-create-volume --size 10 --availability-zone ${zone}&lt;br /&gt;$ vol=vol-c64d55af&lt;br /&gt;$ ec2-attach-volume --instance ${iid} --device /dev/sdh ${vol}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then, ssh to ubuntu@${host}, and download the uec reference image and extract it.  Below, I've downloaded the i386 image for maverick.  You could browse through at &lt;a href="http://uec-images.ubuntu.com/releases"&gt;http://uec-images.ubuntu.com/releases/10.10/release/&lt;/a&gt; and find an amd64 image or a 10.04 base image.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;% sudo chown ubuntu:ubuntu /mnt&lt;br /&gt;% cd /mnt&lt;br /&gt;% url=http://uec-images.ubuntu.com/releases/10.10/release/ubuntu-10.10-server-uec-i386.tar.gz&lt;br /&gt;% tarball=${url##*/}&lt;br /&gt;% wget ${url} -O ${tarball}&lt;br /&gt;% tar -Sxvzf ${tarball}&lt;br /&gt;maverick-server-uec-i386.img&lt;br /&gt;maverick-server-uec-i386-vmlinuz-virtual&lt;br /&gt;maverick-server-uec-i386-loader&lt;br /&gt;maverick-server-uec-i386-floppy&lt;br /&gt;README.files&lt;br /&gt;% img=maverick-server-uec-i386.img&lt;br /&gt;% mkdir src target&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;create target filesystem, mount the attached volume, and copy source filesystem contents to target filesystem using rsync.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;% sudo mount -o loop,ro ${img} /mnt/src&lt;br /&gt;% sudo mkfs.ext4 -L uec-rootfs /dev/sdh&lt;br /&gt;% sudo mount /dev/sdh /mnt/target&lt;br /&gt;# the rsync could take quite a while.  for me it took 22 seconds.&lt;br /&gt;% sudo rsync -aXHAS /mnt/src/ /mnt/target&lt;br /&gt;% sudo umount /mnt/target&lt;br /&gt;% sudo umount /mnt/src&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now, back on the laptop, snapshot the volume.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ ec2-create-snapshot ${vol}&lt;br /&gt;$ snap=snap-b97dfdd3&lt;br /&gt;# now you have to wait for snapshot to be 'completed'&lt;br /&gt;$ ec2-describe-snapshots ${snap}&lt;br /&gt;SNAPSHOT  snap-b97dfdd3  vol-c64d55af   completed   2010-11-03T17:31:52+0000   100%  950047163771   10&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Turn the contents of that volume into an AMI.  Note, you must set 'arch', 'rel', and 'region' correctly.  Then, we use that information to get the aki associated with the most recent released Ubuntu image.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ rel=maverick; region=us-east-1; arch=i386; # arch=amd64&lt;br /&gt;$ [ $arch = amd64 ] &amp;&amp; xarch=x86_64 || xarch=${arch}&lt;br /&gt;$ qurl=http://uec-images.ubuntu.com/query/${rel}/server/released.current.txt&lt;br /&gt;$ aki=$(curl --silent "${qurl}" |&lt;br /&gt;awk '-F\t' '$5 == "ebs" &amp;&amp; $6 == arch &amp;&amp; $7 == region { print $9 }' \&lt;br /&gt;arch=$arch region=$region )&lt;br /&gt;$ echo ${aki}&lt;br /&gt;aki-407d9529&lt;br /&gt;$ ec2-register --snapshot ${snap} \&lt;br /&gt;--architecture=${xarch} --kernel=${aki} \&lt;br /&gt;--name "my-ubuntu-${rel}" --description "my-ubuntu-${rel}"&lt;br /&gt;IMAGE ami-4483742d&lt;br /&gt;$ ami=ami-4483742d&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Clean up your instance and volume&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ ec2-detach-volume ${vol}&lt;br /&gt;$ ec2-terminate-instances ${iid}&lt;br /&gt;$ ec2-delete-volume ${vol}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And now run your instance&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ ec2-run-instances --instance-type t1.micro ${ami}&lt;br /&gt;$ ssh ubuntu@&lt;new-host-id&gt;&lt;br /&gt;% sudo apt-get update &amp;&amp; sudo apt-get dist-upgrade&lt;br /&gt;# if you got a new kernel (linux-virtual package), then you will&lt;br /&gt;# need to reboot&lt;br /&gt;% sudo reboot&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now, your newly created image has filesystem contents that are identical to those of the official Ubuntu images, but with a 10G filesystem.&lt;br /&gt;&lt;br /&gt;Once you've launched your image, you can actually clean up the snapshot and the AMI id that you launched.  To do that:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;ec2-deregister ${ami}&lt;br /&gt;ec2-delete-snapshot ${snap}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The cost of the above operations will probably be on the order of pennies, and will remove the costs you would have incurred due to having 15G root volume.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-3750049446241448072?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/3750049446241448072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/11/using-ubunt-images-on-aws-free-tier.html#comment-form' title='18 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/3750049446241448072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/3750049446241448072'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/11/using-ubunt-images-on-aws-free-tier.html' title='Using Ubuntu Images on AWS &quot;Free Tier&quot;'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>18</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-8332908788312602581</id><published>2010-11-03T11:58:00.000-07:00</published><updated>2010-11-03T13:10:39.922-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>create image with XFS root filesystem from UEC Images</title><content type='html'>A &lt;a href="http://groups.google.com/group/ec2ubuntu/t/7ceab2d515cd3c53"&gt;post&lt;/a&gt; was made to the &lt;a href="http://groups.google.com/group/ec2ubuntu"&gt;ec2ubuntu google group&lt;/a&gt; asking if Ubuntu had any plans to create images XFS root filesystems.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://uec-images.ubuntu.com/releases"&gt;Official Ubuntu Images&lt;/a&gt; for 10.04 LTS (lucid) and prior have an ext3 root filesystem.  For Ubuntu 10.10 (maverick) and the development builds of 11.04, the filesystem is ext4.  &lt;br /&gt;&lt;br /&gt;The selection of ext3 or ext4 is because ext4 is the filesystem selected by default on an Ubuntu install from CD or DVD.  This selection is carried over to our Ubuntu images for UEC or EC2.  The 10.04 images really should have been ext4, but the change didn't get in for that release.&lt;br /&gt;&lt;br /&gt;Ubuntu fully supports the XFS filesystem, it simply wasn't chosen as the default.  The -virtual kernel has filesystem support available as a module, and the xfsprogs package is in the main archive.&lt;br /&gt;&lt;br /&gt;So, just as you can get full support for the Ubuntu images using ext4, you can get full support from Ubuntu (and paid support from Canonical) by using xfs as your root filesystem.  You will simply have to create your own images.&lt;br /&gt;&lt;br /&gt;Luckily, due primarily due to the fact that the Ubuntu images are downloadable at &lt;a href="http://uec-images.ubuntu.com"&gt;http://uec-images.ubuntu.com&lt;/a&gt;, the process for creating a XFS based ebs image is trivial.&lt;br /&gt;&lt;br /&gt;In the code (shell prompt) snippits below, '$' prompt indicates command run on my laptop.  '%' prompt indicates command run on the ec2 instance.  lines beginning with a '#' are comments.&lt;br /&gt;&lt;br /&gt;Launch an instance to work with:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# us-east-1 ami-688c7801 canonical ubuntu-maverick-10.10-amd64-server-20101007.1&lt;br /&gt;$ ec2-run-instances --region us-east-1 --instance-type m1.large \&lt;br /&gt;--key mykey ami-688c7801&lt;br /&gt;$ iid=i-bcc679d1&lt;br /&gt;$ zone=$(ec2-describe-instances $iid |&lt;br /&gt;awk '-F\t' '$2 == iid { print $12 }' iid=${iid} )&lt;br /&gt;$ echo ${zone}&lt;br /&gt;us-east-1d&lt;br /&gt;$ host=$(ec2-describe-instances $iid |&lt;br /&gt;awk '-F\t' '$2 == iid { print $4 }' iid=${iid} )&lt;br /&gt;$ echo ${host}&lt;br /&gt;ec2-174-129-61-12.compute-1.amazonaws.com&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;create a volume in correct zone of the desired size to attach to the instance.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ ec2-create-volume --size 10 --availability-zone ${zone}&lt;br /&gt;$ vol=vol-c64d55af&lt;br /&gt;$ ec2-attach-volume --instance ${iid} --device /dev/sdh ${vol}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then, ssh to ubuntu@${host}, and download the uec reference image, extract, and get necessary packages:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;% sudo chown ubuntu:ubuntu /mnt&lt;br /&gt;% cd /mnt&lt;br /&gt;% url=http://uec-images.ubuntu.com/releases/10.10/release/ubuntu-10.10-server-uec-i386.tar.gz&lt;br /&gt;% tarball=${url##*/}&lt;br /&gt;% wget ${url} -O ${tarball}&lt;br /&gt;% tar -Sxvzf ${tarball}&lt;br /&gt;maverick-server-uec-i386.img&lt;br /&gt;maverick-server-uec-i386-vmlinuz-virtual&lt;br /&gt;maverick-server-uec-i386-loader&lt;br /&gt;maverick-server-uec-i386-floppy&lt;br /&gt;README.files&lt;br /&gt;% img=maverick-server-uec-i386.img&lt;br /&gt;% mkdir src target&lt;br /&gt;% sudo apt-get install xfsprogs&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;create target filesystem, mount the attached volume, and copy source filesystem contents to target filesystem using rsync.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;% sudo mount -o loop,ro ${img} /mnt/src&lt;br /&gt;% sudo mkfs.xfs -L uec-rootfs /dev/sdh&lt;br /&gt;% sudo mount /dev/sdh /mnt/target&lt;br /&gt;% sudo rsync -aXHAS /mnt/src/ /mnt/target&lt;br /&gt;% sudo umount /mnt/target&lt;br /&gt;% sudo umount /mnt/src&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Above, you could have mounted /proc and /sys into /mnt/target, chrooted into it and done a dist-upgrade.  I left that out for simplicity.&lt;br /&gt;&lt;br /&gt;Now, back on the laptop, snapshot the volume.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ ec2-create-snapshot ${vol}&lt;br /&gt;$ snap=snap-b97dfdd3&lt;br /&gt;# now you have to wait for snapshot to be 'completed'&lt;br /&gt;$ ec2-describe-snapshots ${snap}&lt;br /&gt;SNAPSHOT  snap-b97dfdd3  vol-c64d55af   completed   2010-11-03T17:31:52+0000   100%  950047163771   10&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Turn the contents of that volume into an AMI.  Note, you must set 'arch', 'rel', and 'region' correctly.  Then, we use that information to get the aki associated with the most recent released Ubuntu image.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ rel=maverick; region=us-east-1; arch=i386; # arch=amd64&lt;br /&gt;$ [ $arch = amd64 ] &amp;&amp; xarch=x86_64 || xarch=${arch}&lt;br /&gt;$ [ $arch = amd64 ] &amp;&amp; blkdev=/dev/sdb || blkdev=/dev/sda2&lt;br /&gt;$ qurl=http://uec-images.ubuntu.com/query/${rel}/server/released.current.txt&lt;br /&gt;$ aki=$(curl --silent "${qurl}" |&lt;br /&gt;awk '-F\t' '$5 == "ebs" &amp;&amp; $6 == arch &amp;&amp; $7 == region { print $9 }' \&lt;br /&gt;arch=$arch region=$region )&lt;br /&gt;$ echo ${aki}&lt;br /&gt;aki-407d9529&lt;br /&gt;$ ec2-register --snapshot ${snap} \&lt;br /&gt;--architecture=${xarch} --kernel=${aki} \&lt;br /&gt;--block-device-mapping ${blkdev}=ephemeral0 \&lt;br /&gt;--name "my-${rel}-xfs-root" --description "my-${rel}-xfs-description"&lt;br /&gt;IMAGE ami-4483742d&lt;br /&gt;$ ami=ami-4483742d&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Clean up your instance and volume&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ ec2-detach-volume ${vol}&lt;br /&gt;$ ec2-terminate-instances ${iid}&lt;br /&gt;$ ec2-delete-volume ${vol}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;And now run your instance&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ ec2-run-instances --instance-type t1.micro ${ami}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;ssh to your instance, verify that it is in fact xfs:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;% grep uec-rootfs /proc/mounts &lt;br /&gt;/dev/disk/by-label/uec-rootfs / xfs rw,relatime,attr2,nobarrier,noquota 0 0&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now, your newly created image has filesystem contents that are identical to those of the official Ubuntu images.&lt;br /&gt;&lt;br /&gt;Some notes on the above:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Many people believe that transition to btrfs as the default filesytem is inevitable, possibly even for the 12.04 LTS release.  Doing this on EC2 would require that amazon release btrfs support in a pv-grub kernel.&lt;/li&gt;&lt;li&gt;Outside of creating a 'xfs' filesystem, the steps above are very generic "create a custom EBS root image" instructions.  In fact, the process outlined above is used for the actual publishing of ebs images via the &lt;a href="http://bazaar.launchpad.net/~ubuntu-on-ec2/ubuntu-on-ec2/ec2-publishing-scripts/files"&gt;ec2-publishing-scripts&lt;/a&gt; (see &lt;a href="http://bazaar.launchpad.net/~ubuntu-on-ec2/ubuntu-on-ec2/ec2-publishing-scripts/annotate/head%3A/ec2-image2ebs"&gt;ec2-image2ebs&lt;/a&gt;)&lt;/li&gt;.&lt;li&gt;The process above will work using the maverick based images.  Lucid images are not likely to work out of the box because they do not boot with a ramdisk.  Where maverick images use pv-grub to load the kernel and ramdisk from inside the image, Lucid kernels are loaded by xen directly and Canonical did not publish ramdisks for the lucid release.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-8332908788312602581?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/8332908788312602581/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/11/create-image-with-xfs-root-filesystem.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/8332908788312602581'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/8332908788312602581'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/11/create-image-with-xfs-root-filesystem.html' title='create image with XFS root filesystem from UEC Images'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-7868378691018962328</id><published>2010-10-22T09:17:00.000-07:00</published><updated>2010-10-22T09:25:09.801-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>UDS-N Call for participation</title><content type='html'>The Ubuntu Developer Summit (UDS) is the event in which the Ubuntu community discusses and plans the upcoming Ubuntu release. UDS Natty begins Monday, October 25th (this monday) outside of Orlando, FL, USA.  If you're in the Orlando area, this event is free, and open to anyone.&lt;br /&gt;&lt;br /&gt;If you've not yet made plans to attend physically, then its unlikely that you'll be present in the rooms. However, the Canonical IS does an outstanding job of making remote participation possible. For more information, on how you can participate remotely, read the &lt;a href="https://wiki.ubuntu.com/UDS-M/RemoteParticipation"&gt;Remote Participation&lt;/a&gt; document. In short, you join an IRC channel, listen to a live high quality audio stream from the room, and can see edits to a live gobby document.&lt;br /&gt;&lt;br /&gt;The comprehensive list of all sessions is available through the &lt;a href="http://summit.ubuntu.com/uds-n/"&gt;summit schedule&lt;/a&gt;, or a filtered list of only the '&lt;a href="http://summit.ubuntu.com/uds-n/track/cloud/"&gt;Cloud track&lt;/a&gt;'.&lt;br /&gt;&lt;br /&gt;Some of the sessions that I personally am interested (ok, interested *and* leading) in are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="https://blueprints.edge.launchpad.net/ubuntu/+spec/cloud-server-n-cloud-images"&gt;cloud-server-n-cloud-images&lt;/a&gt;: Here we'll discuss how we can make the Ubuntu Images on EC2 or UEC better.  If you've used them, then we're interested in your feedback.&lt;/li&gt;&lt;li&gt;&lt;a href="https://blueprints.edge.launchpad.net/ubuntu/+spec/cloud-server-n-image-rebundle"&gt;cloud-server-n-image-rebundle&lt;/a&gt;: Here we'll discuss possible improvements in the rebundling process.  Ie, how can you take one of the Ubuntu images, and customize it and turn it into your own AMI.  This is a common operation, and unfortunately, one that has some sticking points.  If you have other ideas for "cloud utilities" this is the place to bring them up.&lt;/li&gt;&lt;li&gt;&lt;a href="https://blueprints.edge.launchpad.net/ubuntu/+spec/cloud-server-n-desktop-images"&gt;cloud-server-n-desktop-images&lt;/a&gt;: Ubuntu has made desktop images available on ec2 in a "tech preview" like manner for 2 releases.  We've not fully supported these images, but a version of the cloud images with a remote-desktop interface is a common request.  If you want to see what it might look like, try out the free &lt;a href="http://www.edubuntu.org/vmmanager"&gt;Edubuntu demo&lt;/a&gt; using NX&lt;/li&gt;&lt;li&gt;&lt;a href="https://blueprints.edge.launchpad.net/ubuntu/+spec/cloud-server-n-cloud-init"&gt;cloud-server-n-cloud-init&lt;/a&gt;: Here we'll discuss improvements to cloud-init or cloud-config.  If you've customized images via user-data, then you've used cloud-init.  How can we make it better ?&lt;/li&gt;&lt;li&gt;&lt;a href="https://blueprints.edge.launchpad.net/ubuntu/+spec/cloud-server-n-ubuntu-trial"&gt;cloud-server-n-ubuntu-trial&lt;/a&gt;: We threw together &lt;a href="http://launchpad.net/awstrial"&gt;awstrial&lt;/a&gt; fairly quickly, and with the 10.10 release, we allowed anyone interested to &lt;a href="http://10.cloud.ubuntu.com"&gt;Try Ubuntu Free&lt;/a&gt;.  We got a great response and we see lots of ways this can be used.  Come and let us know what you think&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;There are loads of other interesting sessions.  If 'Server' or 'Cloud' isn't your thing, there are other tracks that might peek your interest.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-7868378691018962328?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/7868378691018962328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/10/uds-n-call-for-participation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/7868378691018962328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/7868378691018962328'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/10/uds-n-call-for-participation.html' title='UDS-N Call for participation'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-7217432836865438203</id><published>2010-10-22T07:48:00.000-07:00</published><updated>2010-10-22T07:48:31.809-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>How to rebundle Ubuntu 10.10 (Maverick Meerkat) EBS root</title><content type='html'>There was a post on the &lt;a href="http://groups.google.com/group/ec2ubuntu"&gt;ec2ubuntu list&lt;/a&gt; regarding a problem the poster had with re-bundling a Ubuntu 10.10 instance.  The poster followed another &lt;a href="http://webkist.wordpress.com/2010/03/16/creating-an-amazon-ec2-ebs-ami-from-a-running-instance/"&gt;blog entry&lt;/a&gt;. I &lt;a href="http://groups.google.com/group/ec2ubuntu/msg/38fa7402152d7c3c"&gt;responded&lt;/a&gt; to the post, but figured that a blog entry might reach a larger audience.&lt;br /&gt;&lt;br /&gt;The simple summary of my long winded post is this:&lt;br /&gt;&lt;ul&gt;&lt;b&gt;To rebundle an EBS root image, use ec2-create-image.&lt;/b&gt;&lt;/ul&gt;&lt;br /&gt;If you've launched one of the Official Ubuntu &lt;a href="http://uec-images.ubuntu.com/releases/maverick/release/"&gt;10.10 Images&lt;/a&gt; and modified it a bit, the best way to create a new AMI with the modifications in it is to:&lt;br /&gt;&lt;br /&gt;1.) stop the instance (do not terminate it)&lt;br /&gt;2.) "create-image"&lt;br /&gt;3.) wait for your new AMI to become available and run your new instance&lt;br /&gt;&lt;br /&gt;Note, that &lt;b&gt;all of the above steps can be done from the EC2 console&lt;/b&gt; as well as by using the command line tools. I don't think I previously realised how nice this api call is.&lt;br /&gt;&lt;br /&gt;The reason that the title of this post includes 'Ubuntu 10.10' rather than just "Ubuntu", is that releases of 10.04 and earlier do not utilize pv-grub.  If you're re-bundling one of those images, you have to take &lt;a href="http://ubuntu-smoser.blogspot.com/2010/04/upgrading-ebs-instance.html"&gt;additional steps&lt;/a&gt; to get a new kernel upgrade.  You &lt;i&gt;really should&lt;/i&gt; take those steps, as kernel upgrades include important security fixes, and newly created AMIs should always be created with the most recent kernel available.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-7217432836865438203?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/7217432836865438203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/10/how-to-rebundle-ubuntu-1010-maverick.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/7217432836865438203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/7217432836865438203'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/10/how-to-rebundle-ubuntu-1010-maverick.html' title='How to rebundle Ubuntu 10.10 (Maverick Meerkat) EBS root'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-5379658928900327469</id><published>2010-10-08T13:30:00.000-07:00</published><updated>2010-10-08T13:30:57.926-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>Try out Ubuntu Server 10.10 on EC2 for FREE!</title><content type='html'>I'm mostly disappointed that it wasn't my idea.  &lt;a href="http://blog.dustinkirkland.com/"&gt;Dustin&lt;/a&gt; deserves all the credit.  The implementation (&lt;a href="http://launchpad.net/awstrial"&gt;awstrial&lt;/a&gt;) was a fairly straightforward programming exercise.  I don't mean at all to discount the work of the others who contributed to the awstrial project, and I had a &lt;i&gt;blast&lt;/i&gt; in my first django experience, but the idea was the brilliance.&lt;br /&gt;&lt;br /&gt;What idea ?  The idea to allow anyone to try out Ubuntu 10.10 on EC2 for free for 55 minutes. No hardware is needed.  While you're waiting for your desktop or server ISO to download, you can give a test drive to the server.  You'll have 170Gb disk, 2G memory, and a very high speed internet connection with local LAN access to Ubuntu mirrors. &lt;br /&gt;&lt;br /&gt;You do &lt;b&gt;not&lt;/b&gt; need an AWS account or a credit card.&lt;br /&gt;&lt;br /&gt;Here is how it works:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Sometime on Sunday, October 10, 2010 Ubuntu 10.10 (Maverick Meerkat) will be released.&lt;/li&gt;&lt;li&gt;At that point, and a limited time following, you'll be able to go to &lt;a href="http://10.cloud.ubuntu.com/"&gt;10.cloud.ubuntu.com&lt;/a&gt; and launch an instance.&lt;/li&gt;&lt;li&gt;wait 3 minutes or less&lt;/li&gt;&lt;li&gt;ssh to the instance&lt;/li&gt;&lt;li&gt;do something&lt;/li&gt;&lt;li&gt;55 minutes after launch, your instance will be terminated&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;In order to take part in this, you'll need to have a &lt;a href="http://launchpad.net/"&gt;launchpad.net&lt;/a&gt; or &lt;a href="https://login.ubuntu.com/"&gt;Ubuntu Single Singon&lt;/a&gt; account. If you don't have one, then create one.  If you're reading this, you probably have ssh keys in a file called ~/.ssh/id_rsa.pub, so go to https://launchpad.net/~YOUR_LOGIN/+editsshkeys and paste those keys in.&lt;br /&gt;&lt;br /&gt;Now, back to the 'do something' item above.  What should you do?&lt;br /&gt;&lt;br /&gt;Heres some suggestions, but I'm certain that you're more creative than I am.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Check if a bug you opened (or were annoyed by) in 10.04 LTS is still present.  If it was fixed, then make sure the bug in launchpad is marked 'Fix Released'.&lt;/li&gt;&lt;li&gt;Take Postgres 9.0for a spin, thanks to &lt;a href="http://www.piware.de/2010/09/postgresql-9-0-final-released/"&gt;Martin Pitt's PPA builds&lt;/a&gt;&lt;/li&gt;&lt;li&gt;run 'rm -Rf /' just to see what happens.&lt;/li&gt;&lt;li&gt;Find something that is broken.  Open a bug, using 'ubuntu-bug'.&lt;/li&gt;&lt;li&gt;Hack on &lt;a href="http://launchpad.net/awstrial"&gt;awstrial&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Whatever you do, I hope you enjoy taking the "Official Ubuntu Image" for a spin.  Do something cool, blog about it, tell people how easy it was.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-5379658928900327469?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/5379658928900327469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/10/try-out-ubuntu-server-1010-on-ec2-for.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/5379658928900327469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/5379658928900327469'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/10/try-out-ubuntu-server-1010-on-ec2-for.html' title='Try out Ubuntu Server 10.10 on EC2 for FREE!'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-4434404977109386119</id><published>2010-09-27T07:51:00.000-07:00</published><updated>2010-09-27T07:51:51.192-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>Using Policies in AWS Identity and Access Management</title><content type='html'>For a project I'm working on here at work, I wanted to create a AWS user that could only launch instances, but could not write to S3, query SDB&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;{&lt;br /&gt; "Statement":[ {&lt;br /&gt;    "Effect":"Allow",&lt;br /&gt;    "Action":["ec2:RunInstances","ec2:RebootInstances",&lt;br /&gt;              "ec2:GetConsoleOutput", "ec2:DescribeInstances" ],&lt;br /&gt;    "Resource":"*"&lt;br /&gt;  }, {&lt;br /&gt;    "Effect":"Allow",&lt;br /&gt;    "Action":["ec2:StopInstances","ec2:StartInstances",&lt;br /&gt;              "ec2:TerminateInstances"],&lt;br /&gt;    "Resource":"*"&lt;br /&gt;  }, {&lt;br /&gt;    "Effect":"Allow",&lt;br /&gt;    "Action":["ec2:DescribeImages"],&lt;br /&gt;    "Resource":"*"&lt;br /&gt;  }, {&lt;br /&gt;    "Effect":"Deny",&lt;br /&gt;    "NotAction":["ec2:*"],&lt;br /&gt;    "Resource":"*"&lt;br /&gt;  } ]&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I had hoped that I could allow this user to create his own security groups and keypairs (for launching instances with 'ec2-run-instances --key', and that I could also allow him to modify or delete those items as well. Unfortunately, I was not able to figure out how to do this.  What I had hoped I could do was something like was something like:&lt;br /&gt;&lt;pre&gt;{&lt;br /&gt;  "Effect":"Allow",&lt;br /&gt;  "Action":["ec2:*SecurityGroup*"],&lt;br /&gt;  "Condition" :  {&lt;br /&gt;     "StringLike": {&lt;br /&gt;        "ec2:groupName":"foouser*"&lt;br /&gt;     }&lt;br /&gt;  },&lt;br /&gt;  "Resource":"*"&lt;br /&gt;},&lt;br /&gt;{&lt;br /&gt;  "Effect":"Allow",&lt;br /&gt;  "Action":["ec2:*KeyPair*"],&lt;br /&gt;  "Condition" :  {&lt;br /&gt;     "StringLike": {&lt;br /&gt;        "ec2:keyName":"foouser*"&lt;br /&gt;     }&lt;br /&gt;  },&lt;br /&gt;  "Resource":"*"&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The 'keyName' is an atribute of the [Add,Delete,Describe]KeyPair API calls, and 'groupName' is an attribute of the [Add,Delete]SecurityGroups and AuthorizeSecurityGroupIngress API calls as described in the &lt;a HREF="http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/"&gt;EC2 API&lt;/A&gt;&lt;br /&gt;&lt;br /&gt;My goal was to limit the user ('foouser') to manipulating SecurityGroups or KeyPairs that begain with 'foouser'.  This would be a clear indication to other users of the account when they came across them.&lt;br /&gt;&lt;br /&gt;However, the 'Condition' syntax isn't as "open" as that (couldn't think of a better term for than 'open').  I can think of reasons as to why it would be difficult or undesireable to make Conditions function like I wanted, but it would have been nice.&lt;br /&gt;&lt;br /&gt;The &lt;a HREF="http://docs.amazonwebservices.com/IAM/latest/UserGuide/UsingWithEC2.html"&gt;IAM EC2 documentation&lt;/A&gt; indicates that EC2 only supports the following Condition types: aws:CurrentTime aws:EpochTime aws:SecureTransport aws:SourceIp and aws:UserAgent.&lt;br /&gt;&lt;br /&gt;It seems to me that SecurityGroups and keypairs are an essential piece of Using EC2, but it seems like these are stuck at the account level, with no ability to limit them at the user level.&lt;br /&gt;&lt;br /&gt;Another thing that I would like to do is give the user the ability to launch / stop / start / terminate her &lt;i&gt;own&lt;/i&gt; instances, but not other users of the account.  If I truly try to use IAM to split up my account usage, say with 'Development' and 'Production' users or groups, this is essential.  When I use the 'Development' user I want to be protected from an accidental reboot or terminate of a 'Production' instance.&lt;br /&gt;&lt;br /&gt;For example, I test our &lt;a HREF="http://uec-images.ubuntu.com/release"&gt;Official Ubuntu&lt;/A&gt; images.  The testing scripts launch several instances.  While they're running, I'll often be doing development, and also have an instance running.  I would like my 'development' work to not accidentally terminate (or otherwise affect) my test runs.  As it is right now, a 'euca-describe-instances' will show me all instances in either account, just waiting for me to copy and paste wrong and terminate one.&lt;br /&gt;&lt;br /&gt;It is quite possible that I've missed something, if so, please let me know.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-4434404977109386119?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/4434404977109386119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/09/using-policies-in-aws-identity-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/4434404977109386119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/4434404977109386119'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/09/using-policies-in-aws-identity-and.html' title='Using Policies in AWS Identity and Access Management'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-5611844186779297966</id><published>2010-09-22T10:54:00.000-07:00</published><updated>2010-10-12T08:04:10.320-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>Playing with AWS Access Identity Management</title><content type='html'>&lt;p&gt;Today I finally found some time to play with &lt;a href="http://aws.amazon.com/iam/"&gt;AWS Identity and Access Management&lt;/a&gt;.  If you hadn't seen the announcement, or aren't familiar, the IAM tools basically allow you to create, manage, and limit multiple AWS accounts under a single account.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;There are 2 reasons that immediately spring to mind for when you should use this:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;If you're sharing an single AWS account between multiple people, then using this is almost required.&lt;/LI&gt;&lt;li&gt;you want to use some AWS facility from inside an EC2 instance.  Here, it just seems scary to put the entire keys to your account onto a remote machine.&lt;/LI&gt; &lt;/UL&gt;To get started, I walked through the &lt;a HREF="http://docs.amazonwebservices.com/IAM/latest/GettingStartedGuide/"&gt;Getting Started&lt;/A&gt; guide.  I downloaded the &lt;a HREF=" http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=322"&gt;IAM Tools&lt;/A&gt;, and set them up as described.  On Ubuntu, that consisted of:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;code&gt;&lt;br /&gt;$ wget http://awsiammedia.s3.amazonaws.com/public/tools/cli/latest/IAMCli.zip&lt;br /&gt;$ unzip IAMCli.zip&lt;br /&gt;$ vi my-account-creds.txt&lt;br /&gt;$ cat my-account-creds.txt&lt;br /&gt;AWSAccessKeyId=ABCDEFGHIJKLMNOPQRST&lt;br /&gt;AWSSecretKey=zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponm&lt;br /&gt;$ export AWS_CREDENTIAL_FILE=my-account-creds.txt&lt;br /&gt;$ export AWS_IAM_HOME=$PWD/IAMCli&lt;br /&gt;$ export PATH=$AWS_IAM_HOME:$PATH JAVA_HOME=/usr&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Then, I created a user and admin group as described in the guide:&lt;br /&gt;&lt;/p&gt;&lt;code&gt;&lt;br /&gt;$ iam-groupcreate -g admins&lt;br /&gt;$ cat AdminGroupPolicy.txt&lt;br /&gt;&lt;pre&gt;{&lt;br /&gt;   "Statement":[{&lt;br /&gt;      "Effect":"Allow",&lt;br /&gt;      "Action":"*",&lt;br /&gt;      "Resource":"*"&lt;br /&gt;      }&lt;br /&gt;   ]&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;code&gt;&lt;br /&gt;$ iam-groupuploadpolicy -g admins -p AdminGroupPolicy -f AdminGroupPolicy.txt&lt;br /&gt;$ iam-usercreate -u smoser -g Admins -k -v&lt;br /&gt;TSRQPONMLKJIHGFEDCBA&lt;br /&gt;mnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz&lt;br /&gt;arn:aws:iam::950047163771:user/smoser&lt;br /&gt;AHDAIABBGZ3Q31XMUE4AN&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The first line of the iam-createuser output is the AWSAccessKeyId, and the second is the AWSSecretKey. I quickly added those to a file my-user-creds.txt as shown above, and set AWS_CREDENTIAL_FILE=my-user-creds.txt .&lt;br /&gt;&lt;br /&gt;That's all it took. Now I have a set of credentials that I can use, and if they're lost or stolen, I can revoke them with the (now safely locked up) account credentials.&lt;br /&gt;&lt;br /&gt;At this point, I could use the euca2ools with a config file like:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ cat my-user-eucarc&lt;br /&gt;AWSAccessKeyId=ABCDEFGHIJKLMNOPQRST&lt;br /&gt;AWSSecretKey=mnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz&lt;br /&gt;EC2_SECRET_KEY=${AWSSecretKey}&lt;br /&gt;EC2_ACCESS_KEY=${AWSAccessKeyId}&lt;br /&gt;EC2_USER_ID=950047163771&lt;br /&gt;EC2_URL=https://ec2.amazonaws.com&lt;br /&gt;S3_URL=https://s3.amazonaws.com:443&lt;br /&gt;EC2_CERT=/etc/ec2/cert-ec2.pem&lt;br /&gt;$ euca-describe-instances --config my-user-eucarc&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Additionally, the above will also suffice as an AWS_CREDENTIAL_FILE for the iam-tools.&lt;br /&gt;&lt;br /&gt;Thats great, but for one reason or another, I end up using the ec2-api-tools for a large amount of my work.  Those tools require a private key and certificate.  So, I had to go about creating one for my new user.  Thanks to Nate@AWS in an &lt;a HREF="https://developer.amazonwebservices.com/connect/message.jspa?messageID=195186"&gt;EC2 Forum Post&lt;/A&gt;, that was easy also.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ openssl version&lt;br /&gt;OpenSSL 0.9.8o 01 Jun 2010&lt;br /&gt;$ openssl genrsa 1024 &gt; pk.pem&lt;br /&gt;$ openssl req -new -x509 -nodes -sha1 -days 730 -key pk.pem -out cert.pem&lt;br /&gt;# follow prompts here&lt;br /&gt;$ iam-useraddcert -u smoser -f cert.pem&lt;br /&gt;$ export EC2_PRIVATE_KEY=$PWD/pk.pem EC2_CERT=$PWD/cert.pem&lt;br /&gt;$ ec2-describe-instances ...&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now my ec2-api-tools are functional.  I have to admit to not completely understanding the implications of self signing a certificate here and uploading it.  However, as I was authenticated to do the upload (via https and the given credentials) and only my user will use that signing key, I don't know what harm there could be.&lt;br /&gt;&lt;br /&gt;Now I have the following TODOs:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Post about creating an IAM Policy&lt;br /&gt;&lt;li&gt;package the IAM tools for Ubuntu multiverse&lt;br /&gt;&lt;/ul&gt;&lt;p&gt;Updates: &lt;ul&gt;  &lt;li&gt;2010-10-12: update case in AWS_IAM_HOME string ('IamCli' -&gt; 'IAMCli')&lt;br /&gt; &lt;/ul&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-5611844186779297966?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/5611844186779297966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/09/playing-with-aws-access-identity.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/5611844186779297966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/5611844186779297966'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/09/playing-with-aws-access-identity.html' title='Playing with AWS Access Identity Management'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-748955496810892853</id><published>2010-09-09T13:27:00.000-07:00</published><updated>2010-09-10T09:20:01.861-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>running Ubuntu on an Amazon "micro" instance</title><content type='html'>Amazon &lt;a href="http://aws.amazon.com/about-aws/whats-new/2010/09/09/announcing-micro-instances-for-amazon-ec2"&gt;announced&lt;/a&gt; today a new instance type.  The "micro" instance type (&lt;tt&gt;t1.micro&lt;/tt&gt;) has 613 MB of memory and can be used with AMIs of either x86 &lt;i&gt;or&lt;/i&gt; x86_64.  The cost for either is only $0.02 per hour.&lt;br /&gt;&lt;br /&gt;That means that you can try out Ubuntu on EC2 for 2 measly cents.  The official images of &lt;a href="http://uec-images.ubuntu.com/releases/lucid/release/"&gt;Ubuntu 10.04 LTS (Lucid Lynx)&lt;/a&gt; are perfect for this.  If you're more adventurous and want to try out 10.10, please try out a &lt;a href="http://uec-images.ubuntu.com/maverick/current/"&gt;daily build&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I think this smaller instance size really makes EC2 available to a lot more people.  The minimum price for running an instance for a month goes from something like $70 (31 * 24 * 0.095) to less than $15.  If you add to that the fact that you can shut down the instance and not be charged for unused CPU time, then start it back up when you need it, it can be &lt;i&gt;really&lt;/i&gt; cheap.  If you happen to need more CPU power, you can even shut it down, and start it back up with more resources!&lt;br /&gt;&lt;br /&gt;So what are you waiting for!&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ MY_LAUNCHPAD_ID="smoser"&lt;br /&gt;$ printf "#cloud-config\n%s\n" "ssh_import_id: [${MY_LAUNCHPAD_ID}]" &amp;gt; user-data.txt&lt;br /&gt;$ ec2-run-instances --region us-east-1 --user-data-file=user-data.txt ami-1234de7b&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;A few things to note:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="https://bugs.launchpad.net/bugs/634102"&gt;Bug 634102&lt;/a&gt; has to be worked around or you will not be able to reboot your instance.  There are cloud-init debs available in my &lt;a href="https://launchpad.net/%7Esmoser/+archive/ppa/+packages"&gt;personal PPA&lt;/a&gt; with fixes. 10.10 won't have the issue, and I'll work on getting the fix backported to 10.04.&amp;nbsp; You can easily fix that by running:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;arch=$(uname -m)&lt;br /&gt;[ "$arch" = "x86_64" ] &amp;amp;&amp;amp; ephd=/dev/sdb || ephd=/dev/sda2&lt;br /&gt;sudo sed -i.dist "\,${ephd},s,^,#," /etc/fstab&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;One interesting feature of this instance type is that it will run images that are x86 &lt;i&gt;or&lt;/i&gt; x86_64 arch.  Previously each instance type only ran a single arch.&lt;/li&gt;&lt;li&gt;Above, I launched the instance with cloud-config syntax that will pull in my keys from launchpad rather than using public ssh keys stored in EC2.  Thats why I didn't need to pass '--key &amp;lt;mykey&amp;gt;'&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;&lt;i&gt;edits&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I fixed the ami id above, I had listed a instance-store image.&amp;nbsp; Also, a thing to note is that with t1.micro instances you *have* to use EBS images. &lt;/li&gt;&lt;li&gt;I fixed the 'sed' command above, and fixed the price for m1.small (0.095, not 0.95)&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-748955496810892853?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/748955496810892853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/09/running-ubuntu-on-amazon-micro-instance.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/748955496810892853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/748955496810892853'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/09/running-ubuntu-on-amazon-micro-instance.html' title='running Ubuntu on an Amazon &quot;micro&quot; instance'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-4920799344087419496</id><published>2010-07-28T13:22:00.000-07:00</published><updated>2010-09-22T12:04:55.565-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>Verify SSH Keys on EC2 Instances</title><content type='html'>Like every server, every EC2 instance should have a unique ssh fingerprint.  On "real servers" this fingerprint is generated at first installation of the openssh-server package.  On EC2, instead, it is done on first boot of an instance.  This is because each instance is a byte for byte copy of a registered image.&lt;br /&gt;&lt;br /&gt;What this means to you, is that when you launch an instance and then connect with ssh, you'll see something like:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ ssh -F /tmp/smoser/foo ec2-67-202-47-56.compute-1.amazonaws.com&lt;br /&gt;The authenticity of host 'ec2-67-202-47-56.compute-1.amazonaws.com (67.202.47.56)' can't be established.&lt;br /&gt;RSA key fingerprint is f1:40:a7:4e:0f:28:8d:12:21:59:f1:ff:03:5f:63:54.&lt;br /&gt;Are you sure you want to continue connecting (yes/no)? &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The ssh client is informing you that you are connecting to a host that you do not have ssh keys stored for.  In short, it cannot confirm the identity of 'ec2-67-202-47-56'.   There could be a "Man in the Middle" who is attempting to trick you.  Just as with "real servers", you should identify that remote system via an out of band method.  To do this outside of EC2, you might call a hosting provider up and ask them to verify the fingerprint that you see.  On EC2, the only out of band transport is the ec2 console.&lt;br /&gt;&lt;br /&gt;In order to provide you with the fingerprint that you need, the ssh fingerprint is written to the console when it is booted.  You can see this with ec2-get-console-output.&lt;br /&gt;&lt;br /&gt;As seen with the results of Eric's poll on &lt;a href="http://alestic.com/2009/08/ec2-poll-fingerprint"&gt;alestic.com&lt;/a&gt;, this is a very little known or used piece of information.  Over 50% of alestic.com voters have "never verified the fingerprint".&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ euca-get-console-output i-72bf1518 | grep ^ec2:&lt;br /&gt;ec2: &lt;br /&gt;ec2: #############################################################&lt;br /&gt;ec2: -----BEGIN SSH HOST KEY FINGERPRINTS-----&lt;br /&gt;ec2: 2048 f1:40:a7:4e:0f:28:8d:12:21:59:f1:ff:03:5f:63:54 /etc/ssh/ssh_host_rsa_key.pub (RSA)&lt;br /&gt;ec2: 1024 28:f3:ef:a6:86:05:50:33:76:16:24:32:56:14:06:13 /etc/ssh/ssh_host_dsa_key.pub (DSA)&lt;br /&gt;ec2: -----END SSH HOST KEY FINGERPRINTS-----&lt;br /&gt;ec2: #############################################################&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Note that the ssh fingerprint reported on the console matches the one that ssh client asked me to confirm above.  So, I now know that the host I've connected to is the one that I just started.&lt;br /&gt;&lt;br /&gt;Putting this all together, lets say you have booted a new EC2 instance, with instance-id i-72bf1518 and hostname ec2-67-202-47-56.compute-1.amazonaws.com.&lt;br /&gt;&lt;br /&gt;First we will use ssh-keyscan to get the fingerprint that is being reported by the remote host, and store that in a shell variable 'fp'&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ iid=i-72bf1518&lt;br /&gt;$ ihost=ec2-67-202-47-56.compute-1.amazonaws.com&lt;br /&gt;&lt;br /&gt;$ ssh-keyscan ${ihost} 2&amp;gt;/dev/null &amp;gt; ${iid}.keys&lt;br /&gt;$ ssh-keygen -lf ${iid}.keys &amp;gt; ${iid}.fprint&lt;br /&gt;$ read length fp hostname id &amp;lt; ${iid}.fprint&lt;br /&gt;$ echo $fp&lt;br /&gt;f1:40:a7:4e:0f:28:8d:12:21:59:f1:ff:03:5f:63:54&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This fingerprint should also appear on the console output of the instance.  If it doesn't, then something is wrong.  So, we'll get the console output, and grep through it looking for the fingerprint:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ euca-get-console-output ${iid} &amp;gt; ${iid}.console&lt;br /&gt;$ grep "ec2: ${length} ${fp}" ${iid}.console&lt;br /&gt;ec2: 2048 f1:40:a7:4e:0f:28:8d:12:21:59:f1:ff:03:5f:63:54 /etc/ssh/ssh_host_rsa_key.pub (RSA)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;We've now verified that the host we're connecting to is the host we just launched, so we can connect safely.  Now you can clean out any old occurences of that host in known_hosts and tell the ssh client that this is a "known_host"&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;# remove existing entries in ~/.ssh/known_hosts for this host&lt;br /&gt;$ ssh-keygen -R "${ihost}"&lt;br /&gt;&lt;br /&gt;# hash the output of the known hosts file.  This prevents someone&lt;br /&gt;# from reading known_hosts as simple list of remote hosts you have&lt;br /&gt;# access to in the event that one of your keys was compromised.&lt;br /&gt;&lt;br /&gt;$ ssh-keygen -H -f ${iid}.keys&lt;br /&gt;&lt;br /&gt;# Add the key to your known_hosts&lt;br /&gt;$ cat ${iid}.keys &amp;gt;&amp;gt; ~/.ssh/known_hosts&lt;br /&gt;&lt;br /&gt;# remove the temporary files we created&lt;br /&gt;$ shred -u "${iid}."*&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;There, we've now verified that the remote host is the instance we started and told the ssh client about it.&lt;br /&gt;&lt;br /&gt;Unfortunately, console output on ec2 is only updated approximately every 4 minutes.  So, you can't run through this process until you have console output to check.&lt;br /&gt;&lt;br /&gt;Updates&lt;br /&gt;&lt;ul&gt;&lt;li&gt;[2010-09-22]: fix mismatched use of 'iid' and 'ihost'&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-4920799344087419496?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/4920799344087419496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/07/verify-ssh-keys-on-ec2-instances.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/4920799344087419496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/4920799344087419496'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/07/verify-ssh-keys-on-ec2-instances.html' title='Verify SSH Keys on EC2 Instances'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-2806254932733965736</id><published>2010-05-20T06:18:00.000-07:00</published><updated>2010-05-20T07:41:52.827-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>Easily test or demo Ubuntu Enterprise Cloud (UEC) in EC2 instance</title><content type='html'>Consider the following items:&lt;br /&gt;&lt;ul&gt;&lt;li&gt; recent efforts by Robert Collins, Dustin Kirkland and others have enabled running all components of UEC on a single system.&lt;/li&gt;&lt;li&gt;while performance suffers greatly, Eucalyptus can easily be made to use qemu rather than kvm for virtualization without hardware virtualization extensions&lt;/li&gt; &lt;li&gt;Ubuntu server images are quickly launchable on EC2&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Now, re-read those, but do so while thinking about wanting to provide people with an easy way to test UEC.&lt;br /&gt;&lt;br /&gt;Thats right, if you have $0.40 per hour, and an EC2 account, you can play with UEC. No real hardware required.&lt;br /&gt;&lt;br /&gt;This nested virtualization is obviously not going to provide you with the worlds fastest performing cloud, but it will provide a functional system for test or demo purposes.&lt;br /&gt;&lt;br /&gt;I've put some copy-and-paste shell code in &lt;a href="http://bazaar.launchpad.net/~smoser/+junk/uec-on-ec2/annotate/head:/commands.txt"&gt;commands.txt&lt;/a&gt; in a bzr branch &lt;a href="https://code.launchpad.net/~smoser/+junk/uec-on-ec2"&gt;uec-on-ec2&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;check out the bzr branch: lp:~smoser/+junk/uec-on-ec2&lt;br /&gt;&lt;code&gt;&lt;br /&gt;bzr branch lp:~smoser/+junk/uec-on-ec2&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;follow 'commands.txt', copy and pasting its content bit by bit in a root shell (run 'sudo -s').&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Publish and run an instance (do this as 'ubuntu' user):&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$ uec-publish-tarball fastboot-amd64-0.11.tar.gz fastboot-amd64-0.11 amd64&lt;br /&gt;# the above creates an emi, see its output&lt;br /&gt;$ ( umask 066 ; euca-add-keypair mykey &gt; mykey.pem )&lt;br /&gt;$ euca-run-instances --addressing private --key mykey emi-4D6C12BF &lt;br /&gt;# soon this will enter 'running' state and have an IP address associated with it.&lt;br /&gt;$ ssh -i mykey ubuntu@${IPADDR}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Your instance should now be functional.&lt;br /&gt;&lt;br /&gt;There are a couple things that could be cleaned up on this, patches are very welcome:&lt;br /&gt;* ideally all of the setup could be done from a '#!' user data script, I've just not worked out all the timing yet.&lt;br /&gt;* separate the node out, allowing for multiple nodes&lt;br /&gt;* fix the requirement of private addressing for functional nodes&lt;br /&gt;* fix the issue with the NC being eventually discovered 3 times (with each of its 3 IP addresses)&lt;br /&gt;&lt;br /&gt;That said, you should be able to test this and try out UEC on EC2 in a m1.large for less than $0.40 per hour.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-2806254932733965736?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/2806254932733965736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/05/easily-test-or-demo-ubuntu-enterprise.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/2806254932733965736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/2806254932733965736'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/05/easily-test-or-demo-ubuntu-enterprise.html' title='Easily test or demo Ubuntu Enterprise Cloud (UEC) in EC2 instance'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-3523983865358791731</id><published>2010-05-09T09:10:00.000-07:00</published><updated>2010-05-10T05:15:30.434-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>UDS Maverick: Call for Participation</title><content type='html'>The Ubuntu Developer Summit (UDS) is the event in which the Ubuntu community discusses and plans the upcoming Ubuntu release.  &lt;a HREF="https://wiki.canonical.com/UbuntuPlatform/UDS/Maverick"&gt;UDS Maverick&lt;/A&gt; begins Monday, May 10 (tomorrow) in Brussels.&lt;br /&gt;&lt;br /&gt;If you've not yet made plans to attend physically, then its unlikely that you'll be present in the rooms.  However, the Canonical IS does an outstanding job of making remote participation possible.  For more information, on how you can participate remotely, read the &lt;a HREF="https://wiki.ubuntu.com/UDS-M/RemoteParticipation"&gt;Remote Participation&lt;/A&gt; document.  In short, you join an IRC channel, listen to a live high quality audio stream from the room, and can see edits to a live gobby document.&lt;br /&gt;&lt;br /&gt;The comprehensive list of all sessions is available through the &lt;a HREF="http://summit.ubuntu.com/uds-m/"&gt;summit schedule&lt;/A&gt;, or a filtered list of only the &lt;a HREF="http://summit.ubuntu.com/uds-m/track/cloud_and_server/"&gt;Ubuntu Server sessions&lt;/A&gt;.&lt;br /&gt;&lt;br /&gt;Below is short, self centered, list that you might find interesting.  The Ubuntu Community would love to have your participation.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a HREF="https://blueprints.edge.launchpad.net/ubuntu/+spec/server-maverick-cloud-images-sans-cloud"&gt; Running cloud images outside UEC or EC2&lt;/A&gt; (Tuesday 11:00 UTC+1): The &lt;a HREF="http://uec-images.ubuntu.com"&gt;UEC images&lt;/A&gt; that we produce to run in EC2 or UEC are ready-to-go filesystem image of Ubuntu Server.  It seems that these images might also serve a more general purpose as a live demo of ubuntu server, or a very convenient starting point for customizing your own.  Here we'll discuss other ways these images could be used, and what would need to be done to make that possible.&lt;/li&gt;&lt;li&gt;&lt;a HREF="https://blueprints.edge.launchpad.net/ubuntu/+spec/server-maverick-cloud-init"&gt;Improvements for cloud-init&lt;/A&gt; (Tuesday, 09:00 UTC+1) : This session will cover ways in which the cloud images can be made more user friendly.  If you've ever booted one of the Ubuntu images, or re-bundled one, I'd like to know what we could do to the images to make that easier.&lt;/li&gt;&lt;li&gt;&lt;a HREF="https://blueprints.edge.launchpad.net/ubuntu/+spec/server-maverick-cloud-kernel-upgrades"&gt;Handling kernel upgrades in EC2 and UEC&lt;/A&gt; (Wednesday 11:00 UTC+1): When a user starts a UEC/EC2 instance, they specify they have the option of specifying the kernel/ramdisk to use with it or use the default associated with the instance.  Afterwards, the instance has no ability to modify that initial selection.  We'll discuss ways that we could improve the user experience by making that limitation more clear, or possibly providing ways to overcome it.&lt;/li&gt;&lt;li&gt;&lt;a HREF="https://blueprints.edge.launchpad.net/ubuntu/+spec/server-maverick-cloud-libs"&gt;Improve cloud libraries in ubunt&lt;/A&gt; (Thursday, 10:00 UTC+1): Throughout the 10.04 release, we packaged some popular libraries for interaction with AWS.  We'd like to continue that work in Maverick.  If you have suggestions on libraries you use that are not present in Ubuntu, please let us know&lt;/li&gt;&lt;li&gt;&lt;a HREF="https://blueprints.edge.launchpad.net/ubuntu/+spec/server-maverick-cloud-utils"&gt;Utilties for easier interaction with UEC or EC2&lt;/A&gt; (Tuesday, 10:00 UTC+1): If you have ideas on utilities that would make your life using Ubuntu on EC2 or UEC easier, please attend this session and let us know.&lt;/li&gt;&lt;li&gt;&lt;a HREF="https://blueprints.edge.launchpad.net/ubuntu/+spec/server-maverick-conffiles-and-puppet"&gt;server-maverick-conffiles-and-puppet&lt;/A&gt;This should be an interesting session discussing how Ubuntu can improve the management of conffiles.  Soren Hansen has sent an &lt;a HREF="https://lists.ubuntu.com/archives/ubuntu-devel/2010-May/030741.html"&gt;email&lt;/A&gt; with more information&lt;/li&gt;&lt;li&gt;&lt;a HREF="https://blueprints.edge.launchpad.net/ubuntu/+spec/server-maverick-vmbuilder-next-steps"&gt;Discussion on plans for vmbuilder&lt;/A&gt; (17:10 UTC+1): Many people have used vmbuilder to build virtual machine images.  In this session we'll discuss where vmbuilder is and where it is going.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;If you have input for any session, but are not able to attend in real time, feel free to send me input at smoser at sign ubuntu dot com, and I'll try to make sure it gets brought up.&lt;br /&gt;&lt;br /&gt;Oh, and if you're reading this on Sunday, May 9, don't forget Mother's Day.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Update 2010-05-10: Added times for sessions and used the titles rather than blueprint names so you can find them on the schedule&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-3523983865358791731?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/3523983865358791731/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/05/uds-maverick-call-for-participation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/3523983865358791731'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/3523983865358791731'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/05/uds-maverick-call-for-participation.html' title='UDS Maverick: Call for Participation'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-4888541179060937966</id><published>2010-05-05T13:00:00.000-07:00</published><updated>2010-05-05T13:00:54.257-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>Ubuntu 10.04 LTS - Lucid Lynx available in all EC2 Regions</title><content type='html'>I'm a bit late to the party.  Ubuntu 10.04 LTS (Lucid Lynx) was released almost a week ago at this point.  Multitudes of others have blogged, reviewed, used, etcetera. &lt;br /&gt;&lt;br /&gt;That said, I wanted to announce it here, and point out a few things.  To get a list of AMI ids for Ubuntu 10.04 LTS Server, look at either:&lt;br /&gt;&lt;ul&gt; &lt;li&gt;&lt;a href="http://uec-images.ubuntu.com/releases/10.04/release/"&gt;http://uec-images.ubuntu.com/releases/10.04/release/&lt;/a&gt; and &lt;a href="http://uec-images.ubuntu.com/releases/10.04/release-20100427.1"&gt;release-20100427.1&lt;/a&gt;. These pages are the official source, they are managed by the "promote" scripts.  The 'release' directory will point to the latest release version, while the link containing the serial number will be static.&lt;/li&gt; &lt;li&gt;Amazon AMI pages for 10.04 &lt;a href="http://ubuntu-ec2-lucid-i386.notlong.com"&gt;i386&lt;/a&gt; and &lt;a href="http://ubuntu-ec2-lucid-i386.notlong.com"&gt;amd64&lt;/a&gt; builds &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Now, some miscellaneous items I wanted to mention:&lt;br /&gt;&lt;ul&gt; &lt;li&gt;10.04 LTS was released on EC2 in all 4 regions (us-east-1, us-west-1, eu-west-1, and the new ap-southeast-1) at the same time as all other Ubuntu releases.  The 10.04 LTS images were available on the ap-southeast-1 region less than 24 hours after it was officially announced.&lt;br /&gt; &lt;/li&gt; &lt;li&gt;The published EC2 images do not have a ramdisk associated with them.  This is by design.  The kernel has enough smarts built in to find the root filesystem and boot the system.  The end result is that we only have to update and manage 2 pieces instead of 3, and the instances should boot faster.&lt;br /&gt; &lt;/li&gt; &lt;li&gt;In addition to 10.04 images, we also populated the ap-southeast-1 region with the latest released versions of &lt;a href="http://uec-images.ubuntu.com/releases/8.04/release/"&gt;8.04&lt;/a&gt; and &lt;a href="http://uec-images.ubuntu.com/releases/9.10/release/"&gt;9.10&lt;/a&gt; images.&lt;br /&gt; &lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-4888541179060937966?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/4888541179060937966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/05/ubuntu-1004-lts-lucid-lynx-available-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/4888541179060937966'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/4888541179060937966'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/05/ubuntu-1004-lts-lucid-lynx-available-in.html' title='Ubuntu 10.04 LTS - Lucid Lynx available in all EC2 Regions'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-6596660915712590692</id><published>2010-04-22T07:43:00.000-07:00</published><updated>2011-03-23T19:24:25.584-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>Upgrading an EBS Instance</title><content type='html'>&lt;i&gt;Update 20110323: If you are reading this article, you almost certainly should be reading my &lt;A HREF="http://ubuntu-smoser.blogspot.com/2011/02/migrating-to-pv-grub-kernels-for-kernel.html"&gt;Migrating to pv-grub kernels for kernel upgrades&lt;/A&gt;.  The process described here will still work for 10.04 images, but the process described there is ultimately much easier.  If you are using 10.10, or 11.04 images, you do not need to do anything, simply 'apt-get update &amp;&amp; apt-get dist-upgrade &amp;&amp; reboot' to get a new kernel.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;For the majority of the existence of EC2 there was no way to change the kernel that an instance was using.  With the addition of EBS instances, that changed.  I wanted to explain how you can take advantage of that EBS feature by upgrading a Ubuntu 10.04 LTS (Lucid Lynx) instance launched from a &lt;a href="http://uec-images.ubuntu.com/releases/lucid/beta-2/"&gt;Beta-2&lt;/a&gt; AMI to the &lt;a href="http://uec-images.ubuntu.com/releases/lucid/rc/"&gt;Release Candidate&lt;/a&gt;.  This same basic process should also allow you to upgrade across a release, perhaps from a &lt;a href="http://alestic.com/"&gt;9.04 Alestic&lt;/a&gt; instance to Ubuntu 10.04 LTS.&lt;br /&gt;&lt;br /&gt;In reality, if you're hoping to upgrade you're kernel and EBS instance, its because you already have one running and need to upgrade.  But for the sake of this excercise, we'll launch a new instance based on the Beta-2 image in the us-east-1 region and then connect to it.&lt;br /&gt;&lt;br /&gt;&lt;pre class="smcode"&gt;$ ec2-run-instances --key mykey ami-4be50b22&lt;br /&gt;# wait a bit&lt;br /&gt;$ ec2-describe-instances | awk '-F\t' '$1 == "INSTANCE" { print $4 }'&lt;br /&gt;ec2-184-73-101-171.compute-1.amazonaws.com&lt;br /&gt;$ ssh -i mykey.pem ubuntu@ec2-184-73-101-171.compute-1.amazonaws.com&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now, on the instance we'll go ahead and do the upgrade.  Whenever I'm working on ec2, I like to use GNU screen to protect against lost network.&lt;br /&gt;&lt;pre class="smcode"&gt;% screen -S upgrade&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This is the same basic process as upgrading any Ubuntu system.  First update and then upgrade.  Here, I've run '--dry-run' to point out that there would be kernel upgrades.&lt;br /&gt;&lt;br /&gt;Also, the ec2 images suffer from a bug where grub will be installed and prompt you for some information even though its of no value.  Because I know what those prompts will be, I'm go ahead and set them here so you're not interrupted during the dist-upgrade.&lt;br /&gt;&lt;br /&gt;&lt;pre class="smcode"&gt;% sudo apt-get update&lt;br /&gt;% sudo apt-get dist-upgrade --dry-run | grep "linux.*ec2"&lt;br /&gt;  libparted0debian1 linux-image-2.6.32-21-virtual linux-image-2.6.32-305-ec2&lt;br /&gt;  libpolkit-gobject-1-0 libpython2.6 libss2 libudev0 linux-ec2 linux-firmware&lt;br /&gt;  linux-image-ec2 linux-image-virtual linux-virtual locales module-init-tools&lt;br /&gt;Inst linux-image-2.6.32-305-ec2 (2.6.32-305.9 Ubuntu:10.04/lucid)&lt;br /&gt;Inst linux-ec2 [2.6.32.304.5] (2.6.32.305.6 Ubuntu:10.04/lucid) []&lt;br /&gt;Inst linux-image-ec2 [2.6.32.304.5] (2.6.32.305.6 Ubuntu:10.04/lucid)&lt;br /&gt;Conf linux-image-2.6.32-305-ec2 (2.6.32-305.9 Ubuntu:10.04/lucid)&lt;br /&gt;Conf linux-image-ec2 (2.6.32.305.6 Ubuntu:10.04/lucid)&lt;br /&gt;Conf linux-ec2 (2.6.32.305.6 Ubuntu:10.04/lucid)&lt;br /&gt;&lt;br /&gt;% echo grub-pc grub2/linux_cmdline string | sudo debconf-set-selections&lt;br /&gt;% echo grub-pc grub-pc/install_devices_empty boolean true | sudo debconf-set-selections&lt;br /&gt;&lt;br /&gt;% sudo apt-get dist-upgrade&lt;br /&gt;..&lt;br /&gt;94 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.&lt;br /&gt;Need to get 84.1MB of archives.&lt;br /&gt;..&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Above, If you were upgrading from a previous release to 10.04, then you would use 'do-release-upgrade' from the 'update-manager-core' package.&lt;br /&gt;&lt;br /&gt;At this point we've got 2 kernels installed, the new one and the old one.  Unsurprisingly, we're booted into the old one.&lt;br /&gt;&lt;br /&gt;&lt;pre class="smcode"&gt;% dpkg-query --show | grep "linux.*ec2"&lt;br /&gt;linux-ec2       2.6.32.305.6&lt;br /&gt;linux-image-2.6.32-304-ec2      2.6.32-304.8&lt;br /&gt;linux-image-2.6.32-305-ec2      2.6.32-305.9&lt;br /&gt;linux-image-ec2 2.6.32.305.6&lt;br /&gt;% uname -r&lt;br /&gt;2.6.32-304-ec2&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Above, we can see that the 2.6.32-305.9 version of the kernel is the newest one.  Its installed locally, but to boot it we have to find the aki of the version that is published by Ubuntu to ec2.  The Ubuntu kernels are registered in ec2 such that you can correlate the dpkg version to the registered aki.  We're going to query all the images, save that output to a file and then search for results that are owned by the Canonical user, and match our version string and arch.&lt;br /&gt;&lt;br /&gt;&lt;pre class="smcode"&gt;$ owner=099720109477; # this is the canonical user's id&lt;br /&gt;$ ver=2.6.32-305.9; arch=i386&lt;br /&gt;$ ec2-describe-images --all &gt; /tmp/images.list&lt;br /&gt;$ awk '-F\t' '$4 == o &amp;&amp; $3 ~ v &amp;&amp; $8 == a { print $2, $3 }' \&lt;br /&gt;   a=${arch} "o=${owner}" "v=${ver}" /tmp/images.list&lt;br /&gt;aki-1f02ec76 099720109477/ubuntu-kernels-milestone/ubuntu-lucid-i386-linux-image-2.6.32-305-ec2-v-2.6.32-305.9-kernel&lt;br /&gt;aki-d324caba 099720109477/ubuntu-kernels-testing/ubuntu-lucid-i386-linux-image-2.6.32-305-ec2-v-2.6.32-305.9-kernel&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;That shows us that we have 2 kernels available matching that explicit version.  One is "testing", and one is "milestone".  These are actually the same thing.  We label the kernels differently so the user easily knows what is testing and what is "released".  The released kernel version will be labeled with 'ubuntu-kernels'.  The RC kernel version gets labeled "ubuntu-kernels-milestone".&lt;br /&gt;&lt;br /&gt;In order to change the kernel, we have to stop the instance, modify the 'kernel' attribute, and then start it up again.&lt;br /&gt;&lt;pre class="smcode"&gt;$ ec2-stop-instances i-23453048&lt;br /&gt;$ ec2-modify-instance-attribute --kernel aki-1f02ec76&lt;br /&gt;kernel   i-23453048  aki-1f02ec76&lt;br /&gt;&lt;br /&gt;$ ec2-start-instances i-23453048&lt;br /&gt;# wait a bit&lt;br /&gt;$ ec2-describe-instances | awk '-F\t' '$1 == "INSTANCE" { print $4 }'&lt;br /&gt;ec2-184-73-116-205.compute-1.amazonaws.com&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;So, in theory, we should have booted into our nice and shiny-new kernel.  Lets test that theory:&lt;br /&gt;&lt;pre class="smcode"&gt;$ ssh ubuntu@ec2-184-73-116-205.compute-1.amazonaws.com 'uname -r'&lt;br /&gt;2.6.32-305-ec2&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;There you have it! This process can be applied to upgrading the RC to Release (which likely won't have a kernel change), or, eventually to upgrading your 10.04 LTS instance to a Maverick one.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-6596660915712590692?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/6596660915712590692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/04/upgrading-ebs-instance.html#comment-form' title='21 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/6596660915712590692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/6596660915712590692'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/04/upgrading-ebs-instance.html' title='Upgrading an EBS Instance'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>21</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8612900155488851021.post-5253529832199409267</id><published>2010-03-29T10:33:00.000-07:00</published><updated>2010-04-05T08:26:05.140-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cloud'/><title type='text'>Introducing cloud-init's cloud-config syntax</title><content type='html'>Since this is my first post on a brand new blog, *and* I'm fairly new to the Ubuntu community, I figure I should introduce myself.  My name is Scott Moser, I've been a member of the Ubuntu Server team for the past 9 months or so.  The majority of my time has been focused on Ubuntu's cloud efforts, both on ec2 and on the Ubuntu Enterprise Cloud (UEC).&lt;br /&gt;&lt;br /&gt;Thats enough personal introduction, now on to the content.&lt;br /&gt;&lt;br /&gt;The cloud-init package provides "first boot" functionality for the Ubuntu UEC images.  It is in charge of taking the generic filesystem image that is booting and customizing it for this particular instance.  That includes things like:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;setting the hostname&lt;/li&gt;&lt;li&gt;putting the provided ssh public keys into ~ubuntu/.ssh/authorized_keys&lt;/li&gt;&lt;li&gt;running a user provided script or otherwise modifying the image&lt;/li&gt;&lt;/ul&gt;If you have used the &lt;a href="http://uec-images.ubuntu.com/releases"&gt;Official Ubuntu Images&lt;/a&gt; for Hardy or Karmic, you may be aware that the above functionality was previously provided by &lt;a href="https://launchpad.net/ubuntu/+source/ec2-init"&gt;ec2-init&lt;/a&gt;.  The cloud-init is package is largely a "cloud agnostic" replacement for ec2-init.  The AWS specific portion of the name didn't fit with UEC at the moment, and seemed limiting for the future.  We hope to have it working on other cloud offerings as well.&lt;br /&gt;&lt;br /&gt;Setting hostname and configuring a system so the person who launched it can actually log into it are not terribly interesting.  The interesting things that can be done with cloud-init are made possible by data provided at launch time called &lt;a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1085"&gt;user-data&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;ec2-init, cloud-init, and the &lt;a href="http://alestic.com/"&gt;Alestic&lt;/a&gt; images support customization through user-data in one very simple yet effective manner.  If the user-data starts with '#!', then it will be stored and executed as root late in the boot process of the instance's first boot (similar to a traditional 'rc.local' script).  Output from the script is directed to the console.  For example:&lt;br /&gt;&lt;br /&gt;&lt;pre class="smcode"&gt;$ cat ud.txt&lt;br /&gt;#!/bin/sh&lt;br /&gt;echo ========== Hello World: $(date) ==========&lt;br /&gt;echo "I have been up for $(cut -d\  -f 1 &amp;lt; /proc/uptime) sec"&lt;br /&gt;&lt;br /&gt;$ ec2-run-instances ami-a908e7c0 --key mykey.us-east-1 \&lt;br /&gt;   --user-data-file=ud.txt&lt;br /&gt;# wait now for the system to come up and console to be available&lt;br /&gt;&lt;br /&gt;$ ec2-get-console-output i-97fc7afc | grep --after-context=1 Hello&lt;br /&gt;========== Hello World: Mon Mar 29 18:05:05 UTC 2010 ==========&lt;br /&gt;I have been up for 28.26 sec&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The simple approach shown above gives a great deal of power.  The user-data can contain a script in any language where an interpreter already exists in the image (#!/bin/sh, #!/usr/bin/python, #!/usr/bin/perl, #!/usr/bin/awk ... ).&lt;br /&gt;&lt;br /&gt;For many cases, the user may not be interested in writing a program.  For this case, cloud-init provides "cloud-config", a configuration based approach towards customization.  To utilize the cloud-config syntax, the supplied user-data must start with a '#cloud-config'.  For example:&lt;br /&gt;&lt;br /&gt;&lt;pre class="smcode"&gt;$ cat cloud-config.txt&lt;br /&gt;#cloud-config&lt;br /&gt;apt_upgrade: true&lt;br /&gt;apt_sources:&lt;br /&gt;- source: "ppa:smoser/ppa"&lt;br /&gt;&lt;br /&gt;packages:&lt;br /&gt;- build-essential&lt;br /&gt;- pastebinit&lt;br /&gt;&lt;br /&gt;runcmd:&lt;br /&gt;- echo ======= Hello World =====&lt;br /&gt;- echo "I have been up for $(cut -d\  -f 1 &amp;lt; /proc/uptime) sec"&lt;br /&gt;&lt;br /&gt;$ ec2-run-instances ami-a908e7c0 --key mykey.us-east-1 \&lt;br /&gt;   --user-data-file=cloud-config.txt&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now, when the above system is booted, it will have: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;added my personal ppa&lt;/li&gt;&lt;li&gt;run an upgrade to get all updates available&lt;/li&gt;&lt;li&gt;installed the 'build-essential' and 'pastebinit' packages&lt;/li&gt;&lt;li&gt;printed a similar message to the script above&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The 'runcmd' commands are run at the same point in boot that the '#!' script would run in the previous example.  It is present to allow you to get the full power of a scripting language if you need it without abandoning cloud-config.&lt;br /&gt;&lt;br /&gt;Note, that in this case the fairly large amount of output to the console from 'apt-get upgrade' ended up scrolling our 'Hello World' message off the ec2-console buffer, so it didn't appear there.  That is something that will need to be addressed in lucid+1.&lt;br /&gt;&lt;br /&gt;For more information on what kinds of things can be done with cloud-config, see &lt;a href="http://bazaar.launchpad.net/%7Ecloud-init-dev/cloud-init/trunk/files/head%3A/doc/examples/"&gt;doc/examples&lt;/a&gt; in the source.&lt;br /&gt;&lt;br /&gt;cloud-init supports a couple other formats of user-data which provide more customization possibilities.  I hope to write another blog entry covering those other formats soon.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8612900155488851021-5253529832199409267?l=ubuntu-smoser.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ubuntu-smoser.blogspot.com/feeds/5253529832199409267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/03/introducing-cloud-inits-cloud-config.html#comment-form' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/5253529832199409267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8612900155488851021/posts/default/5253529832199409267'/><link rel='alternate' type='text/html' href='http://ubuntu-smoser.blogspot.com/2010/03/introducing-cloud-inits-cloud-config.html' title='Introducing cloud-init&apos;s cloud-config syntax'/><author><name>Scott Moser</name><uri>http://www.blogger.com/profile/01336409131491231474</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://4.bp.blogspot.com/_vNlaFITqBfo/TNHQ6OL4JPI/AAAAAAAAAJU/xGjWzbpXpnM/S220/ssm_hackergotchi_blueEyes.png'/></author><thr:total>14</thr:total></entry></feed>
