Is Juju capable of using Ubuntu Pro instead of Ubuntu LTS when launching units in AWS/Azure?
Ubuntu Pro is essentially Ubuntu LTS with the ubuntu advantage client enabled out of the box, with ESM and livepatch running. Is there an easy way to tell Juju to use Pro?
I haven’t tested this yet, but it seems possible. It might be necessary to first subscribe to Ubuntu Pro in AWS Marketplace, in order to be able to access the AMI.
It would be nice if Juju could make it easier to enable Ubuntu Pro on models in public clouds where Pro is available.
Update: It doesn’t seem to work
I tried the above, obtaining the AMI ID from AWS marketplace two ways:
Using the AMI displayed on the “Configure” page for the Pro listing
Adding it to Service Catalog and copying the AMI out of the template for the product
In both cases, Juju can’t find the image:
Every 2.0s: juju status slate: Wed Jul 29 12:36:53 2020
Model Controller Cloud/Region Version SLA Timestamp
test aws-us-west-2 aws/us-west-2 2.8.1 unsupported 12:36:54-05:00
App Version Status Scale Charm Store Rev OS Notes
ubuntu waiting 0/1 ubuntu jujucharms 15 ubuntu
Unit Workload Agent Machine Public address Ports Message
ubuntu/0 waiting allocating 0 waiting for machine
Machine State DNS Inst id Series AZ Message
0 pending pending bionic failed to start machine 0 (cannot run instances: The image id '[ami-0fd6beacda77c37e2]' does not exist (InvalidAMIID.NotFound)), retrying in 10s (9 more attempts)
I believe that this is non-trivial for Juju to support out of the box, sadly. Each cloud provider has a different mechanism for making Ubuntu Pro available to customers, which means that there’s no opportunity to create a generalised solution.
As to why the instance completely failed to provision earlier… us-east-1 is my usual testing ground for Pro and I launch it regularly through the EC2 dashboard there, but it was acting up for me earlier, so I chose us-west-2. I suspect that because I’ve never launched 18.04 Pro in that region, somehow the AMI wasn’t available via APIs that Juju uses to provision instances – but this is just a wild guess!
[Update] It turns out that it is possible to use Ubuntu Pro with Juju 2.8’s metadata add-image feature. However, using Pro images with Juju somehow uncovered a bug in cloud-init, which will be SRU’d. In the meantime, there is a workaround if you’d like to try it out.