<div dir="ltr"><div><div><div>Simon,<br></div>You raise some very interesting questions and good points.<br><br></div>I've also been developing charms with layers, run into some of these same issues, and developed a pragmatic approach that has helped me manage it pretty well so far. In a more mature layer/interface ecosystem, it might not be the optimal approach. I look forward to adapting my tactics as the ecosystem evolves.<br></div><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 8, 2016 at 8:19 AM, Simon Davy <span dir="ltr"><<a href="mailto:simon.davy@canonical.com" target="_blank">simon.davy@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hi all<br>
<br>
My team (Online Services at Canonical) maintains >20 private charms<br>
for our services, plus a few charmstore charms.<br>
<br>
Most of these charms are written with charmhelpers ansible support, or<br>
with the Services framework. We would like to move towards<br>
consolidating these approaches (as both have issues), and so have been<br>
experimenting with reactive.<br>
<br>
We like the ideas in reactive, especially the composition part, as<br>
sharing common code between our charms has been very painful. Also,<br>
the higher-level user-defined events that reactive provides is a<br>
definite improvement over having to implement the lower level relation<br>
dance semantics every time.<br>
<br>
However, it's a fast moving target, and we have encountered some<br>
issues. So we have a couple of questions, that we haven't been able<br>
to locate answers for in reactive docs (we may have missed some?).<br>
<br>
1) Is there a roadmap for reactive? A target for a stable 1.0 release,<br></div>
or similar? We'd ideally like a stable base to build from before<br><div>
committing to use a new framework, having been (re)writing/maintaining<br>
charms for 4+ years now :)<br></div></blockquote><div> <br> I too would like to see and help the ecosystem mature.<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<br>
2) Layer pinning. Right now, layers are evolving fast, and the lack of<br>
pinning to layer versions has caused charm builds to break from day to<br>
day. Is this a planned feature?<br></div></blockquote><div><br></div><div>For the time being, I've been avoiding upstream churn by vendoring all the layers and interfaces that my deployment uses. These are all subdirectories of a project that builds a bundle consisting of several charms, and also contains supporting end-to-end test data and CI scripts. With the most trivial of configuration changes, I can build, deploy and test these services by compiling source from development branches, installing from release tarballs or debian packages. This has been amazing for end-to-end testing, demos of features in development, as well as complex feature development where changes need to be coordinated across several services at once.<br><br>Combined with the LXD provider, which is just amazingly fast on a xenial host, this project makes me very confident about researching "what if"-type scenarios about our deployment -- it doesn't take much at all to make minor changes to a charm and just go try something. That could be a configuration change, a different charm that provides the same interface, a feature branch or set of feature branches for the services -- anything, really.<br><br></div><div>I manage the vendored layers and interfaces with "git subtree", which is really the only way I'd even consider vendoring. Subtree allows me to pull upstream layer & interface projects into mine, while retaining all the upstream revision history, and retaining the ability to continue to contribute to and pull from these upstream git repositories. Vendoring without this capability would be fraught with peril, requiring too much manual, tedious, error-prone work to work safely in my opinion.<br><br></div>An interface or layer that starts as a project subdirectory out of a short-term need, can be easily refactored into something generally useful, and then pushed to a separate git repo with a "git subtree push", which then becomes the new upstream where I can collaborate with other charmers. This is how I started the local-monitors and nrpe-external-master interfaces. They began as an internal migration from an older charm example (which was ansible-based). I published them with 'git subtree push' once I felt they were suitable for general reuse.<br><div><br></div>I'll admit there are some disadvantages to the vendoring approach. Unless I really pay attention to those upstreams, I might miss a useful bugfix or security improvement. That's also a challenge with pinning btw (which is effectively a cheap copy form of vendoring with references). It'd be nice if I could rely on a branch name to be stable but provide bugfixes.<br><div><br>Completely vendoring upstreams with subtree could become unnecessary, needless overhead, if stable upstreams were common practice. I'd still probably want to pin upstream revisions though, just to have reproducible builds.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
3) Downloading from the internet. This issue has been common in<br>
charmstore charms, and is discouraged, AIUI. But the same issue<br>
applies for layers, and possibly with more effect, due to a layer's<br>
composibility. We simply can not utilise any layer that downloads<br>
things from github or similar, and I'm sure others are in a similar<br>
situation. We're aware of resources, but not convinced this is a<br>
scalable solution for layers, as it makes using a charm that has<br>
layers that require resources much more complex. So, some clarity in<br>
this area would be helpful.<br></blockquote><div><br></div><div>In such an environment, I think what you'd want to do is to mirror the upstream layer/interface projects from Github into git repositories that your egress policy allows. I could be wrong, but I think you'd then need to clone them locally from git and use filesystem paths for your layer & interface references for 'charm build' to work.<br><br></div><div>It would be nice if we didn't need to collect them locally. Maybe there's a way now? <br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Thanks for all the work on making charming better.<br></blockquote><div><br></div><div>Same here, thanks for this stuff!<br></div><div> <br></div><span class=""></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class=""><font color="#888888">
--<br>
Simon<br>
<br>
--<br>
Juju mailing list<br>
<a href="mailto:Juju@lists.ubuntu.com">Juju@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/juju" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/juju</a><br>
</font></span></blockquote></div><br></div></div></div></div></div></div>