blob: c4f3fdb170fd7a1e7d1c90dec72b87dc09379924 (
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
|
heat_template_version: 2015-04-30
description: Pronghorn Openstack Heat Template for the Application Server
parameters:
###
# server group and index
###
server_group_id:
label: Server Group ID
description: ID of the server group
type: string
deploy_timeout:
label: Deployment Timeout
description: Timeout before declaring the stack deployment as failed.
type: number
constraints:
- range: { min: 60, max: 3600 }
###
# vnf info
###
vnf_id:
label: VNF ID
description: Unique ID for this VF instance
type: string
vf_module_id:
label: VF Module ID
description: Unique ID for this VF Module instance
type: string
vm_role:
label: App VM Role
description: VM Role for the application vms
type: string
###
# availability zone
###
availability_zone_0:
label: Availability Zone
description: Name of the availability zone for this server
type: string
###
# application server networks, ips and hostnames
###
app_name:
label: Application Hostnames
description: Hostnames of the application servers
type: string
oam_net_name:
label: OAM Network Name
description: Name of the oam network
type: string
app_oam_ip_0:
label: OAM IP Addresses
description: OAM IP Addresses of the application servers
type: string
###
# application common server info (flavor, image, keypair)
###
app_flavor_name:
label: Flavor
description: Flavor to be used for the server
type: string
app_image_name:
label: Image
description: Image to be used for the server
type: string
keypair_id:
label: Key Name
description: Name of the security key for the server
type: string
###
# security groups
###
security_group_ids:
label: Security Group IDs
description: IDs of the security groups for the server
type: comma_delimited_list
resources:
###
# software deployment wait conditions
###
wait_condition:
type: OS::Heat::WaitCondition
properties:
handle: { get_resource: wait_handle }
timeout: { get_param: deploy_timeout }
wait_handle:
type: OS::Heat::WaitConditionHandle
###
# create the application server
###
app_server_0:
type: OS::Nova::Server
properties:
name: { get_attr: [wait_condition, att1] }
availability_zone: { get_param: availability_zone_0 }
scheduler_hints:
group: { get_param: server_group_id }
key_name: { get_param: keypair_id }
flavor: { get_param: app_flavor_name }
image: { get_param: app_image_name }
security_groups: { get_param: security_group_ids }
metadata:
vnf_id: { get_param: vnf_id }
vf_module_id: { get_param: vf_module_id }
vm_role: { get_param: vm_role }
networks:
- network: { get_param: oam_net_name }
fixed_ip: { get_param: app_oam_ip_0 }
user_data_format: RAW
user_data:
str_replace:
params:
wc_notify: { get_attr: ['wait_handle', 'curl_cli'] }
template: |
#!/bin/bash
ROOT_PW="dan1tom2"
(
echo "$ROOT_PW"
echo "$ROOT_PW"
) | passwd --stdin root
wc_notify --data-binary '{"status":"SUCCESS"}'
outputs:
###
# No outputs as the base_pronghorn is the only VNF component
###
|