incubator-libcloud mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grig Gheorghiu <>
Subject [libcloud] Adding create_keypair functionality to EC2 driver
Date Tue, 28 Sep 2010 02:41:38 GMT

I took a stab at adding the create_keypair functionality to the
libcloud EC2 driver. Without this, if you want to launch an EC2
instance via libcloud, you have to rely on an Amazon EC2 keypair being
created previously by some other means (otherwise the node gets
created, but there's no way to ssh into it, unless you take other
actions via user data).

I am not sure if my first cut at implementing this adheres to the
libcloud standards. Please see:

In particular, I am not very happy with returning a tuple. I am
thinking a dictionary would be better, or a JSON string. Or even a
NodeKeypair object. Suggestions are very welcome.

But assuming this method gets implemented, then one would call it to
retrieve the keypair material, save it at somekey.pem, then call
node_create and pass ex_keyname='somekey' (assuming 'somekey' is the
name passed to the method as the keyname). One would then be able to
ssh into the newly created node by using somekey.pem.


View raw message