how to create a cluster of heterogenous (in terms of flavor, disk, configuration, region, type, etc.) instances via the python-troveclient.
$ trove help create-cluster
usage: trove create-cluster <name> <cluster_size> <datastore> <datastore_version> <flavor_id> <disk_size>
[--configuration <configuration>]
Creates a new cluster.
Positional arguments:
<name> Name of the cluster
<cluster_size> Size of the cluster (number of instances)
<datastore> A datastore name or UUID
<datastore_version> A datastore version name or UUID
<flavor_id> Flavor of the instance.
<disk_size> Size of the instance disk in GB
Optional arguments:
--configuration <configuration>
UUID of the configuration group to attach to the
instance.
$ trove create-cluster products 3 mongodb "2.4.10" 12 50 --configuration 1-2-3-4
Option #1: Inlining Differing Instances
$ trove create-cluster products 3 mongodb "2.4.10" 12 50 --configuration 1-2-3-4
--instances '[{"flavorRef": "7",
"volume": {"size": 1},
"configuration": "b9c8a3f8-7ace-4aea-9908-7b555586d7b6",
"type": "arbiter"},
{"flavorRef": "7",
"volume": {"size": 1},
"configuration": "b9c8a3f8-7ace-4aea-9908-7b555586d7b6",
"type": "arbiter"}
]'
The above would create 3 nodes with flavor=12, disk-size=50, config=1-2-3-4, and 2 nodes with flavor=7, disk-size=1, type=arbiter (a cluster of 5)
Option #2: ?
- Do any of the other python clients support providing a raw json request, and/or is there an example of an openstack project issuing raw json requests? If so, perhaps the official python client can officially support homogenous clusters, but horizon and others provide the raw request to the client (or curl it).
option #9
option 10: multi-non-uniform instances with block-device-mapping-style colons, but with labels, repeatable --instance flag
option #10: