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/
------------------------------------------------------