Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- heat_template_version: 2013-05-23
- description: >
- HOT template to deploy two servers into an existing neutron tenant network and
- assign floating IP addresses to each server so they are routable from the
- public network.
- parameters:
- key_name:
- type: string
- description: Name of keypair to assign to servers
- image:
- type: string
- description: Name of image to use for servers
- flavor:
- type: string
- description: Flavor to use for servers
- public_net_id:
- type: string
- description: >
- ID of public network for which floating IP addresses will be allocated
- private_net_id:
- type: string
- description: ID of private network into which servers get deployed
- private_subnet_id:
- type: string
- description: ID of private sub network into which servers get deployed
- resources:
- server1:
- type: OS::Nova::Server
- properties:
- name: Server1
- image: { get_param: image }
- flavor: { get_param: flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: server1_port }
- server1_port:
- type: OS::Neutron::Port
- properties:
- network_id: { get_param: private_net_id }
- fixed_ips:
- - subnet_id: { get_param: private_subnet_id }
- server1_floating_ip:
- type: OS::Neutron::FloatingIP
- properties:
- floating_network_id: { get_param: public_net_id }
- port_id: { get_resource: server1_port }
- outputs:
- server1_private_ip:
- description: IP address of server1 in private network
- value: { get_attr: [ server1, first_address ] }
- server1_public_ip:
- description: Floating IP address of server1 in public network
- value: { get_attr: [ server1_floating_ip, floating_ip_address ] }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement