blob: 1460149e97c34b3756c79e2e041913280492bf7e (
plain)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
heat_template_version: 2015-04-30
description: Base Module of Sample VNF
parameters:
# ONAP Assigned Parameters
workload_context:
type: string
description: Unique ID for this VNF instance
environment_context:
type: string
description: Unique ID for this VNF instance
vnf_id:
type: string
description: Unique ID for this VNF instance
vf_module_id:
type: string
description: Unique ID for this VNF module instance
vf_module_index:
type: number
description: Index of this VF Module
vnf_name:
type: string
description: Unique name for this VNF instance
# Availability Zones
availability_zone_0:
type: string
description: Primary Availability Zone
# External Networks
ha_net_id:
type: string
description: High Availability Network
int_private_net_id:
type: string
description: Private network
int_private_subnet_id:
type: string
description: Private network subnet
# Server Inputs: Loadbalancer
lb_names:
type: comma_delimited_list
description: Load Balancer Names
lb_image_name:
type: string
description: Loadbalancer VM Image
lb_flavor_name:
type: string
description: Loadbalancer VM Flavor
lb_ha_floating_ip:
type: string
description: Floating HA IP for LB
lb_ha_floating_v6_ip:
type: string
description: Floating HA IP for LB
# Server Inputs: Services
svc_0_names:
type: comma_delimited_list
description: Service VM Names
svc_1_names:
type: comma_delimited_list
description: Service VM Names
svc_2_names:
type: comma_delimited_list
description: Service VM Names
svc_image_name:
type: string
description: Service VM Image
svc_flavor_name:
type: string
description: Service VM Flavor
svc_count:
type: number
description: Number of instances of Service to create
resources:
lb_server_1:
type: OS::Nova::Server
properties:
image: { get_param: lb_image_name }
flavor: { get_param: lb_flavor_name }
name: { get_param: [lb_names, {get_param: vf_module_index}] }
metadata:
vnf_id: { get_param: vnf_id }
vf_module_id: { get_param: vf_module_id }
vf_module_index: { get_param: vf_module_index }
vnf_name: { get_param: vnf_name }
workload_context: { get_param: workload_context }
environment_context: { get_param: environment_context }
networks:
- port: { get_resource: lb_1_int_private_port_0 }
- port: { get_resource: lb_1_ha_port_0 }
user_data: { get_file: user.data }
availability_zone: { get_param: availability_zone_0 }
lb_1_ha_port_0:
type: OS::Neutron::Port
properties:
network: { get_param: ha_net_id }
allowed_address_pairs:
- ip_address: {get_param: lb_ha_floating_ip }
- ip_address: {get_param: lb_ha_floating_v6_ip }
lb_1_int_private_port_0:
type: OS::Neutron::Port
properties:
network: { get_param: int_private_net_id }
fixed_ips:
- subnet_id: { get_param: int_private_subnet_id }
svc_resource_group_1:
type: OS::Heat::ResourceGroup
properties:
count: { get_param: svc_count }
resource_def:
type: nested_svc.yaml
properties:
workload_context: {get_param: workload_context}
environment_context: {get_param: environment_context}
vnf_id: {get_param: vnf_id}
vf_module_id: {get_param: vf_module_id}
vnf_name: {get_param: vnf_name}
availability_zone_0: {get_param: availability_zone_0}
svc_names:
- {get_param: [svc_0_names, {get_param: vf_module_index}]}
- {get_param: [svc_1_names, {get_param: vf_module_index}]}
- {get_param: [svc_2_names, {get_param: vf_module_index}]}
svc_image_name: {get_param: svc_image_name}
svc_flavor_name: {get_param: svc_flavor_name}
int_private_net_id: {get_param: int_private_net_id}
int_private_subnet_id: {get_param: int_private_subnet_id}
index: "%index%"
|