I have created a vSphere cloud for using with Juju. I have 2 clusters on my vCenter (Cluster01 and Cluster02) with different datastores on each. I have created a new model and set the model-config to use DataStore02 as datastore.
When I deploy a charm, i.e. charmed-kubernetes, the machines are created following the order of the clusters (regions??) and most of cases the machines aren’t deployed because the configured DataStore02 is not found on first cluster.
Can I deploy the charm to specific cluster? Can I create the vSphere cloud with regions (clusters)?
When I create the cloud it asks for a Datacenter, but if I write anything other than the base datacenter it won’t work (i.e. DC01/host/Cluster02)
The problem is that none of the charms deploy correctly…
We are running a multicloud, multiuser setup with an onprem “jimm” using maas, vsphere and will bring in a few other cloud substrates down the line.
vsphere works “OK” with Juju, although there are quite a few limitations. In our setup - we deploy targeting individual clouds(vsphere-cloud) + regions(datacenter1) like this:
A good hint, is that vsphere “logs you out” which will show up in the juju status. I often need to run juju update-credentials to be able to get back to operating/deploying etc. in vsphere clouds.
vsphere clouds can’t target individual “datastores” for allocating nodes. (2019-december)
vsphere cant add centos-images. (2019-december) - not even sure it can change the default images… (2019-december)
Juju uses the term “availability zone”, because this is what other providers use. See the “vSphere specific features” section of Using VMware vSphere with Juju. Juju’s default behaviour is to spread the placement of units across availability zones, to increase resilience to hardware failure.
$ juju deploy kubernetes-core --to zone=Cluster02
ERROR options provided but not supported when deploying a bundle: --to
I only have one Datacenter defined at vsphere cloud, but with 4 clusters. I have set the datastore in model-config to DataStore04 too.
When the machines are deployed, if the first cluster juju tries to deploy is, i.e., Cluster01 it fails because DataStore04 is not accessible by that cluster, and the machine remains in error state.
One thing, this config has worked before, when juju tried with another cluster it retries to 10 attempts, changing the availability zone, but now it uses always the same availability zone.
Thanks, as I told before this worked before, juju tried to with first cluster and then tried to other cluster until the datastore defined in model-config was accessible. I don’t know why, in the following attempts, juju keep trying the same availability zone…
To do this, you need to customise the bundle.yaml for your hosting environment. To find it, visit the bundle’s web page, then click on “bundle.yaml” in the Files box on the right-hand-side.
Every application needs to have a zones constraint added. See the example before for a model.
Replace “us-east-1c” with whichever cluster you prefer. If multiple clusters can access the datacenter that you want to store them on, then create a comma-seperated list, e.g. zones=Cluster02,Cluster03. Note that the constraint is zones, not zone.
Thanks you very much for your help and interest. If you want I can provide info and shell history to see why juju keep trying to deploy to the same zone although designed datacenter is not accessible when zones constraints are not indicated.
Let me know if you encounter any more trouble. As @erik-lonroth has mentioned, the vSphere provider code is lacking features compared to MAAS. Please complain loudly if something that you need is missing. That makes it much easier to prioritise.