incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <>
Subject Re: Create images from running or stopped EBS instances (EC2)
Date Sat, 05 Feb 2011 00:40:03 GMT
On Thu, 2011-02-03 at 15:17 +0100, Michal Fojtik wrote: 
> On 03/02/11 14:57 +0200, wrote:
> >Hey Michal,
> >
> >here's a copy/paste from the notes I made about snapshots back in 
> >July - might be useful to have this in one place/save some time 
> >looking at the APIs (AWS, Rackspace, Rimu, Gogrid, Terremark):
> Thanks Marios! This seems to be very usefull and save me a lot of time
> googling and reading all those docs.
> After brief look, I have few suggestions for API:
> >
> ><PAST> :
> >
> >
> >Q. Which of our currently supported clouds allows 'register custom 
> >Image from cloud storage', or, 'save/snapshot an Instance as a new 
> >Image'
> >-----------------------------------------------------------------
> >--i--> Amazon AWS allows you to register an object in S3 as an Image 
> >in EC2 [4] (Rackspace 'coming soon' [5])
> >
> >    ** The process of 'save this Instance as an Image in S3' is 
> >termed 'bundling'
> >    ** PROBLEM: different procedure for Windose vs Linux images [6].
> >	-- For Windows you use the AWS REST API 'BundleInstance' call where 
> >you specify the S3 bucket to upload to (amongst other things).
> We need to add a <os>Linux|Windows</os> field to instance XML
> and then decide which method we will choose when creating image.
> The bucket thing for Windows could be solved by feature param.

I agree that we should expose the OS in instance details; but for image
creation, I think we should only allow creating Linux images via
POST /api/images

The creation of Windows images follows a completely different model -
not only do you have to specify a S3 bucket, but AWS also exposes bundle
tasks via DescribeBundleTasks and CancelBundleTask. It seems to me that
that is best expressed by a separate top-level collection 'bundle_tasks'

> >	-- For Linux you must install the 'AMI Tools' command-line utilities 
> >[7] on the Instance you wish to bundle and then 'ec2-bundle-image'. 
> >Confusingly the actual upload is done with 'ec2-upload-bundle' which 
> >takes the S3 bucket name as a parameter.
> For EBS you just need instance_id and name and there is CreateImage call.

We also have the difficulty that there's currently no way to tell
whether an instance uses EBS or instance store for its root disk; IOW,
you can't tell from looking at an instance if 'create image' on it could
possibly succeed.

> >-iii-> Gogrid allows you to save a 'MyGSI - Gogrid Server Image' from 
> >your own, preconfigured 'sandbox server'
> As I said, we will need to add new feature for GoGrid (something like
> 'sandbox') when launching an Instance and some HTTP proper response from 
> POST /api/images when Instance is not in sandbox.

Since for both GoGrid and EC2, instances need to fulfill specific
criteria to be snapshottable, wouldn't it be better to make image
creation for them an action on the instance ? That way, we get to worry
about under which circumstances you could possibly perform the action.

What I have in mind is that we offer an instance action

          <link href="http://localhost:3001/api/instances/i-31f16e5d/create_image" method="post"
In addition, we need to
      * expose whether an image is ebs/instance store for EC2
      * allow creation of sandbox instances for GoGrid (can any image be
        sandboxed or only specific images ?)


View raw message