Skip to content

Instantly share code, notes, and snippets.

@dizz
Created January 19, 2015 21:57
Show Gist options
  • Save dizz/c935627232d7297ff630 to your computer and use it in GitHub Desktop.
Save dizz/c935627232d7297ff630 to your computer and use it in GitHub Desktop.
2 nodes, 2 ports, 2 FIPs
heat_template_version: 2013-05-23
description: Simple template to deploy a single compute instance
parameters:
private_mgmt_net:
type: string
description: >
ID of private network mgmt
default: 2faa7292-59f4-4cf6-aa28-e3cdcc2634d7
public_net:
type: string
description: >
ID of public network
default: 1b31bc6b-8aff-4e13-912a-d9c9a427475a
resources:
my_instance:
type: OS::Nova::Server
properties:
key_name: edmo-bart
image: ubuntu-server-14.04
flavor: m1.small
networks:
- port: { get_resource: my_port }
my_port:
type: OS::Neutron::Port
properties:
network_id: {get_param: private_mgmt_net}
my_floating_ip:
type: OS::Neutron::FloatingIP
properties:
floating_network_id: { get_param: public_net}
port_id: { get_resource: my_port }
my_scaledout_instance:
type: OS::Nova::Server
properties:
key_name: edmo-bart
image: ubuntu-server-14.04
flavor: m1.small
networks:
- port: { get_resource: my_scaledout_port }
my_scaledout_port:
type: OS::Neutron::Port
properties:
network_id: {get_param: private_mgmt_net}
my_scaledout_floating_ip:
type: OS::Neutron::FloatingIP
properties:
floating_network_id: { get_param: public_net}
port_id: { get_resource: my_scaledout_port }
outputs:
instance_ip_1:
description: IP address of the 1st deployed compute instance
value: { get_attr: [my_instance, first_address] }
instance_ip_2:
description: IP address of the 2nd scaledout compute instance
value: { get_attr: [my_scaledout_instance, first_address] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment