[openstack-dev] [heat] How to cross-reference resources within OS::Heat::ResourceGroup

Zane Bitter zbitter at redhat.com
Wed May 7 17:05:20 UTC 2014


On 06/05/14 16:07, Janczuk, Tomasz wrote:
> Could this be accomplished with 3 resource groups instead of one? The
> first would create the ports, the second floating IPs, and the last the
> VMs? In that case, would there be a way to construct a reference to a
> particular instance of, say, a port, when creating an instance of a
> floating IP?

No, and that wouldn't make any sense. The scaling unit is the 3 
resources together, so you should group them into a template and scale that.

Also, please post usage questions to ask.openstack.org, not to the 
development list.

thanks,
Zane.

>
> On 5/6/14, 12:41 PM, "Randall Burt" <randall.burt at RACKSPACE.COM> wrote:
>
>> A resource group's definition contains only one resource and you seem to
>> want groups of multiple resources. You would need to use a nested stack
>> or provider template to do what you're proposing.
>>
>> On May 6, 2014, at 2:23 PM, "Janczuk, Tomasz" <tomasz.janczuk at hp.com>
>> wrote:
>>
>>> I am trying to create an OS::Heat::ResourceGroup of VMs and assign each
>>> VM a floating IP. As far as I know this requires cross-referencing the
>>> VM, port, and floating IP resources. How can I do that within a
>>> OS::Heat::ResourceGroup definition?
>>>
>>> The `port: { get_resource: vm_cluster.vm_port.0 }` below is rejected by
>>> Heat.
>>>
>>> Any help appreciated.
>>>
>>> Thanks,
>>> Tomasz
>>>
>>>   vm_cluster:
>>>     type: OS::Heat::ResourceGroup
>>>     properties:
>>>       count: { get_param: num_instances }
>>>       resource_def:
>>>         vm:
>>>           type: OS::Nova::Server
>>>           properties:
>>>             key_name: { get_param: key_name }
>>>             flavor: { get_param: flavor }
>>>             image: { get_param: image }
>>>             networks:
>>>               - port: { get_resource: vm_cluster.vm_port.0 }
>>>         vm_port:
>>>           type: OS::Neutron::Port
>>>           properties:
>>>             network_id: { get_param: private_net_id }
>>>             fixed_ips:
>>>               - subnet_id: { get_param: private_subnet_id }
>>>             security_groups: [{ get_resource: rabbit_security_group }]
>>>         vm_floating_ip:
>>>           type: OS::Neutron::FloatingIP
>>>           properties:
>>>             floating_network_id: { get_param: public_net_id }
>>>             port_id: { get_resource: vm_cluster.vm_port.0 }
>>>
>>> _______________________________________________
>>> OpenStack-dev mailing list
>>> OpenStack-dev at lists.openstack.org
>>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>> _______________________________________________
>> OpenStack-dev mailing list
>> OpenStack-dev at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>




More information about the OpenStack-dev mailing list