incubator-libcloud mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Querna <p...@querna.org>
Subject Re: [libcloud] need feedback on deployment API in trunk!
Date Tue, 02 Mar 2010 17:52:09 GMT
On Tue, Mar 2, 2010 at 7:09 AM, Jed Smith <jed@jedsmith.org> wrote:
> On Feb 28, 2010, at 8:15 PM, Paul Querna wrote:
>
>> from libcloud.providers import get_driver
>> from libcloud.deployment import MultiStepDeployment, ScriptDeployment,
>> SSHKeyDeployment
>
>> key = open(os.path.expanduser("~/.ssh/my_rsa.pub")).read()
>
>> sd = SSHKeyDeployment(key)
>> script = ScriptDeployment("apt-get install -y puppet")
>> msd = MultiStepDeployment([sd, script])
>
> This might be interesting for Linode, and not require SSH at all.  We just
> rolled out Stackscripts, which are shebang'd scripts that are written to the
> filesystem before first boot and run once booted.
>
> SSHKeyDeployment, in this scenario, is supported in the create API via the same
> philosophy (and will write /root/.ssh/authorized_keys2 for you).
> ScriptDeployment I could see being tied to Stackscripts.
>
> I haven't looked at the code at all, but this would be the deployment path for
> what you've described in our API:
>
>   linode.create
>
>   stackscript.create
>      script = "#!/bin/bash \r\n apt-get update \r\n apt-get install -y puppet"
>
>   linode.disk.createfromstackscript
>      # Might not support an SSH key yet, I need to check on that.
>      # linode.disk.createfromdistribution does.
>
> At this point, the Linode is armed with the script, but is not booted.  The
> StackScript is also reusable.
>
> Does this make sense, though, given the implementation?  It sounds like the
> implementation as it stands is tied to SSH being required, and it isn't for us.
> Is it up to the driver?  (Again, haven't looked -- just sat down for the day.)

Right now all the code is in the base class' deploy_node function, but
it can be overridden in the child class drivers, like Linode, if they
provided a better way to get started.

Mime
View raw message