From a5c251d26461b16f03a26ea7321bb2419ed4ba63 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 10 Feb 2017 22:15:10 +0200 Subject: Add heat template for pieni.net I need this to use a test VM in an OpenStack cloud. --- heat/pieni.heat | 109 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 heat/pieni.heat (limited to 'heat') diff --git a/heat/pieni.heat b/heat/pieni.heat new file mode 100644 index 0000000..0ab8aa5 --- /dev/null +++ b/heat/pieni.heat @@ -0,0 +1,109 @@ +--- +heat_template_version: 2015-04-30 + +description: >- + pieni.net. + +parameters: + + key_name: + type: string + label: Key name + description: Name of key-pair to be used for compute instance + + instance_flavor: + type: string + label: Instance Type + description: Type of instance (flavor) to be used + default: nbl-n1-medium + + image_id: + type: string + label: Image ID + description: "stretch" + default: 64e1068f-09f0-4eb3-aca1-05946de594c3 + + floating_network: + type: string + label: Public network UUID + description: UUID of the public network + default: Public-Helsinki-1 + + availability_zone: + type: string + label: Availability zone + description: Name of the Availability zone + default: helsinki-1 + + public_network: + type: string + description: The network for the VM in helsinki-1 + default: Network-Public-Helsinki-1 + +resources: + + sg: + type: OS::Neutron::SecurityGroup + properties: + description: some stuff + rules: + # Allow ssh in. + - direction: ingress + ethertype: IPv4 + port_range_min: 22 + port_range_max: 22 + protocol: tcp + # Allow smtp in. + - direction: ingress + ethertype: IPv4 + port_range_min: 25 + port_range_max: 25 + protocol: tcp + # Allow https in. + - direction: ingress + ethertype: IPv4 + port_range_min: 80 + port_range_max: 80 + protocol: tcp + # Allow imaps in. + - direction: ingress + ethertype: IPv4 + port_range_min: 993 + port_range_max: 993 + protocol: tcp + # Allow smtp submission in. + - direction: ingress + ethertype: IPv4 + port_range_min: 587 + port_range_max: 587 + protocol: tcp + # Allow git in. + - direction: ingress + ethertype: IPv4 + port_range_min: 9418 + port_range_max: 9418 + protocol: tcp + + public_port: + type: OS::Neutron::Port + properties: + network: { get_param: public_network } + security_groups: [{ get_resource: sg }] + + public_ip: + type: OS::Neutron::FloatingIP + depends_on: public_port + properties: + floating_network: { get_param: floating_network } + port_id: { get_resource: public_port } + + pieni: + type: OS::Nova::Server + depends_on: public_port + properties: + availability_zone : { get_param: availability_zone } + key_name: { get_param: key_name } + image: { get_param: image_id } + flavor: { get_param: instance_flavor } + networks: + - port: { get_resource: public_port } -- cgit v1.2.1