You’re a developer – or you want to be – writing software that uses cloud computing. Why should you care about the CloudConnect Conference? Here are the top ten reasons why it’s worth your while. Full disclosure: Nothing to disclose. I have no commercial connection to CloudConnect or its producers.

CloudConnect 2010

#10: Snacks

Enjoy short, sweet, thought-provoking keynotes about applications, metrics, SaaS, and more. I happen to know of three keynote presenters who will be particularly interesting: William Louth, William Vambenepe, and Guy Rosen. Come hear them challenge the way you think about cloud applications, environments, and infrastructure.

#9: Get Into It

You can attend crash courses on building cloud applications using popular cloud platforms, including Amazon Web Services, Google App Engine, Force.com, and more. I’ll be assisting Jinesh Varia, AWS Technology Evangelist, to deliver the Develop Your First Amazon Web Services Application workshop. If you want to develop for the cloud but don’t know where or how to start, the Developer Workshops are the place.

#8: Big Data

You can discover techniques for dealing with big data. When you have problems with big data. you have big data problems: how to store it, how to process it, and how to get the analytics you need from it. Brad Cross, co-founder and head of research at everyone’s favorite frustration-saving service for travelers FlightCaster, is leading the Dealing with Big Data track, which will address these challenges.

#7: Enterprise

You can hear how to develop a strategy for migrating enterprise applications into the cloud. Randy Bias, founder of Cloudscaling, will help you make sense of what to move into the cloud, what to leave behind, and how to do it in a way that makes sense for your organization and budget. If you’re interested in the enterprise perspective on cloud computing adoption, the Migration Strategies track is for you.

#6: Standards

You can get up to speed on the many standardization efforts underway in the cloud ecosystem. Bob Marcus, who has been working to ensure all these efforts act in concert, is leading the Standards, Government, and Industry track. This is where you can hear about the current status and future plans of the standards, and you can let the representatives of various efforts know what’s important to you. Be heard, make a difference.

#5: APIs

You can learn about the myriad of cloud APIs out there: How can you write code that works on all these APIs? Why are there so many different ones? What were the API designers thinking when they architected them? What directions are planned for the future of these APIs? Come hear architects, implementers, and power users of the AWS, Rackspace, GoGrid, and other cloud APIs. Ask the architects tough questions. Hear how users overcome some of the issues. Let them all know what you think in the Writing Code for Many Clouds session.

#4: Design Patterns

You can learn how to think about cloud application architecture. The author of the seminal whitepaper Architecting for the Cloud: Best Practices (the same Jinesh Varia who’s giving the AWS workshop) will present Design Patterns for Cloud Computing Applications. If you want to learn the major architectural patterns that software designers use for cloud applications, this is the session for you.

#3: Deployment

You can hear all about some of the leading platform providers’ solutions (RightScale, EngineYard, GigaSpaces) and how they can help you deploy your applications in the cloud more easily. Plus, hear what actual customers of these platforms are doing, and what they wish these platforms could do. If you ever wondered how you’d get your application to live a healthy life in the cloud, the Deploying to the Cloud: The Care and Feeding of a Cloud Application session is the place to be.

#2: Orchestration

You can discover what many other cloud developers are realizing: that you need to know about orchestration. It’s the practice (art?) of keeping a composed set of machines and services working together dynamically to achieve certain goals (an SLA, perhaps). Hear the history of orchestration, learn the different layers into which orchestration must be integrated, and see examples of how you can do this in your applications – presented by the leading practitioners in the field. All this, plus ask your own questions at the Orchestration: The Next Frontier for Cloud Applications session.

#1: Me

You can meet me. I’m leading the Developing for the Cloud track, which includes the four sessions mentioned above. I’ll be happy to autograph your AWS Multifactor Authentication fob or your Secret Access Key.

An additional reason, for those of you who have read this far: You now have a discount code CNJRCC05 good for a free Expo pass or 40% off the conference sessions. Enjoy, and come introduce yourself.

{ 1 comment }

Eric Hammond has taught us how to create consistent snapshots of EBS volumes. Amazon has allowed us to use EBS snapshots as AMIs, providing a persistent root filesystem. Wouldn’t it be great if you could use both of these techniques together, to take a consistent snapshot of the root filesystem without stopping the instance? Read on for my instructions how to create an XFS-formatted boot-from-EBS AMI, allowing consistent live snapshots of the root filesystem to be created.

