Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If what you really need to do is to assign a different IP to each VM in the AutoScaling Group, you can achieve it by enabling the DHCP when you create the "internal_net"; so each new machine in the AutoScalingGroup will receive a different internal IP address when created; for example:

internal_network: type: OS::Neutron::Net properties: name: { get_param: internal_net } internal_subnet: type: OS::Neutron::Subnet properties: network: { get_resource: internal_network} cidr: 192.168.1.0/24

next line enables DHCP

  enable_dhcp: True
  name:
    str_replace:
      template: Sub-NetName
      params:
        NetName: { get_param: internal_net }

Obviously, in this way you must delete the line for assigning an IP at Operating System level (i.e. the line: ifconfig eth1 10.0.0.5); in fact, even you're not creating an autoscaling group, the ideas of specifying and assigning an IP address "by hand" as you dif it's not a good way for Cloud philosophy (you need to manage automatically; else you'll get in a “wok jam" when scaling)

If what you really need to do is to assign a different IP to each VM in the AutoScaling Group, you can achieve it by enabling the DHCP when you create the "internal_net"; so each new machine in the AutoScalingGroup will receive a different internal IP address when created; for example:

 internal_network:
    type: OS::Neutron::Net
    properties:
     name: { get_param: internal_net }
  internal_subnet:
    type: OS::Neutron::Subnet
    properties:
      network: { get_resource: internal_network}
      cidr: 192.168.1.0/24

192.168.1.0/24 # next line enables DHCP

DHCP
      enable_dhcp: True
   name:
     str_replace:
       template: Sub-NetName
       params:
         NetName: { get_param: internal_net }

Obviously, in this way you must delete the line for assigning an IP at Operating System level (i.e. the line: ifconfig eth1 10.0.0.5); in fact, even you're not creating an autoscaling group, the ideas of specifying and assigning an IP address "by hand" as you dif it's not a good way for Cloud philosophy (you need to manage automatically; else you'll get in a “wok jam" when scaling)