I'm using the python-django charm to deploy a small django-based site, with the local provider for test purposes. So far the deployment itself has worked, but I'd like to be able to manage the site without having to juju ssh into it.

So I'm trying to use fabric as described on the python-django charm documentation, but whenever I try to execute a task with fab, I'm being asked for "Login password for 'ubuntu': ". That is, it seems that SSH authentication does not work. Here's what it looks like:

# Get fabfile.py from the charm code
bzr branch lp:charms/python-django 
cd python-django
fab -R ubucon-site/7 pull
[10.0.3.252] Executing task 'pull'
[10.0.3.252] sudo: find . -name '*.pyc' -delete
[10.0.3.252] Login password for 'ubuntu': 

As an additional note, there seems to be a Juju fabric plugin around, which is based on the same code as the one in the python-django charm, so the fabfile.py file might actually be generic and not specific to the python-django charm.

Any ideas on how to be able to use fabric with juju? Or any pointers on what I might be doing wrong?

share|improve this question
up vote 2 down vote accepted

It looks like Fabric is using standard ssh instead of juju ssh (which uses the Juju ssh key). The easiest way to get the auth to work is to import your ssh key from Launchpad into your Juju deployment:

juju authorized-keys import $launchpad_user
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.