forked from traitecoevo/austraits-api-nectar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-instance.yaml
87 lines (73 loc) · 2.27 KB
/
test-instance.yaml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
heat_template_version: 2021-04-16
parameters:
keypair:
type: string
constraints:
- custom_constraint: nova.keypair
flavor:
type: string
default: "t3.small"
constraints:
- custom_constraint: nova.flavor
image:
type: string
availability_zone:
type: string
default: "intersect"
host_port:
type: number
default: 80
description: Port used by hosts
api_branch:
type: string
description: Branch of traitecoevo/austraits_api to use for deployment
default: "master"
logstash_host:
type: string
description: "Host running Logstash to receive events from Filebeat"
resources:
secgroup:
type: OS::Neutron::SecurityGroup
properties:
rules:
- remote_ip_prefix: 0.0.0.0/0
port_range_min: { get_param: host_port }
port_range_max: { get_param: host_port }
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
protocol: tcp
port_range_min: 22
port_range_max: 22
wait_handle:
type: OS::Heat::WaitConditionHandle
wait_condition:
type: OS::Heat::WaitCondition
properties:
handle: { get_resource: wait_handle }
count: 1
timeout: 600
cloud_init:
type: cloud-init.yaml
properties:
logstash_host: { get_param: logstash_host }
api_branch: { get_param: api_branch }
wc_notify: { get_attr: ["wait_handle", "curl_cli"] }
environment: { get_param: OS::stack_name }
server:
type: OS::Nova::Server
properties:
key_name: { get_param: keypair }
flavor: { get_param: flavor }
image: { get_param: image }
availability_zone: { get_param: availability_zone }
networks:
- allocate_network: auto
security_groups:
- { get_resource: secgroup }
user_data_format: SOFTWARE_CONFIG
user_data:
get_attr: [cloud_init, cloud_config]
outputs:
ip_address:
description: IP address of the deployed instance
value: { get_attr: [server, first_address] }