The technique presented below owes its success to the Canonical Ubuntu team, who created a kernel image that already contains XFS support. That’s why these instructions use the official Canonical Ubuntu 9.10 Karmic Koala AMI – because it has XFS support built in. There may be other AKIs out there with XFS support built in – if so, the technique should work with them, too.

How to Do It

The general steps are as follows:

  1. Run an instance and set it up the way you like.
  2. Create an XFS-formatted EBS volume.
  3. Copy the contents of the instance’s root filesystem to the EBS volume.
  4. Unmount the EBS volume, snapshot it, and register it as an AMI.
  5. Launch an instance of the new AMI.

More details on each of these steps follows.

1. Run an instance and set it up the way you like.

As mentioned above, I use the official Canonical Ubuntu 9.10 Karmic Koala AMI (currently ami-1515f67c for 32-bit architecture – see the table on Alestic.com for the most current Ubuntu AMI IDs).

ami=ami-1515f67c
security_groups=default
keypair=my-keypair
instance_type=m1.small
ec2-run-instances $ami -t $instance_type -g $security_groups -k $keypair

Wait until the ec2-describe-instances command shows the instance is running and then ssh into it:

ssh -i my-keypair ubuntu@ec2-1-2-3-4.amazonaws.com

Now that you’re in, set up the instance’s root filesystem the way you want. Don’t forget that you probably want to run

sudo apt-get update

to allow you to pull in the latest packages.

In our case we’ll want to install ec2-consistent-snapshot, as per Eric Hammond’s article:

codename=$(lsb_release -cs)
echo "deb http://ppa.launchpad.net/alestic/ppa/ubuntu $codename main" | sudo tee /etc/apt/sources.list.d/alestic-ppa.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BE09C571
sudo apt-get updatesudo apt-get install -y ec2-consistent-snapshot
sudo PERL_MM_USE_DEFAULT=1 cpan Net::Amazon::EC2

2. Create an XFS-formatted EBS volume.

First, install the XFS tools:

sudo apt-get install -y xfsprogs

These utilities allow you to format filesystems using XFS and to freeze and unfreeze the XFS filesystem. They are not necessary in order to read from XFS filesystems, but we want these programs installed on the AMI we create because they are used in the process of creating a consistent snapshot.

Next, create an EBS volume in the availability zone your instance is running in. I use a 10GB volume, but you can use any size and grow it later using this technique. This command is run on your local machine:

ec2-create-volume --size 10 -z $zone

Wait until the ec2-describe-volumes command shows the volume is available and then attach it to the instance:

ec2-attach-volume $volume --instance $instance --device /dev/sdh

Back on the instance, format the volume with XFS:

sudo mkfs.xfs /dev/sdh
sudo mkdir -m 000 /vol
sudo mount -t xfs /dev/sdh /vol

Now you should have an XFS-formatted EBS volume, ready for you to copy the contents of the instance’s root filesystem.

3. Copy the contents of the instance’s root filesystem to the EBS volume.

Here’s the command to copy over the entire root filesystem, preserving soft-links, onto the mounted EBS volume – but ignoring the volume itself:

sudo rsync -avx --exclude /vol / /vol

My command reports that it copied about 444 MB to the EBS volume.

4. Unmount the EBS volume, snapshot it, and register it as an AMI.

You’re ready to create the AMI. On the instance do this:

sudo umount /vol

Now, back on your local machine, create the snapshot:

ec2-create-snapshot $volume

Once ec2-describe-snapshots shows the snapshot is 100% complete, you can register it as an AMI. The AKI and ARI values used here should match the AKI and ARI that the instance is running – in this case, they are the default Canonical AKI and ARI for this AMI. Note that I give a descriptive “name” and “description” for the new AMI – this will make your life easier as the number of AMIs you create grows.

kernel=aki-5f15f636
ramdisk=ari-0915f660
description="Ubuntu 9.10 Karmic formatted with XFS"
ami_name=ubuntu-9.10-32-bit-ami-1515f67c-xfs
ec2-register --snapshot $snapshot --kernel $kernel --ramdisk $ramdisk '--description=$description' --name=$ami_name --architecture i386 --root-device-name /dev/sda1

This displays the newly registered AMI ID – let’s say it’s ami-00000000.

5. Launch an instance of the new AMI.

