blob: 02660dc5ed70cbf9c0594627ce00479e7646423e (
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
|
heat_template_version: 2015-04-30
#################################
# Author: Dmitry Orzhehovsky
# Email: dorzheho@cisco.com
#################################
description: >
The template intended for deploying vSON VM instance.
parameters:
instance_index:
type: number
label: Instance Index
description: Index of the instance.
vnf_name:
type: string
label: VF name
description: Unique name for this VF instance.
vnf_id:
type: string
label: VF ID
description: Unique ID for this VF instance.
vf_module_name:
type: string
label: VF module name
description: Unique name for this VF module instance.
vf_module_id:
type: string
label: VF module ID
description: Unique ID for this VF Module instance
vfc_role:
type: string
label: VF module ID
description: Unique ID for this VF Module instance
oam_net_id:
type: string
label: OAM network ID
description: The ID of the OAM network.
oam_net_subnet_prefix_length:
type: string
label: OAM net subnet prefix length
description: Prefix length of the subnet on the OAM network.
default_gateway:
type: string
label: Default gateway
description: Default gateway.
dns_servers:
type: comma_delimited_list
label: DNS servers
description: List of DNS servers.
ntp_servers:
type: comma_delimited_list
label: NTP servers
description: List of NTP servers.
oam_net_security_group_id:
type: string
label: OAM network security group ID
description: >
The ID of Security group applied on the port
bound to the vSON OAM network.
volume_ids:
type: comma_delimited_list
label: Volumes IDs
description: List of Volumes IDs.
availability_zones:
type: comma_delimited_list
label: Availability zones
description: List of availability zones.
vson_server_group_id:
type: string
label: vSON server group ID
description: >
Tells what policy should be applied to the ServerGroup.
Affinity policy will force instances to share the same hypervisor.
Anti-affinity will force instances to run in different hypervisors.
vson_vm_names:
type: comma_delimited_list
label: vSON Cluster leader names
description: A list of unique names to be issued to the vSON Cluster leaders.
oam_net_ips:
type: comma_delimited_list
label: vSON OAM network IP addresses
description: Fixed IP assignments for vSON instances on the OAM network.
vson_vm_image_name:
type: string
label: vSON base VM image name
description: VM Image name the vSON instance will be created from.
vson_vm_flavor_name:
type: string
label: Flavor name
description: The ID or name of the flavor to boot onto.
vson_dc_unit:
type: string
label: vSON Data Center name
description: Name of the vSON Data Center.
vson_clm_oam_net_ip:
type: string
label: vSON Cluster Manager IP
description: IP of the vSON Cluster Manager.
vson_join_cluster_auth_token:
type: string
label: vSON join cluster auth token
description: >
Authentication Token generated for the user permitted to add
a new Datacenter/vSON member to existing vSON Cluster.
swift_account_auth_token:
type: string
label: Swift account auth token
description: >
Swift account auth token.
Example: 041a5187bb4641f9b89583e2539776b0
resources:
wait_condition:
type: OS::Heat::SwiftSignal
properties:
handle: {get_resource: wait_handle}
count: 1
timeout: 800
wait_handle:
type: OS::Heat::SwiftSignalHandle
# vSON server OAM network port
vson_server_oam_net_port_00:
type: OS::Neutron::Port
properties:
name:
str_replace:
template: VNF_NAME_VNF_ID_SERVER_NAME_oam_net_port_0
params:
VNF_NAME: {get_param: vnf_name}
VNF_ID: {get_param: vnf_id}
SERVER_NAME: {get_param: [vson_vm_names, {get_param: instance_index}]}
network_id: {get_param: oam_net_id}
fixed_ips:
- ip_address: {get_param: [oam_net_ips, {get_param: instance_index}]}
security_groups:
- {get_param: oam_net_security_group_id}
# Attach Cinder volume to the server
vson_server_volume_attach_1:
type: OS::Cinder::VolumeAttachment
depends_on: vson_server_2
properties:
instance_uuid: {get_resource: vson_server_2}
volume_id: {get_param: [volume_ids, {get_param: instance_index}]}
# Create vSON server
vson_server_2:
type: OS::Nova::Server
depends_on: [vson_server_oam_net_port_00]
properties:
name: {get_param: [vson_vm_names, {get_param: instance_index}]}
availability_zone: {get_param: [availability_zones, {get_param: instance_index}]}
image: {get_param: vson_vm_image_name}
flavor: {get_param: vson_vm_flavor_name}
config_drive: True
metadata:
vnf_name: {get_param: vnf_name}
vnf_id: {get_param: vnf_id}
vf_module_name: {get_param: vf_module_name}
vf_module_id: {get_param: vf_module_id}
vm_role: {get_param: vfc_role}
networks:
- port: {get_resource: vson_server_oam_net_port_00}
scheduler_hints:
group: {get_param: vson_server_group_id}
user_data_format: RAW
user_data:
str_replace:
template: {get_file: deploy.sh}
params:
$HOT_INSTANCE_INDEX: {get_param: instance_index}
$HOT_VOLUME_ID: {get_param: [volume_ids, {get_param: instance_index}]}
$HOT_VOLUME_ATTACH: "False"
$HOT_VFC_ROLE: {get_param: vfc_role}
$HOT_CLM_SERVER_IP: {get_param: vson_clm_oam_net_ip}
$HOT_THIS_INSTANCE_OAM_NET_IP: {get_param: [oam_net_ips, {get_param: instance_index}]}
$HOT_THIS_INSTANCE_OAM_NET_PREFIX: {get_param: oam_net_subnet_prefix_length}
$HOT_THIS_INSTANCE_DEFAULT_GATEWAY: {get_param: default_gateway}
$HOT_DNS_SERVERS: {list_join: [',', {get_param: dns_servers}]}
$HOT_DC_NAME: {get_param: vson_dc_unit}
$HOT_NTP_SERVERS: {list_join: [' ', {get_param: ntp_servers}]}
$HOT_SWIFT_AUTH_TOKEN: {get_param: swift_account_auth_token}
$HOT_VSON_JOIN_CLUSTER_AUTH_TOKEN: {get_param: vson_join_cluster_auth_token}
$HOT_WC_NOTIFY: { get_attr: ['wait_handle', 'curl_cli'] }
|