Missing yaml import for charmhelpers on Xenial?
Pete Vander Giessen
pete.vandergiessen at canonical.com
Tue Jul 5 16:21:45 UTC 2016
Hi Stuart,
Thank you for the detailed reply.
> If you resync charm-helpers with an up to date version you should be
> right. charm-helpers
> bootstraps the dependencies itself (see the ImportError exception
> handlers in charmhelpers/__init__.py).
I had discovered the charm-helpers sync script, but the script in the
mariadb charm was an old one that didn't actually try to update the
__init__.py files. I found the current version of the script in the
charm-helpers source (bzr branch lp:charm-helpers), copied it into the
charm's scripts folder, and now have a working charm :-)
> (this is of course all superseded with charm-tools and reactive
> charms, which handles dependencies better).
+1 for reactive charms. I was trying to get mariadb working in a hurry, but
I'm thinking that it might have been faster to just make it into a reactive
charm ...
Thanks again,
~ PeteVG
On Sat, Jul 2, 2016 at 8:27 AM Stuart Bishop <stuart.bishop at canonical.com>
wrote:
> On 2 July 2016 at 03:06, Pete Vander Giessen
> <pete.vandergiessen at canonical.com> wrote:
> > I wrote:
> >> I think that I figured this one out. charmhelpers does have PyYAML and
> six
> >> as dependencies, but the mariadb charm was deploying its own, probably
> out
> >> of date version of charmhelpers. Telling it to install charmhelpers
> through
> >> the juju tools, rather than stuff them into its own source tree should
> help
> >> a lot ...
> >
> > ... but that was before I did my homework. I understand better now how
> > charmhelpers gets integrated into non layered charms, and I see why it's
> > bypassing its own setup.py file, and making it tricky to install the
> missing
> > stuff, outside of a supplemental bash script. Hmmm ...
>
> If you resync charm-helpers with an up to date version you should be
> right. charm-helpers
> bootstraps the dependencies itself (see the ImportError exception
> handlers in charmhelpers/__init__.py).
>
> This makefile stanza is the 'standard' way of resyncing charmhelpers:
>
> sync:
> @bzr cat \
>
> lp:charm-helpers/tools/charm_helpers_sync/charm_helpers_sync.py \
> > .charm_helpers_sync.py
> @python .charm_helpers_sync.py -c charm-helpers.yaml
>
> And you need a charm-helpers.yaml desribing the bits that need
> embedding in your charm, like the following:
>
> destination: hooks/charmhelpers
> branch: lp:charm-helpers
> include:
> - coordinator
> - core
> - fetch
> - contrib.charmsupport
> - contrib.templating.jinja
> - contrib.network.ufw
> - contrib.benchmark
>
>
> (this is of course all superseded with charm-tools and reactive
> charms, which handles dependencies better).
>
> --
> Stuart Bishop <stuart.bishop at canonical.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20160705/759ec2b3/attachment.html>
More information about the Juju
mailing list