Ask Your Question

Revision history [back]

Heat AutoScalingGroup with different user data

Suppose in my heat template, I have autoscaling resource like this.

resources:
  auto_scale_server:
    type: OS::Heat::AutoScalingGroup
    properties:
      min_size: 1
      max_size: 4
      resource:       
          type: OS::Nova::Server
          properties:
            name: Scaled_Blade
            image: { get_param: image }
            flavor: { get_param: flavor }
            key_name: {get_param: key_pair}
            networks: [{network: {get_param: internal_net} }]  
            user_data:
              str_replace:
                template: |
                  #!/bin/bash 
                  ifconfig eth1 10.0.0.5

I want to assign different IP to each VM, which is created by this group. How can I achieve that ?