I use amulet as testing framework for charms which we developing. I've already tried to reproduce an example, provided on https://jujucharms.com/docs/stable/tools-amulet and it's work fine. But now I'm trying to do the same basic setup for charm, which was developed and stored on hard drive ('cf-nats' charm was cloned from github). Here the list of my actions (I use local environment for deploying):
Python 3.2.3 (default, Feb 27 2014, 21:31:18)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> import amulet
>>> import requests
>>> d = amulet.Deployment(series='trusty')
>>> d.add('cf-nats', charm = '/home/ubuntu/cf-charms/charms/trusty/cf-nats')
>>> d.setup()
And I got the next output:
2014-03-10 10:56:09 Starting deployment of local
Traceback (most recent call last):
File "/usr/bin/juju-deployer", line 9, in <module>
load_entry_point('juju-deployer==0.2.5', 'console_scripts', 'juju-deployer')()
File "/usr/lib/python2.7/dist-packages/deployer/cli.py", line 118, in main
run()
File "/usr/lib/python2.7/dist-packages/deployer/cli.py", line 204, in run
importer.Importer(env, deployment, options).run()
File "/usr/lib/python2.7/dist-packages/deployer/action/importer.py", line 142, in run
self.get_charms()
File "/usr/lib/python2.7/dist-packages/deployer/action/importer.py", line 47, in get_charms
no_local_mods=self.options.no_local_mods)
File "/usr/lib/python2.7/dist-packages/deployer/deployment.py", line 112, in fetch_charms
charm.fetch()
File "/usr/lib/python2.7/dist-packages/deployer/charm.py", line 98, in fetch
self.vcs.branch()
AttributeError: 'NoneType' object has no attribute 'branch'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/amulet/deployer.py", line 175, in setup
self.juju_env], cwd=self.deployer_dir)
File "/usr/lib/python3.2/subprocess.py", line 489, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['juju-deployer', '-W', '-c', '/tmp/amulet-juju-deployer-myb41r.json', '-e', 'local', 'local']' returned non-zero exit status 1
I've also tried to deploy the same charm manualy with juju command line interface and it's work.
Here is the output from d.schema()
>>> d.schema()
{'local': {'services': {'cf-nats-sentry': {'_has_sentry': True, 'expose': True, 'branch': '/tmp/sentry-sub_16ocg4/cf-nats-sentry'}, 'cf-nats': {'_has_sentry': True, 'branch': '/home/ubuntu/cf-charms/charms/trusty/cf-nats'}, 'relation-sentry': {'expose': True, 'branch': '/tmp/sentry_5cdg4t/relation-sentry'}}, 'series': 'trusty', 'relations': [['cf-nats:juju-info', 'cf-nats-sentry:juju-info']]}}
What is wrong in my code? How can I deploy my local charm with amulet framework? What kind of python packages should be installed?
Thank you in advance.