Hooking into `charm build` to download Puppet dependencies

Marco Ceppi marco.ceppi at canonical.com
Fri Nov 25 00:19:23 UTC 2016


charm build uses tactics during compilation to process files and tasks.
These tactics are pluggable, which allows you to create custom tactics in
your layer for things like you've desctibed. We have an example of this in
the Kubernetes charms, where a custom layer tactic is used to seed static
template files at charm build time:

Here's the layer.yaml:
https://github.com/juju-solutions/kubernetes/pull/84/files#diff-b8894e717eb49b702f8d267d084635c0
And here's the tactic:
https://github.com/juju-solutions/kubernetes/pull/84/files#diff-7bface8b28f9d781a51d0e302cef9245R74

This one is a little more complicated, since it can also be used as a
standalone script, which is why there's a bunch of additional code for
handling commandline parsing, the "UpdateAddonsTactic" class is the meat of
what you're looking for.

Marco

On Thu, Nov 24, 2016 at 12:02 PM Merlijn Sebrechts <
merlijn.sebrechts at gmail.com> wrote:

> Hi all
>
>
> Is it possible to hook a tool like librarian-puppet
> <https://github.com/voxpupuli/librarian-puppet> into the `charm build`
> process so I can download Puppet dependencies at build time and ship them
> with a Charm?
>
>
>
> Kind regards
> Merlijn
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20161125/d6d9038d/attachment.html>


More information about the Juju mailing list