Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
heat_template_version: 2016-10-14
description: run a test instance and associate a floating ip
resources:
wait_condition:
type: OS::Heat::WaitCondition
properties:
handle: { get_resource: wait_handle }
count: 1
timeout: 600
wait_handle:
type: OS::Heat::WaitConditionHandle
network:
type: res::network
key:
type: res::key
ssh_access:
type: res::ssh
instance_port:
depends_on: [network, ssh_access]
type: OS::Neutron::Port
properties:
network: {get_attr: [network, name]}
security_groups:
- default
- { get_attr: [ssh_access, name] }
floating_ip:
type: OS::Nova::FloatingIP
properties:
pool: external_network
instance:
depends_on: [key, network, instance_port]
type: OS::Nova::Server
properties:
flavor: de.NBI.default
image: Ubuntu 16.04 Xenial 2017/04/19
networks:
- port: { get_resource: instance_port }
key_name: { get_attr: [key, name] }
user_data_format: RAW
user_data:
list_join:
- ''
- - {get_file: setup-bioinfo-desktop.sh}
- str_replace:
params:
wc_notify: { get_attr: ['wait_handle', 'curl_cli'] }
template: |
# notify heat that we are done here
wc_notify --insecure --data-binary '{"status": "SUCCESS"}'
association:
type: OS::Nova::FloatingIPAssociation
properties:
floating_ip: { get_resource: floating_ip }
server_id: { get_resource: instance }
outputs:
ip:
description: The floating IP address assigned to the server.
value: { get_attr: [floating_ip, ip] }