New feature in Juju 2.8: Add custom machine images with the juju metadata command

As of Juju 2.8.0, Juju administrators are now able to specify virtual machine images that Juju should consider when provisioning new compute capacity on Amazon AWS and OpenStack. The juju metadata add-image command informs Juju that an image should be considered when the series is selected.

Usage

The basic syntax involves tagging a specific series name with an “image identifier” or <image-id>.

juju metadata add-image --series <series> <image-id>

The format for image identifiers is provider-specific. Juju passes this information to the cloud directly and performs minimal validation when the image is added. Here are some provider-specific guides for identifying which <image-id> to select:

The metadata add-image sub-command includes a number of provider-specific options that may be useful for specialised use cases:

  • --virt-type: the virtualisation type for the VM, e.g. hvm, paravirtual on AWS
  • --storage-type: the root disk storage type, e.g. ebs for Elastic Block Storage on AWS
  • --storage-size: the size of the VM’s root disk

Background

The juju metadata command provides the ability for Juju administrators to introspect the VM images that clouds support. The image metadata is also how controllers know how to provision new machines.

juju metadata includes several sub-commands:

  • add-image: (new) adds image metadata to model
  • delete-image: deletes image metadata from environment
  • generate-agents: generate simplestreams agent metadata
  • generate-image: generate simplestreams image metadata
  • list-images: lists cloud image metadata that’s currently available
  • sign: cryptographically sign simplestreams metadata
  • validate-agents: validate agent metadata and ensure agent binary tarball(s) exist for Juju version(s)
  • validate-images - validate image metadata and ensure image(s) exist for a model

1 Like

Exciting new release!

Is this feature add-image coming for vsphere down the road?

Yeah, we’re going to look to see if that can happen this cycle, hopefully “soon”.

1 Like

Looking forward to try it out!