1 # Project Clearwater - IMS in the Cloud
2 # Copyright (C) 2015 Metaswitch Networks Ltd
4 # This program is free software: you can redistribute it and/or modify it
5 # under the terms of the GNU General Public License as published by the
6 # Free Software Foundation, either version 3 of the License, or (at your
7 # option) any later version, along with the "Special Exception" for use of
8 # the program along with SSL, set forth below. This program is distributed
9 # in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10 # without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 # A PARTICULAR PURPOSE. See the GNU General Public License for more
12 # details. You should have received a copy of the GNU General Public
13 # License along with this program. If not, see
14 # <http://www.gnu.org/licenses/>.
16 # The author can be reached by email at clearwater@metaswitch.com or by
17 # post at Metaswitch Networks Ltd, 100 Church St, Enfield EN2 6BQ, UK
20 # Metaswitch Networks Ltd grants you permission to copy, modify,
21 # propagate, and distribute a work formed by combining OpenSSL with The
22 # Software, or a work derivative of such a combination, even if such
23 # copying, modification, propagation, or distribution would otherwise
24 # violate the terms of the GPL. You must comply with the GPL in all
25 # respects for all of the code used other than OpenSSL.
26 # "OpenSSL" means OpenSSL toolkit software distributed by the OpenSSL
27 # Project and licensed under the OpenSSL Licenses, or a work based on such
28 # software and licensed under the OpenSSL Licenses.
29 # "OpenSSL Licenses" means the OpenSSL License and Original SSLeay License
30 # under which the OpenSSL Project distributes the OpenSSL toolkit software,
31 # as those licenses appear in the file LICENSE-OPENSSL.
33 heat_template_version: 2015-04-30
36 Base Project Clearwater Nazgul deployment on ONAP (Open Network Automation Platform)
39 # Metadata required by ONAP
43 description: Unique name for this VNF instance
47 description: The VNF ID provided by ONAP
51 description: The VNF module ID provided by ONAP
53 # flavor parameters, naming required by ONAP
56 description: VM flavor for bono VMs
58 - custom_constraint: nova.flavor
59 description: Must be a valid flavor name
62 description: VM flavor for sprout VMs
64 - custom_constraint: nova.flavor
65 description: Must be a valid flavor name
68 description: VM flavor for homestead VMs
70 - custom_constraint: nova.flavor
71 description: Must be a valid flavor name
74 description: VM flavor for homer VMs
76 - custom_constraint: nova.flavor
77 description: Must be a valid flavor name
80 description: VM flavor for dime VMs
82 - custom_constraint: nova.flavor
83 description: Must be a valid flavor name
86 description: VM flavor for ellis VM
88 - custom_constraint: nova.flavor
89 description: Must be a valid flavor name
92 description: VM flavor for dns VM
94 - custom_constraint: nova.flavor
95 description: Must be a valid flavor name
98 description: VM flavor for robot_test VM
100 - custom_constraint: nova.flavor
101 description: Must be a valid flavor name
103 # image parameters, naming required by ONAP
106 description: Name of image for bono VMs
109 description: Name of image for sprout VMs
112 description: Name of image for homestead VMs
115 description: Name of image for homer VMs
118 description: Name of image for dime VMs
121 description: Name of image for ellis VM
124 description: Name of image for dns VMs
127 description: Name of image for robot_test VMs
129 # overall clearwater parameters, naming required by ONAP
132 label: openSSH Key name
133 description: openSSH key name
137 description: Public key to be installed on the compute instance
140 description: URL for Clearwater repository
143 description: DNS zone
146 description: First directory number in pool
148 - allowed_pattern: "[0-9]+"
149 description: Must be numeric
152 description: Number of directory numbers to add to pool
154 - allowed_pattern: "[0-9]+"
155 description: Must be numeric
158 description: DNSSEC private key (Base64-encoded)
160 - allowed_pattern: "[0-9A-Za-z+/=]+"
161 description: Must be Base64-encoded
165 description: The VM name
168 description: The VM name
171 description: The VM name
174 description: The VM name
177 description: The VM name
180 description: The VM name
183 description: The VM name
186 # Network parameters, naming required by ONAP
187 admin_plane_net_name:
189 label: external management network
190 description: The external management network
195 clearwater_random_str:
196 type: OS::Heat::RandomString
200 clearwater_instantiated_key_name:
201 type: OS::Nova::KeyPair
205 template: pre_base_rand
208 base: { get_param: vnf_name }
209 rand: { get_resource: clearwater_random_str }
210 public_key: { get_param: clearwater_pub_key }
211 save_private_key: false
216 vnf_id: { get_param: vnf_id }
217 vf_module_id: { get_param: vf_module_id }
218 vnf_name: { get_param: vnf_name }
219 public_net_id: { get_param: admin_plane_net_name }
220 dns_flavor_name: { get_param: dns_flavor_name }
221 dns_image_name: { get_param: dns_image_name }
222 key_name: { get_resource: clearwater_instantiated_key_name }
223 zone: { get_param: zone }
224 dnssec_key: { get_param: dnssec_key }
225 dns_name_0: { get_param: dns_name_0 }
231 vnf_id: { get_param: vnf_id }
232 vf_module_id: { get_param: vf_module_id }
233 vnf_name: { get_param: vnf_name }
234 public_net_id: { get_param: admin_plane_net_name }
235 ellis_flavor_name: { get_param: ellis_flavor_name }
236 ellis_image_name: { get_param: ellis_image_name }
237 key_name: { get_resource: clearwater_instantiated_key_name }
238 repo_url: { get_param: repo_url }
239 zone: { get_param: zone }
240 dn_range_start: { get_param: dn_range_start }
241 dn_range_length: { get_param: dn_range_length }
242 dns_ip: { get_attr: [ dns, dns_ip ] }
243 dnssec_key: { get_param: dnssec_key }
244 etcd_ip: "" #for ellis etcd_ip is empty
245 ellis_name_0: { get_param: ellis_name_0 }
250 vnf_id: { get_param: vnf_id }
251 vf_module_id: { get_param: vf_module_id }
252 vnf_name: { get_param: vnf_name }
253 public_net_id: { get_param: admin_plane_net_name }
254 bono_flavor_name: { get_param: bono_flavor_name }
255 bono_image_name: { get_param: bono_image_name }
256 key_name: { get_resource: clearwater_instantiated_key_name }
257 repo_url: { get_param: repo_url }
258 zone: { get_param: zone }
259 dns_ip: { get_attr: [ dns, dns_ip ] }
260 dnssec_key: { get_param: dnssec_key }
261 etcd_ip: { get_attr: [ ellis, ellis_ip ] }
262 bono_name_0: { get_param: bono_name_0 }
267 vnf_id: { get_param: vnf_id }
268 vf_module_id: { get_param: vf_module_id }
269 vnf_name: { get_param: vnf_name }
270 public_net_id: { get_param: admin_plane_net_name }
271 sprout_flavor_name: { get_param: sprout_flavor_name }
272 sprout_image_name: { get_param: sprout_image_name }
273 key_name: { get_resource: clearwater_instantiated_key_name }
274 repo_url: { get_param: repo_url }
275 zone: { get_param: zone }
276 dns_ip: { get_attr: [ dns, dns_ip ] }
277 dnssec_key: { get_param: dnssec_key }
278 etcd_ip: { get_attr: [ ellis, ellis_ip ] }
279 sprout_name_0: { get_param: sprout_name_0 }
285 vnf_id: { get_param: vnf_id }
286 vf_module_id: { get_param: vf_module_id }
287 vnf_name: { get_param: vnf_name }
288 public_net_id: { get_param: admin_plane_net_name }
289 homer_flavor_name: { get_param: homer_flavor_name }
290 homer_image_name: { get_param: homer_image_name }
291 key_name: { get_resource: clearwater_instantiated_key_name }
292 repo_url: { get_param: repo_url }
293 zone: { get_param: zone }
294 dns_ip: { get_attr: [ dns, dns_ip ] }
295 dnssec_key: { get_param: dnssec_key }
296 etcd_ip: { get_attr: [ ellis, ellis_ip ] }
297 homer_name_0: { get_param: homer_name_0 }
302 vnf_id: { get_param: vnf_id }
303 vf_module_id: { get_param: vf_module_id }
304 vnf_name: { get_param: vnf_name }
305 public_net_id: { get_param: admin_plane_net_name }
306 vellum_flavor_name: { get_param: vellum_flavor_name }
307 vellum_image_name: { get_param: vellum_image_name }
308 key_name: { get_resource: clearwater_instantiated_key_name }
309 repo_url: { get_param: repo_url }
310 zone: { get_param: zone }
311 dns_ip: { get_attr: [ dns, dns_ip ] }
312 dnssec_key: { get_param: dnssec_key }
313 etcd_ip: { get_attr: [ ellis, ellis_ip ] }
314 vellum_name_0: { get_param: vellum_name_0 }
319 vnf_id: { get_param: vnf_id }
320 vf_module_id: { get_param: vf_module_id }
321 vnf_name: { get_param: vnf_name }
322 public_net_id: { get_param: admin_plane_net_name }
323 dime_flavor_name: { get_param: dime_flavor_name }
324 dime_image_name: { get_param: dime_image_name }
325 key_name: { get_resource: clearwater_instantiated_key_name }
326 repo_url: { get_param: repo_url }
327 zone: { get_param: zone }
328 dns_ip: { get_attr: [ dns, dns_ip ] }
329 dnssec_key: { get_param: dnssec_key }
330 etcd_ip: { get_attr: [ ellis, ellis_ip ] }
331 dime_name_0: { get_param: dime_name_0 }
333 robot_0_security_group:
334 type: OS::Neutron::SecurityGroup
336 description: security group
339 template: pre_base_rand
342 base: { get_param: vnf_name }
343 rand: { get_resource: clearwater_random_str }
345 {remote_ip_prefix: 0.0.0.0/0, protocol: tcp, port_range_min: 22, port_range_max: 22},
346 {remote_ip_prefix: 0.0.0.0/0, protocol: udp, port_range_min: 161, port_range_max: 162},
347 {remote_ip_prefix: 0.0.0.0/0, protocol: tcp, port_range_min: 2380, port_range_max: 2380},
348 {remote_ip_prefix: 0.0.0.0/0, protocol: tcp, port_range_min: 4000, port_range_max: 4000},
349 {remote_ip_prefix: 0.0.0.0/0, protocol: tcp, port_range_min: 443, port_range_max: 443},
350 {remote_ip_prefix: 0.0.0.0/0, protocol: icmp}]
352 robot_0_admin_plane_port_0:
353 type: OS::Neutron::Port
357 template: pre_base_rand
360 base: { get_param: vnf_name }
361 rand: { get_resource: clearwater_random_str }
362 network: { get_param: admin_plane_net_name }
363 security_groups: [{ get_resource: robot_0_security_group }]
366 type: OS::Nova::Server
370 template: pre_base_rand
373 base: { get_param: vnf_name }
374 rand: { get_resource: clearwater_random_str }
375 flavor: { get_param: robot_flavor_name }
376 image: { get_param: robot_image_name }
377 key_name: { get_resource: clearwater_instantiated_key_name }
379 - port: { get_resource: robot_0_admin_plane_port_0 }
380 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }, vnf_name: { get_param: vnf_name }}
381 user_data_format: RAW
385 __zone__: { get_param: zone }
386 __DNS_IP_ADDR__: { get_attr: [ dns, dns_ip ] }
394 ## install 'clearwater-live-test' in ubuntu home directory
395 ## without this all is installed in root dir
396 mkdir /home/ubuntu -p
400 sudo apt-get install build-essential git --yes
401 curl -sSL https://rvm.io/mpapis.asc | gpg --import -
402 curl -L https://get.rvm.io | bash -s stable
403 source /etc/profile.d/rvm.sh
408 git config --global url."https://".insteadOf git://
409 git config --global url."https://github.com/Metaswitch".insteadOf "git@github.com:Metaswitch"
410 git clone -b stable https://github.com/Metaswitch/clearwater-live-test.git --recursive
411 cd clearwater-live-test
412 sudo apt-get install bundler --yes
416 echo "nameserver __DNS_IP_ADDR__" >> /etc/resolvconf/resolv.conf.d/head
419 echo "To start live-test run: rake test[__zone__] SIGNUP_CODE=secret"
421 #rake test[vimstest.onap.org] SIGNUP_CODE=secret PROXY=84.39.37.62 ELLIS=84.39.34.60