Here comes the moment of truth. Launch an instance of the newly registered AMI:

ami=ami-00000000
security_groups=default
keypair=my-keypair
instance_type=m1.small
ec2-run-instances $ami -t $instance_type -g $security_groups -k $keypair

Again, wait until ec2-describe-instances shows it is running and ssh into it:

ssh -i my-keypair ubuntu@ec2-5-6-7-8.amazonaws.com

Now, on the instance, you should be able to see that the root filesystem is XFS with the mount command. The output should contain:

/dev/sda1 on / type xfs (rw)
...

We did it! Let’s create a consistent snapshot of the root filesystem. Look back into the output of ec2-describe-instances to determine the volume ID of the root volume for the instance.

sudo ec2-consistent-snapshot --aws-access-key-id $aws_access_key_id --aws-secret-access-key $aws_secret_access_key --xfs-filesystem / $volumeID

The command should display the snapshot ID of the snapshot that was created.

Using ec2-consistent-snapshot and an XFS-formatted EBS AMI, you can create snapshots of the running instance without stopping it. Please comment below if you find this helpful, or with any other feedback.

{ 7 comments }

Use ELB to Serve Multiple SSL Domains on One EC2 Instance

December 24, 2009

This is one of the coolest uses of Amazon’s ELB I’ve seen yet. Check out James Elwood’s article.
You may know that you can’t serve more than one SSL-enabled domain on a single EC2 instance. Okay, you can but only via a wildcard certificate (limited) or a multi-domain certificate (hard to maintain). So you really can’t [...]

1 comment Read the full article →

Read-After-Write Consistency in Amazon S3

December 10, 2009

S3 has an “eventual consistency” model, which presents certain limitations on how S3 can be used. Today, Amazon released an improvement called “read-after-write-consistency” in the EU and US-west regions (it’s there, hidden at the bottom of the blog post). Here’s an explanation of what this is, and why it’s cool.
What is Eventual Consistency?
Consistency is a [...]

1 comment Read the full article →

The Open Cloud Computing Interface at IGT2009

December 4, 2009

Today I participated in the Cloud Standards & Interoperability panel at the IGT2009 conference, together with Shahar Evron of Zend Technologies, and moderated by Reuven Cohen. Reuven gave an overview of his involvement with various governments on the efforts to define and standardize “cloud”, and Shahar presented an overview of the Zend Simple Cloud API [...]

0 comments Read the full article →

How to Work with Contractors on AWS EC2 Projects

November 17, 2009

Recently I answered a question on the EC2 forums about how to give third parties access to EC2 instances. I noticed there’s not a lot of info out there about how to work with contractors, consultants, or even internal groups to whom you want to grant access to your AWS account. Here’s how.

First, a Caveat
Please [...]

2 comments Read the full article →

What Language Does the Cloud Speak, Now and In the Future?

October 27, 2009

You’re a developer writing applications that use the cloud. Your code manipulates cloud resources, creating and destroying VMs, defining storage and networking, and gluing these resources together to create the infrastructure upon which your application runs. You use an API to perform these cloud operations – and this API is specific to the programming language [...]

6 comments Read the full article →

Avoiding EC2 InsufficientInstanceCapacity: Insufficient Capacity Errors

October 17, 2009

Here’s a quick tip from this thread on the AWS EC2 Developer Forums.
If you experience the InsufficientInstanceCapacity: Insufficient Capacity error, you’ll be glad to know there are some strategies for working around it. Justin@AWS offers this advice:
There can be short periods of time when we are unable to accommodate instance requests that are targeted to [...]

0 comments Read the full article →

Alternatives to Elastic IPs for EC2 Name Resolution

September 27, 2009

How can you handle DNS lookups in EC2 without going crazy each time a resource’s IP address changes? One solution is to use an Elastic IP, a stable IP address that can be remapped to different instances, but Elastic IPs are not appropriate for all situations. This article explores the various methods of managing name [...]

0 comments Read the full article →

Cool Things You Can Do with Shared EBS Snapshots

September 24, 2009

I’ve been awaiting this feature for a long time: Shared EBS Snapshots. Here’s a brief intro to using the feature, and some cool things you can do with shared snapshots. I also offer predictions about things that will appear as this feature gains adoption among developers.
How to Share an EBS Snapshot
Really, it’s easy. The first [...]

7 comments Read the full article →