Say we have two bundles that look like this:
Bundle #1
bundle: kubernetes
applications:
charm1: charm: charm1
charm2: charm: charm2
charm3: charm: charm3
Bundle #2
bundle: kubernetes
applications:
charm4: charm: charm4
charm5: charm: charm5
charm6: charm: charm6
With potentially many charms (like dozens or more) instead of just 3. Each one of those bundles can be deployed just fine, but then say you can deploy both bundles with integrations between them, i.e. something like this:
relations:
- [charm1, charm4]
- [charm1, charm5]
- [charm1, charm6]
- [charm2, charm4]
- [charm2, charm5]
- [charm2, charm6]
- [charm3, charm4]
- [charm3, charm5]
- [charm3, charm6]
Whatâs more, say that thereâs potentially more bundles like above that can integrate with one another, all requiring similar relations. How can this be handled gracefully in Juju? Particularly, how can I avoid having to tell someone "Now that youâve got Bundle #1 deployed, do juju deploy bundle-2 && juju relate charm1 charm5 && ...
"?
Hereâs a couple of options that spring to mind, along with reasons they donât work well:
- Publish one overarching bundle stack and lots of sub-bundles
- This handles the case well where you want to deploy one bundle or all bundles, but not where you just want say two out of N bundles
- Publish only individual bundles
- Runs into the problem listed above, where a user is stuck manually related a lot of applications to each other
- Publish each subset of the bundles, along with overarching bundle stack
- Not practical when talking about many different bundles, as youâd have to publish every bundle, plus every pair of bundles, plus every trio of bundles, plus âŚ
The only real option that I can think of would involve extending the bundle syntax, and so would require changes to Juju, but this scenario should be handled well by something like this:
bundle: kubernetes
groups:
bundle1:
applications: [<charms here>]
relations: [<intra-bundle relations here>]
bundle2:
applications: [<charms here>]
relations: [<intra-bundle relations here>]
relations:
- [bundle1:charm1, bundle2:charm4]
<rest of inter-bundle relations here>
Then, someone could run juju deploy foo
(or whatever the overarching bundle is called), or say juju deploy foo --groups bundle1,bundle2
and pick exactly what they want without having to do a bunch of manual grunt work.
As a real-world example, I would like to split the Kubeflow bundle up into multiple sub-bundles, and allow people to pick and choose which sub-bundles theyâd like to use, without have to manually set up a bunch of relations. I.e., it would be nice if someone could do this:
juju deploy kubeflow --groups=base,katib,mlflow
Instead of this:
juju deploy kubeflow
juju deploy katib
juju relate <lots of things>
juju deploy mlflow
juju relate <lots of things>