You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by Abhishek Tiwari <ab...@gmail.com> on 2010/10/28 16:56:44 UTC
[libcloud] MultiStepDeployment issue with Rackspace
Hi everyone,
I am trying to run following example script
from libcloud.types import Provider
from libcloud.providers import get_driver
from libcloud.deployment import MultiStepDeployment, ScriptDeployment,
> SSHKeyDeployment
import os
RACKSPACE_USER = 'username'
RACKSPACE_KEY = 'api_key'
print "Getting connection"
Driver = get_driver(Provider.RACKSPACE)
conn = Driver(RACKSPACE_USER, RACKSPACE_KEY)
print "Now connected"
# read your public key in
print "Reading ssh key"
sd = SSHKeyDeployment(open(os.path.expanduser("~/.ssh/id_rsa.pub")).read())
print "Public key succesfully loaded"
# a simple script to install puppet post boot, can be much more
> complicated.
script = ScriptDeployment("apt-get install puppet")
# a task that first installs the ssh key, and then runs the script
print "Preparing multi-step deployment"
msd = MultiStepDeployment([sd, script])
images = conn.list_images()
sizes = conn.list_sizes()
print "Images: ", images
print "Sizes : ", sizes
print "Selected size and image", sizes[0], images[1]
# deploy_node takes the same base keyword arguments as create_node.
node = conn.deploy_node(name='test', image=images[1], size=sizes[0],
> deploy=msd)
# <Node: uuid=..., name=test, state=3, public_ip=['1.1.1.1'],
> provider=Rackspace ...>
# the node is now booted, with your ssh key and puppet installed.
and getting following error,
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
> "/usr/local/lib/python2.6/dist-packages/apache_libcloud-0.3.1-py2.6.egg/libcloud/base.py",
> line 714, in deploy_node
raise DeploymentException(node, e)
libcloud.types.DeploymentException: NotImplementedError('connect not
> implemented for this ssh client',)
I tried few changes but it does not work, although node is created and
running. Also failed to install Puppet.
cheers
Abhishek Tiwari
\\|%|//
| ~ ~ |
^( @ @ )^
-------------o000o-\_/-o000o------------------
http://www.abhishek-tiwari.com/
------------------------------------------------------
Re: [libcloud] MultiStepDeployment issue with Rackspace
Posted by Abhishek Tiwari <ab...@gmail.com>.
Aha, Jerry thanks for prompt reply. I just realized the same thing after
looking on ssh.py.
Many thanks now it works
cheers
Abhishek Tiwari
\\|%|//
| ~ ~ |
^( @ @ )^
-------------o000o-\_/-o000o------------------
http://www.abhishek-tiwari.com/
------------------------------------------------------
On Fri, Oct 29, 2010 at 4:02 AM, Jerry Chen <je...@apache.org> wrote:
> Hi Abhishek,
>
> Have you installed Paramiko (http://pypi.python.org/pypi/paramiko/)? It is
> used by libcloud/ssh.py.
>
> Cheers,
> Jerry
>
> On Oct 28, 2010, at 9:56 AM, Abhishek Tiwari wrote:
>
> > and getting following error,
> >
> > Traceback (most recent call last):
> >
> > File "<stdin>", line 1, in <module>
> >
> > File
> >>
> "/usr/local/lib/python2.6/dist-packages/apache_libcloud-0.3.1-py2.6.egg/libcloud/base.py",
> >> line 714, in deploy_node
> >
> > raise DeploymentException(node, e)
> >
> > libcloud.types.DeploymentException: NotImplementedError('connect not
> >> implemented for this ssh client',)
> >
> >
> > I tried few changes but it does not work, although node is created and
> > running. Also failed to install Puppet.
> >
> > cheers
> > Abhishek Tiwari
> > \\|%|//
> > | ~ ~ |
> > ^( @ @ )^
> > -------------o000o-\_/-o000o------------------
> > http://www.abhishek-tiwari.com/
> > ------------------------------------------------------
>
>
Re: [libcloud] MultiStepDeployment issue with Rackspace
Posted by Jerry Chen <je...@apache.org>.
Hi Abhishek,
Have you installed Paramiko (http://pypi.python.org/pypi/paramiko/)? It is used by libcloud/ssh.py.
Cheers,
Jerry
On Oct 28, 2010, at 9:56 AM, Abhishek Tiwari wrote:
> and getting following error,
>
> Traceback (most recent call last):
>
> File "<stdin>", line 1, in <module>
>
> File
>> "/usr/local/lib/python2.6/dist-packages/apache_libcloud-0.3.1-py2.6.egg/libcloud/base.py",
>> line 714, in deploy_node
>
> raise DeploymentException(node, e)
>
> libcloud.types.DeploymentException: NotImplementedError('connect not
>> implemented for this ssh client',)
>
>
> I tried few changes but it does not work, although node is created and
> running. Also failed to install Puppet.
>
> cheers
> Abhishek Tiwari
> \\|%|//
> | ~ ~ |
> ^( @ @ )^
> -------------o000o-\_/-o000o------------------
> http://www.abhishek-tiwari.com/
> ------------------------------------------------------