libcloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jed Smith <...@jedsmith.org>
Subject Re: [libcloud] need feedback on deployment API in trunk!
Date Tue, 02 Mar 2010 15:09:36 GMT
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.)

JS


Mime
View raw message