Created
May 7, 2015 15:17
-
-
Save hassenius/80786b710a4a5aa0356f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heat_template_version: 2013-05-23 | |
description: Create a VM with Floating IP and security group to allow all ssh | |
parameters: | |
key_name: | |
type: string | |
# default: hk_key | |
label: Keypair Name | |
description: Name of a KeyPair to enable SSH access to the instance. | |
constraints: | |
- custom_constraint: nova.keypair | |
instance_type: | |
type: string | |
#default: Standard_1_2 | |
label: OpenVPN Instance Type | |
description: Instance type for the OpenVPN server. | |
constraints: | |
- custom_constraint: nova.flavor | |
image_id: | |
type: string | |
#default: Ubuntu Server 14.04 LTS x86_64 | |
label: Image | |
description: Name or ID of the image to use for the server (Tested with ubuntu 14.04 LTS). | |
constraints: | |
- custom_constraint: glance.image | |
shared_net_id: | |
type: string | |
#default: Public-Network | |
label: Shared Network | |
description: Name or ID of the shared network for which floating IP addresses will be allocated. | |
constraints: | |
- custom_constraint: neutron.network | |
private_net_id: | |
type: string | |
# default: hk_network1 | |
label: Private Network | |
description: Private network to route in ICOS. | |
constraints: | |
- custom_constraint: neutron.network | |
resources: | |
# IP addresses | |
server_private_ip: | |
type: OS::Neutron::Port | |
depends_on: | |
- secgroup-ssh | |
properties: | |
# From Juno, use network instead to be able to supply name as well as ID | |
network: { get_param: private_net_id } | |
security_groups: [{ get_resource: secgroup-ssh }] | |
server_shared_ip: | |
type: OS::Neutron::FloatingIP | |
depends_on: | |
- server_private_ip | |
properties: | |
# From Juno use network instead to be able to supply name as well as ID | |
floating_network: { get_param: shared_net_id } | |
port_id: { get_resource: server_private_ip } | |
secgroup-ssh: | |
type: OS::Neutron::SecurityGroup | |
properties: | |
description: Enable traffic external traffic on SSH. | |
rules: [{protocol: tcp, port_range_max: 22, port_range_min: 22, remote_ip_prefix: 0.0.0.0/0},] | |
# Servers | |
floating_instance: | |
type: OS::Nova::Server | |
depends_on: | |
- server_private_ip | |
properties: | |
image: { get_param: image_id } | |
flavor: { get_param: instance_type } | |
key_name: { get_param: key_name } | |
networks: | |
- port: { get_resource: server_private_ip } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment