Today we received this question from IRC. My understanding is that bundles are collections of pre-existing charms. Is that interpretation correct?
* cloaked1 (~cloaked1@unaffiliated/cloaked) has joined
<cloaked1> Is there a way to create a bundle with multiple models within it
<cloaked1> or better question, is there a way to define multiple models within a bundle?
<cloaked1> can a bundle define a model at all actually. As far as I can tell, the answer is no based on the documentation I've read so far. However, I've also noticed that the documentation doesn't fully cover everything.
As written today, a bundle cannot span models. I think there is some limited support for cross model relations, but generally a bundle is considered a self-contained description of a group of applications working together.
Iāve always wanted to get to a point where a model, including model-config and such could be defined such that you could really make a model repeatable, but itās not very sharable at that point because youāre getting so much environment (what networks, proxies, etc) specific details into it that it starts to feel like a different thing.
Across models seems strange though I guess in a CMR sense thatās actually getting to be interesting as you need a few models, in concert, to provide the end working solution. I do think that the idea of CMR was that youād have services running though and youād not typically be the same person setting up each model though things like testing/dev come into play here.
Not at this time. Thereās a tricky bit in that more than one bundle can go into a model so itās something weāve not solved with how that might fail/update values and such.
Wow, this was fun to see that my question in IRC made it here (Iām cloaked1). Additionally, I created an issue (before the IRC question) which ended up leading me here anyway: https://github.com/juju/docs/issues/3473
OK, So with all that Iāve read here, and other sources of docs Iāve been able to glean, let me see if I understand fully.
One cannot, currently, create bundles that span models. Models are the only way (AFAICT) to define machines (things like tagging and cloud-init, which my current project requires), and one can do cross-model relationships, but it sounds like the whole thing is manual for now. Does that sum it up?
OK, so hereās what I need to accomplish:
I absolutely must be able to run cloud-init configuration of machines for k8s masters, k8s-workers, unless thereās a way using the canonical-k8s charm to install helm and set some RBAC roles during instantiation.
I need to tag machines with what they are doing as a requirement of the project Iām working on so that if a machine is ākubernetes-masterā then I want to tag it as ākubernetes-masterā or any arbitrary tagging if we so desire.
For now, thatās what I can remember my needs so far. What are your thoughts?
The machines are NUCs. The distribution is Ubuntu. Weāre deploying the canonical-k8s charm with a mildly (currently) altered bundle.yaml. Itās within the bundle where Iād love to be able to tag machines, which seems impossible.
Iād recommend using annotations as an arbitrary tag mechanism.
You can specify machine annotations in the bundle, but the CLI isnāt good at getting you these annotations out and visible very easily just yet.
Annotations are globally namespaced, so if you were going to use them, Iād recommend a key more like āproject.tagā where āprojectā is meaningful to you.
So the question I have about this idea is the context of āglobal namespacing.ā I read that to mean that the same annotation(s) getting placed on each machine in use IE if I use an annotation of ākubernetes-masterā then every machine will get that annotation instead of just the kubernetes-master hosts. That is counter-intuitive to what Iām trying to accomplish. So it sounds like tagging the machines will have to be done manually for now. Sound about right?