On Wed, 2010-01-20 at 14:46 +0300, Roman wrote:
I beleive there is a consensus over the fact that the data injection
feature is a must (or at least very useful) for deltacloud. Please
correct me if I'm wrong.
I completely agree - I see data injection as a very important feature.
2010/1/20 David Lutterkort <lutter(a)redhat.com>:
>From an API POV, we should support both, and let people discover what
>mechanism the backend cloud supports. Anything else, for example,
>simulating EC2's user-data mechanism on rackspace by injecting a fixed
>file will lead to a lowest-common denominator API.
Deltacloud is a provider-independent API. if somebody chooses it, he
will expect it to be closer to a lowest-common denominator API. Not
all features of underlying providers will be supported. In exchange
there is no need to make multiple cloud management implementations.
For data injection, that lcd today is no data injection - as long as
there are clouds that do not support it, we can't offer it in
deltacloud. If somebody starts an instance on GoGrid and passes
user-data, we have to return an error, since GoGrid doesn't support
that.
The discovery mechanism I suggested still lets you use deltacloud as a
lcd API: simply ignore advertisements of optional features.
If deltacloud API comes with optional extension features, which are
not supported across all providers, such features should be clearly
marked in API and documentation as an extension so that developers can
avoid using them if they want to stay provider-independent.
That's exactly the intent behind discovery. In addition, you should
never have to make decisions based on the name of the provider - you
should always be able to make them based on metadata you get from the
concrete driver. IOW, if you want to know if you can inject user data,
don't check whether you're talking to EC2, check for well-known metadata
in the API description.
I think that the data injection feature discussed in this thread is
a
basic one thus it should not be implemented as a kind of discoverable
extension (if possible). In worst case, make the data injection
feature an extension, but do not offer different ways of injecting
data in deltacloud API.
But no matter what we do, it _will_ be different, since the two clouds
that offer it use different mechanisms. The choices we have are
1. stick with the lcd and do nothing
2. advertise only a user-data feature, and inject that as a file on
rack
3. advertise EC2's user-data and Rack's file injection differently
Clearly, I prefer (3) since it does not hinder people who only use Rack
(or any cloud that will add file injection in the future)
---------------------------------------------
2010/1/15 David Lutterkort <lutter(a)redhat.com>:
> I think longer term, we'd also want some sort of cloud-compat package
> that people can install inside their instances so that you can get user
> data through the exact same mechanism, regardless of cloud.
I think this would be a good way to go.
Wonder if there any other way for deltacloud API to stay cloud
provider-independent?
Just to be clear: I don't want to make using dcloud API dependent on any
special sauce installed in the image. Rather, such a compat package
should make creating cloud-independent images easier.
I'd be open to having an API variant that is geared towards images with
a dcloud-compat installed, but that can't be the primary API.
In API, can we agree that the additional instance model field (named
client_data in my patch) should contain an array of File objects? Each
file can have name and content properties. Let's put no any hard
limits on the number of files. Let's put limits on a total file size.
What do you do when somebody tries to inject files into a GoGrid
instance ? Or an EC2 instance ? What when they try to inject 7 files
into a Rack instance ? Silent failure is not an option ;)
I think that it would be better for implementation to pass a single
file to the instance and let the cloud-compat package to expand it on
first instance startup into multiple files specified in deltacloud
create instance API call.
Would this way be sufficiently good to go?
No, since it would remove a feature that people are already using. It's
only an option for images where we know that dcloud-compat has been
installed.
E.g., something along EC2-style. In certain conditions it is
possible
to set up a service for distributing injected data to the instances.
Upon instance boot the deltacloud-compat will contact the service over
the internet and the service will retrieve the injected data from
deltacloud based on instance IP address and push it to the instance.
Downsides are security issues and the need to set up a corresponding
network infrastructure.
Hmm .. that sounds very involved to me - I am pretty confident that
sooner or later all clouds will offer some sort of data injection. If
people already have code for something like this, it would be nice to
include it in some generally available project.
David