Revision history [back]

click to hide/show revision 1
initial version

Can we assign instance names to autoscaling servers?

Hi, I'm using openstack Juno to deploy my cloud environment. the AutoScalinGroup looks like below.

resources: asg: type: OS::Heat::AutoScalingGroup properties: resource: type: OS::Nova::Server properties: name: TestServer image: TestVM flavor: m1.tiny config_drive: True mgmt_net: mgmt_net desired_capacity: 2 max_size: 5 min_size: 1

The stack will start with 2 VMs created, and scale up/down when the ceilometer alarms be triggered.

But all the servers be created by AutoScalingGroup will has the identical server name "TestServer", if I remove the "name" attribute from autoscalinggroup, the server name will be changed to "stackname-uuid" style.

Is there any way to assign instance names to autoscaling servers? for example I want the servers has name "TestServer_01", "TestServer_02", ..... according to when it is spawned?

BTW I tried to use %index% in autoscalinggroup, seems it's not allowd there...

Can we assign instance names to autoscaling servers?

Hi, I'm using openstack Juno to deploy my cloud environment. the AutoScalinGroup looks like below.

resources:
  asg:
    type: OS::Heat::AutoScalingGroup
    properties:
      resource:
        type: OS::Nova::Server
        properties:
          name: TestServer
          image: TestVM
          flavor: m1.tiny
          config_drive: True
          mgmt_net: mgmt_net
      desired_capacity: 2
      max_size: 5
      min_size: 1

1

The stack will start with 2 VMs created, and scale up/down when the ceilometer alarms be triggered.

But all the servers be created by AutoScalingGroup will has the identical server name "TestServer", if I remove the "name" attribute from autoscalinggroup, the server name will be changed to "stackname-uuid" style.

Is there any way to assign instance names to autoscaling servers? for example I want the servers has name "TestServer_01", "TestServer_02", ..... according to when it is spawned?

BTW I tried to use %index% in autoscalinggroup, seems it's not allowd there...