-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathlbaas_server_member.yaml
More file actions
60 lines (55 loc) · 1.66 KB
/
lbaas_server_member.yaml
File metadata and controls
60 lines (55 loc) · 1.66 KB
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
heat_template_version: 2021-04-16
description: >
This template is not meant to be used directly, but as a part of the
lbaas_with_server_resource_group.yaml template. It forms the pool
member component of the LBaaS template.
parameters:
flavor:
type: string
image:
type: string
availability_zone:
type: string
network:
type: string
secgroup:
type: string
wc_notify:
type: string
pool:
type: string
backend_port:
type: string
subnet:
type: string
resources:
server:
# https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Nova::Server
type: OS::Nova::Server
properties:
image: { get_param: image }
flavor: { get_param: flavor }
availability_zone: { get_param: availability_zone }
networks: [{network: {get_param: network} }]
security_groups:
- { get_param: secgroup }
user_data_format: RAW
user_data:
str_replace:
template: |
#!/bin/bash -ex
apt-get update
apt-get -y install apache2
echo -e "<html>\n<body>\nI am <b>$(hostname)</b>\n</body>\n</html>" > /var/www/html/index.html
# notify heat that we are done here
wc_notify --data-binary '{"status": "SUCCESS"}'
params:
wc_notify: { get_param: wc_notify }
pool_member:
# https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Octavia::PoolMember
type: OS::Octavia::PoolMember
properties:
pool: { get_param: pool }
address: { get_attr: [ server, first_address ]}
protocol_port: { get_param: backend_port }
subnet: { get_param: subnet }