To create a bundle, create a <bundle>.yaml file with your desired configuration.
If you don’t want to start from scratch, export the contents of your model to a <bundle>.yaml file via juju export-bundle --filename <bundle>.yaml or download the <bundle>.yaml of an existing bundle from Charmhub.
To pack a bundle, in the directory where you have your bundle.yaml file (and possibly other files, e.g., a README.md file), create a charmcraft.yaml file suitable for a bundle (at the minimum: type: bundle), then run charmcraft pack to pack the bundle. The result is a .zip file.
This page makes use of both the services and applications key. I think the services key is deprecated from what I understand. Should the instances where the services key is used be changed to applications just to be consistent?
Discussed with @jameinel and @simonrichardson: since Juju 2.9 it is necessary to set arch=amd64 on the applications too, not only on the machines, otherwise deploying on lxd containers will fail with
0/lxd/3 down pending focal need agent binaries for arch arm64, only found [amd64]
This is because by not having the architecture specified on the application, juju will by default think we are deploying amd64 applications. I believe this has to do with architecture-dependent charms on the new charmhub and I heard this is mentioned in Juju 2.9’s release notes. This should be reflected in these examples. Thanks!
You might be able to set a model constraint and thus have things deployed into that model default to the architecture you want.
juju set-model-constraints arch=s390x is the sort of thing you should be able to specify.
Now I believe it essentially just includes the file as though you had written the YAML content directly. So I believe it supports objects, but it might be that it only supports explicit keys. (eg the value for a key can be the contents of an included file)