Skip to content

Instantly share code, notes, and snippets.

@FransUrbo
Created September 6, 2016 18:42
Show Gist options
  • Save FransUrbo/413e6ae1c730d514ff442a35d4a1f8ff to your computer and use it in GitHub Desktop.
Save FransUrbo/413e6ae1c730d514ff442a35d4a1f8ff to your computer and use it in GitHub Desktop.
heat test reverse designate entry - complete
heat_template_version: 2016-04-08
description: Test reverse entry
parameters:
# => Networking
network:
type: string
description: Network to attach server to
default: tenant-97
subnet:
type: string
description: Subnetwork to attach server to
default: subnet-97
# => Volume
image:
type: string
description: Image used for servers
default: jessie
# => DNS
name:
type: string
description: Hostname to attach to IP
default: test
domain:
type: string
description: Domainname to attach hostname to
default: bayour.net.
resources:
instance:
type: OS::Nova::Server
properties:
name: { list_join: ['-', [ { get_param: "OS::stack_name"}, { get_param: name } ] ] }
flavor: m1.2tiny
metadata:
environment: { get_param: "OS::stack_name" }
instance: "shell"
services: ""
key_name: "Turbo_Fredriksson"
availability_zone: nova
flavor_update_policy: REPLACE
image_update_policy: REBUILD_PRESERVE_EPHEMERAL
config_drive: true
diskConfig: AUTO
block_device_mapping:
- device_name: vda
delete_on_termination: true
volume_id: { get_resource: volume }
networks:
- port: { get_resource: port }
user_data:
get_file: ../terraform/modules/admin/ldap-vm.sh
scheduler_hints: {}
port:
type: OS::Neutron::Port
properties:
name: { list_join: ['-', [ { get_param: "OS::stack_name"}, { get_param: name } ] ] }
network: { get_param: network }
security_groups: [ssh]
volume:
type: OS::Cinder::Volume
properties:
name: { list_join: ['-', [ { get_param: "OS::stack_name"}, { get_param: name } ] ] }
image: jessie
size: 8
availability_zone: nova
volume_type: zfs
floating:
type: OS::Neutron::FloatingIP
properties:
floating_network: physical
port_id: { get_resource: port }
record:
type: OS::Designate::Record
properties:
description: { list_join: [' - ', [ 'Floating IP DNS Record', { get_param: name } ] ] }
name: { list_join: ['.', [ { get_param: name }, { get_param: domain } ] ] }
domain: bayour.net.
data: { get_attr: [floating, floating_ip_address] }
type: A
reverse:
type: OS::Designate::Record
properties:
description: { list_join: [' - ', [ 'Floating IP DNS Record - reverse', { get_param: name } ] ] }
name: { list_join: ['.', [ { str_split: ['.', { get_attr: [floating, floating_ip_address] }, 3] }, { str_split: ['.', { get_attr: [floating, floating_ip_address] }, 2] }, { s\
tr_split: ['.', { get_attr: [floating, floating_ip_address] }, 1] }, { str_split: ['.', { get_attr: [floating, floating_ip_address] }, 0] }, 'in-addr.arpa.' ] ] }
domain: { list_join: ['.', [ { str_split: ['.', { get_attr: [floating, floating_ip_address] }, 2] }, { str_split: ['.', { get_attr: [floating, floating_ip_address] }, 1] }, {\
str_split: ['.', { get_attr: [floating, floating_ip_address] }, 0] }, 'in-addr.arpa.' ] ] }
data: { list_join: ['.', [ { get_param: name }, { get_param: domain } ] ] }
type: PTR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment