Charm compose

Merlijn Sebrechts merlijn.sebrechts at gmail.com
Wed Oct 7 07:38:27 UTC 2015


Hi all!


Since I have a few Charms that will install Juju, I'd like to put the
"install Juju" part in a layer, and use Charm compose to avoid duplication
of code.

I have encountered a few problems trying to use Charm compose. This is my
directory structure:

JUJU_REPOSITORY
    |-----trusty
    |-----layers

├── juju
│   ├── composer.yaml
│   ├── config.yaml
│   ├── metadata.yaml
│   ├── reactive
│   │   └── juju.py
│   ├── README.md
│   └── templates
│       ├── environments.yaml
│       └── juju.sh
└── tengu
    ├── composer.yaml
    ├── reactive
    │   └── tengu.py
    └── templates

tengu composer.yaml: includes: ['layer:juju']
juju composer.yaml: includes: ['layer:basic']

When I run "charm compose tengu" I get the following error:


Traceback (most recent call last):
  File "/usr/bin/charm-compose", line 9, in <module>
    load_entry_point('charm-tools==1.7.1', 'console_scripts',
'charm-compose')()
  File "/usr/lib/python2.7/dist-packages/charmtools/compose/__init__.py",
line 468, in main
    composer()
  File "/usr/lib/python2.7/dist-packages/charmtools/compose/__init__.py",
line 393, in __call__
    self.generate()
  File "/usr/lib/python2.7/dist-packages/charmtools/compose/__init__.py",
line 357, in generate
    layers = self.fetch()
  File "/usr/lib/python2.7/dist-packages/charmtools/compose/__init__.py",
line 193, in fetch
    return self.fetch_deps(layer)
  File "/usr/lib/python2.7/dist-packages/charmtools/compose/__init__.py",
line 197, in fetch_deps
    self.fetch_dep(layer, results)
  File "/usr/lib/python2.7/dist-packages/charmtools/compose/__init__.py",
line 234, in fetch_dep
    base_layer = Layer(base, self.deps).fetch()
  File "/usr/lib/python2.7/dist-packages/charmtools/compose/__init__.py",
line 81, in fetch
    self.directory = path(fetcher.fetch(self.target_repo))
  File "/usr/lib/python2.7/dist-packages/charmtools/compose/fetchers.py",
line 85, in fetch
    path(res).rename(target)
  File "/usr/lib/python2.7/dist-packages/path.py", line 1148, in rename
    os.rename(self, new)
OSError: [Errno 2] No such file or directory


What could be going wrong here?




Kind regards
Merlijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20151007/4dd440a9/attachment.html>


More information about the Juju mailing list