i trying create cluster using heat templates of openstack. have following template defining resource group.
cluster: type: os::heat::resourcegroup properties: count: { get_param: instance_count } resource_def: type: ../templates/vm.yaml properties: image: { get_param: image } flavor: { get_param: flavor } private_network : { get_attr : [network, name] }
this works, name of these servers cryptic. wondering if possible provide prefix name each of instances.
or way can str_replace
template value current index of cluster count.
is there way achieve this?
nevermind, got resourcegroup documentation. use %index%
.
here example documentation.
resources: my_indexed_group: type: os::heat::resourcegroup properties: count: 3 resource_def: type: os::nova::server properties: # create unique name each server # using index in group name: my_server_%index% image: centos 6.5 flavor: 4gb performance
Comments
Post a Comment