How to add another lxd-host as a separate region for a juju controller

I have setup a second lxd-host which I would like to place as a separate region rather than a cloud.

How do I add this new lxd-host to my already running controller in my first lxd-host?

I’m not sure if it’s possible. There might be lxd magic to combine the two lxd hosts into a cluster. But would juju then understand?

Will a multi-cloud controller work as an alternative? Depending on why you would prefer not to have the new lxd-host as a separate cloud.

You must specify a region when creating a model to use one other than the default. At model creation you’d specify the second lxd cloud instead.

Absolutely! How do I do this given that I already have one normal controller up?

Check out the section " Managing multiple clouds with one controller" of Juju | Add clouds

Additional details on the feature can be found: Feature Highlight: Multi-cloud controller

1 Like

Studying the docs, I see that by running “juju add-cloud”, I could specify multiple regions api endpoints…

Perhaps the downside is that I wouldn’t perhaps be able to use differet credentials for different regions?

But the above image tells me that I would in fact be able to use a second remote on a different lxd-host?

Consider:

clouds:
  my-lxd-cloud:
    type: lxd
    auth-types: [certificate]
    regions:
      region-1:
        endpoint: https://lxd1.localdomain:8443
      region-2:
        endpoint: https://lxd2.localdomain:8443

Would this cause problems?

@hallback have you done this in your end ?