1 heat_template_version: 2015-04-30
3 description: Pronghorn Openstack Heat Template for Mongo DB
7 # server group and index
10 label: Server Group ID
11 description: ID of the server group
14 label: Deployment Timeout
15 description: Timeout before declaring the stack deployment as failed.
18 - range: { min: 60, max: 3600 }
25 description: Unique ID for this VF instance
29 description: Unique ID for this VF Module instance
33 description: VM Role for the db vms
40 label: Availability Zone
41 description: Name of the availability zone for this server
45 # database server networks, ips and hostnames
48 label: Database Hostname
49 description: Hostname of the database servers
52 label: OAM Network Name
53 description: Name of the oam network
56 label: OAM IP Addresse
57 description: OAM IP Address of the database servers
61 # database common server info (flavor, image, keypair)
65 description: Flavor to be used for the server
69 description: Image to be used for the server
73 description: Name of the security key for the server
80 label: Security Group IDs
81 description: IDs of the security groups for the server
82 type: comma_delimited_list
88 label: Data Volume IDs for disk 0
89 description: IDs to be used for the database volume
92 label: Data Volume IDs for disk 1
93 description: IDs to be used for the database volume
96 label: Data Volume IDs for disk 2
97 description: IDs to be used for the database volume
100 label: Data Volume IDs for disk 3
101 description: IDs to be used for the database volume
107 # setup wait condition and handler for heat
110 type: OS::Heat::WaitCondition
112 handle: {get_resource: wait_handle}
113 timeout: {get_param: deploy_timeout }
116 type: OS::Heat::WaitConditionHandle
119 # software configuration
122 type: OS::Heat::SoftwareConfig
128 wc_notify: { get_attr: ['wait_handle', 'curl_cli'] }
131 echo "sending completion notification to heat"
132 wc_notify --data-binary '{"status":"SUCCESS"}'
135 type: OS::Heat::MultipartMime
138 - config: { get_resource: db_config_complete }
141 # create the database server
144 type: OS::Nova::Server
146 name: { get_param: db_name }
147 availability_zone: { get_param: availability_zone_0 }
149 group: { get_param: server_group_id }
150 flavor: { get_param: db_flavor_name }
151 image: { get_param: db_image_name }
152 key_name: { get_param: keypair_id }
153 security_groups: { get_param: security_group_ids }
155 vnf_id: { get_param: vnf_id }
156 vf_module_id: { get_param: vf_module_id }
157 vm_role: { get_param: vm_role }
159 - network: { get_param: oam_net_name }
160 fixed_ip: { get_param: db_oam_ip_0 }
161 user_data_format: RAW
162 #user_data: { get_resource: db_config }
166 wc_notify: { get_attr: ['wait_handle', 'curl_cli'] }
173 ) | passwd --stdin root
174 wc_notify --data-binary '{"status":"SUCCESS"}'
177 # attach the data volumes to the server
179 db_volume_attachment_0:
180 type: OS::Cinder::VolumeAttachment
182 instance_uuid: { get_resource: db_server_0 }
183 volume_id: { get_param: db_volume_id_0 }
184 db_volume_attachment_1:
185 type: OS::Cinder::VolumeAttachment
187 instance_uuid: { get_resource: db_server_0 }
188 volume_id: { get_param: db_volume_id_1 }
189 db_volume_attachment_2:
190 type: OS::Cinder::VolumeAttachment
192 instance_uuid: { get_resource: db_server_0 }
193 volume_id: { get_param: db_volume_id_2 }
194 db_volume_attachment_3:
195 type: OS::Cinder::VolumeAttachment
197 instance_uuid: { get_resource: db_server_0 }
198 volume_id: { get_param: db_volume_id_3 }
203 # No outputs as the base_pronghorn is the only VNF component