Juju deploy --series centos?


I’m curious about how to be able to succeed with deploying centos in a vsphere cloud:

I’m failing with:

erik@bionic-dev-1:~/scania-hpc$ juju add-machine --series centos7
created machine 3

erik@bionic-dev-1:~/scania-hpc$ juju status
Model Controller Cloud/Region Version SLA Timestamp
abaqis iuba-vmware vmware01-prod/Sodertalje-HPC 2.5.1 unsupported 11:08:50+01:00

App Version Status Scale Charm Store Rev OS Notes
ubuntu 18.04 active 1 ubuntu jujucharms 12 ubuntu

Unit Workload Agent Machine Public address Ports Message
ubuntu/0* active idle 0 ready

Machine State DNS Inst id Series AZ Message
0 started juju-9ebd06-0 bionic poweredOn
3 pending pending centos7 failed to start machine 3 (no matching images found for given constraints: &{{{ } [centos7] [amd64] released}}), retrying in 10s (10 more attempts)

What can I do to add a centos7 machine?

erik@bionic-dev-1:~/scania-hpc$ juju version


The issue is that we need to know what images you have available that match Centos7. I believe you can use “juju metadata generate-image” to create image stream information. Canonical itself doesn’t host Redhat images, which is why we don’t default to having them available.

@wallyworld might have more information on how to set up image metadata. I know we did some work to avoid having to host simplestreams files just to get Juju to work, but I’m not sure how those commands ended up exported (I think they are under a feature flag.)


There is a feature flag that can be turned on (needs to be done at bootstrap) that will enable 3 additional commands to manage custom image metadata.

  • add-image
  • delete-image
  • list-images

You need to bootstrap with the env var set:

Then you can use add-image to teach Juju about what image id to use for a given series/arch etc.

We don’t generally expose this as it can lead to a way to override the use of standard published images. But perhaps we could consider exposing it and restricting to series such as centos7 where there’s no other easy option available.

The other option is to use the juju metadata generate-image command as John mentioned. You supply the -d argument to specify a directory where the image metadata is written. You then need to bootstrap using that directory with the --metadata-source argument. The generate-image command needs a number of parameters like region, endpoint etc which must match the cloud you are using. See --help for the specifics of what’s needed.