Charm tools for Python
gary.poster at canonical.com
Tue Feb 5 21:38:23 UTC 2013
On 02/05/2013 04:04 PM, Diogo Baeder wrote:
> Hi folks!
Hi Diogo. I'm on the team that originally developed the Python
charmhelpers. Clint was the maintainer of charm-tools. I'm not sure
what the status of that is now, or who would discuss integration there.
> I'm new on the list, so pardon me if I speak something that doesn't make
> sense considering what has been discussed here before.
> Me and Sidnei (sidnei) have been working on some charms (mostly in
> Python) for usage with Ubuntu One servers, and we started to feel the
> need for having some base code to help us with common tasks between
> different charms, and we've stumbled these projects:
> https://launchpad.net/charmsupport - which is maintained by Matthew
> Wedgwood (mew) and some other people, it seems, and was created to be a
> more higher-level set of tools to build charms;
> https://launchpad.net/charm-tools - which contains the Python
> charmhelpers package, which seem to be more lower-level tools, but also
> used more broadly and are referenced by the Juju documentation.
> So, wouldn't it be better if we joined the efforts of both these tools
> into a more robust and complete set of tools? Matthew mentioned he'd
> like to have some sort of framework to work with charms, and I think it
> makes sense - to me it would be perfect if we had a framework, which
> contained some core tools, and if these tools could be used stand-alone -.
The very lightweight charmhelpers have suited us well so far for the
charms we've needed. That said, I can certainly imagine wanting bigger
reusable chunks for other kinds of charms. I see charmsupport wants to
have reusable chunks for adding nagios support, among others. Makes sense.
The most obvious collaboration to me would be for charmsupport to use
charmhelpers as a library. Roughly speaking, that project could fold
code that they have in host.py into python-shelltoolbox, and fold
hookenv.py code into python-charmhelpers. The charmsupport devs would
eliminate duplication, and add tests for new code in those packages.
Then charmsupport can build on top of those libraries, and grow them as
their needs grow.
That sounds cool to me, and we are the maintainers of the shelltoolbox.
We could help shepherd in contributions. We'd need someone with a
maintainer hat on for charm-tools to weigh in on contributions there.
A framework doesn't seem necessary to me, FWIW. Charmhelpers and
charmsupport both seem to be doing their job without inversion of control.
> Also, something else that would be interesting, IMO, is to publish this
> joined effort in PyPI - so that people can use these tools in a virtual
> environment, or if they simply want to get them from the cheeseshop
> instead of Launchpad -.
Fine with me. We're getting them from debs in Quantal and PPAs in
> What do you think?
Thanks for bringing this up.
More information about the Juju