我正在使用带有 Juno 版本的 Openstack Heat,但我遇到了问题。
我想使用 AutoScalingGroup 将在特定子网中自动创建一些实例。我的网络拓扑是一个具有许多子网的网络(每一层都在自己的子网上)。
但这在 Juno 版本中似乎是不可能的,因为我们无法在 OS::Nova::Server / 网络中指定子网参数。文档在这里:http : //docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Nova::Server-prop-networks- *-subnet
我想知道是否有人在 Juno 中有解决此限制的方法。
创建独立服务器时,可以指定 OS::Neutron::Port 并引用子网。但我找不到如何使用 AutoScaling 做到这一点。
提前谢谢了,
杰米
编辑:当前堆栈。它仅适用于一台服务器,因为端口是在 OS:Heat::AutoScalingGroup 之外创建的
resources:
instance_port:
type: OS::Neutron::Port
properties:
name: { get_param : portName }
network_id: { get_param: networkId }
fixed_ips:
- subnet_id: { get_param: subnetId }
security_groups: { get_param: securityGroups }
asg_group:
depends_on: [ instance_port ]
type: OS::Heat::AutoScalingGroup
properties:
...
resource:
type: OS::Nova::Server
properties:
name: { get_param: asgName }
....
networks:
# TODO assign direct IP to the right subnet by decommenting this line. Will be available in Liberty
#- subnet: { get_param: subnetId } /!\ doesn't work in Juno
- port: { get_resource : instance-port } /!\ Works only with one server