Charm compose
Merlijn Sebrechts
merlijn.sebrechts at gmail.com
Wed Oct 7 08:41:33 UTC 2015
Looking through the source code of composer, it seems that if you specify
"layer:xyz", it tries to download that layer. Changing tengu composer.yaml
to "includes: ['juju']" fixes this issue. Now I get a new 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 473, in main*
* composer()*
* File "/usr/lib/python2.7/dist-packages/charmtools/compose/__init__.py",
line 398, in __call__*
* self.generate()*
* File "/usr/lib/python2.7/dist-packages/charmtools/compose/__init__.py",
line 364, in generate*
* self.exec_plan(self.plan, self.layers)*
* File "/usr/lib/python2.7/dist-packages/charmtools/compose/__init__.py",
line 342, in exec_plan*
* tactic()*
* File "/usr/lib/python2.7/dist-packages/charmtools/compose/tactics.py",
line 410, in __call__*
* spec)).throw_on_error()()*
* File "/usr/lib/python2.7/dist-packages/charmtools/utils.py", line 192,
in __call__*
* result.throw_on_error()*
* File "/usr/lib/python2.7/dist-packages/charmtools/utils.py", line 149,
in throw_on_error*
* self.exit_code, self.command, output=self.output)*
*subprocess.CalledProcessError: Command '('pip', 'install', '-t',
Path(u'/tmp/tmpUUEfVc'), u'charms.reactive>=0.1.0,<2.0.0')' returned
non-zero exit status 1*
Running this command manually shows a more informative error:
*merlijn at travers:~/test/piptest$ pip install -t `pwd` "charms.reactive"*
*Downloading/unpacking charms.reactive*
* Downloading charms.reactive-0.3.4.tar.gz*
* Running setup.py (path:/tmp/pip-build-BZsLa7/charms.reactive/setup.py)
egg_info for package charms.reactive*
*Downloading/unpacking six (from charms.reactive)*
* Downloading six-1.10.0-py2.py3-none-any.whl*
*Downloading/unpacking pyaml (from charms.reactive)*
* Downloading pyaml-15.8.2.tar.gz*
* Running setup.py (path:/tmp/pip-build-BZsLa7/pyaml/setup.py) egg_info
for package pyaml*
*Downloading/unpacking charmhelpers>=0.5.0 (from charms.reactive)*
* Downloading charmhelpers-0.5.0.tar.gz (121kB): 121kB downloaded*
* Running setup.py (path:/tmp/pip-build-BZsLa7/charmhelpers/setup.py)
egg_info for package charmhelpers*
*Downloading/unpacking PyYAML (from pyaml->charms.reactive)*
* Downloading PyYAML-3.11.tar.gz (248kB): 248kB downloaded*
* Running setup.py (path:/tmp/pip-build-BZsLa7/PyYAML/setup.py) egg_info
for package PyYAML*
*Downloading/unpacking netaddr (from charmhelpers>=0.5.0->charms.reactive)*
* Downloading netaddr-0.7.18-py2.py3-none-any.whl (1.5MB): 1.5MB
downloaded*
*Downloading/unpacking Tempita (from charmhelpers>=0.5.0->charms.reactive)*
* Downloading Tempita-0.5.2.tar.gz*
* Running setup.py (path:/tmp/pip-build-BZsLa7/Tempita/setup.py) egg_info
for package Tempita*
*Downloading/unpacking Jinja2 (from charmhelpers>=0.5.0->charms.reactive)*
* Downloading Jinja2-2.8-py2.py3-none-any.whl (263kB): 263kB downloaded*
*Downloading/unpacking MarkupSafe (from
Jinja2->charmhelpers>=0.5.0->charms.reactive)*
* Downloading MarkupSafe-0.23.tar.gz*
* Running setup.py (path:/tmp/pip-build-BZsLa7/MarkupSafe/setup.py)
egg_info for package MarkupSafe*
*Installing collected packages: charms.reactive, six, pyaml, charmhelpers,
PyYAML, netaddr, Tempita, Jinja2, MarkupSafe*
* Running setup.py install for charms.reactive*
* error: can't combine user with prefix, exec_prefix/home, or
install_(plat)base*
* Complete output from command /usr/bin/python -c "import setuptools,
tokenize;__file__='/tmp/pip-build-BZsLa7/charms.reactive/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-r65pbi-record/install-record.txt
--single-version-externally-managed --compile --user --home=/tmp/tmpl0SSvH:*
* running install*
*error: can't combine user with prefix, exec_prefix/home, or
install_(plat)base*
*----------------------------------------*
*Cleaning up...*
*Command /usr/bin/python -c "import setuptools,
tokenize;__file__='/tmp/pip-build-BZsLa7/charms.reactive/setup.py';exec(compile(getattr(tokenize,
'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-r65pbi-record/install-record.txt
--single-version-externally-managed --compile --user --home=/tmp/tmpl0SSvH
failed with error code 1 in /tmp/pip-build-BZsLa7/charms.reactive*
*Storing debug log for failure in /home/merlijn/.pip/pip.log*
I'm stuck. Any idea how to continue?
2015-10-07 9:38 GMT+02:00 Merlijn Sebrechts <merlijn.sebrechts at gmail.com>:
> 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/b4514879/attachment.html>
More information about the Juju
mailing list