name alignment
[demo.git] / heat / ONAP / onap_openstack_nofloat.yaml
1 ##########################################################################
2 #
3 #==================LICENSE_START==========================================
4
5 #
6 # Copyright © 2017 AT&T Intellectual Property. All rights reserved.
7 #
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
11 #        http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 #
19 #==================LICENSE_END============================================
20 #
21 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
22 #
23 ##########################################################################
24
25 heat_template_version: 2013-05-23
26
27 description: Heat template to install ONAP components
28
29 ##############
30 #            #
31 # PARAMETERS #
32 #            #
33 ##############
34
35 parameters:
36
37   ##############################################
38   #                                            #
39   # Parameters used across all ONAP components #
40   #                                            #
41   ##############################################
42   
43   public_net_id:
44     type: string
45     description: Public network for floating IP address allocation
46
47   ubuntu_1404_image:
48     type: string
49     description: Name of the Ubuntu 14.04 image
50
51   ubuntu_1604_image:
52     type: string
53     description: Name of the Ubuntu 16.04 image
54
55   flavor_small:
56     type: string
57     description: Name of the Small Flavor supported by the cloud provider
58
59   flavor_medium:
60     type: string
61     description: Name of the Medium Flavor supported by the cloud provider
62
63   flavor_large:
64     type: string
65     description: Name of the Large Flavor supported by the cloud provider
66
67   flavor_xlarge:
68     type: string
69     description: Name of the Extra Large Flavor supported by the cloud provider
70
71   vm_base_name:
72     type: string
73     description: Base name of ONAP VMs
74
75   key_name:
76     type: string
77     description: Public/Private key pair name
78
79   pub_key:
80     type: string
81     description: Public key to be installed on the compute instance
82
83   nexus_repo:
84     type: string
85     description: Complete URL for the Nexus repository.
86
87   nexus_docker_repo:
88     type: string
89     description: Complete URL for the Nexus repository for docker images.
90
91   nexus_username:
92     type: string
93     description: Nexus Repository username
94
95   nexus_password:
96     type: string
97     description: Nexus Repository Password
98
99   artifacts_version:
100     type: string
101     description: Artifacts version of ONAP components
102
103   docker_version:
104     type: string
105     label: Version number of ONAP docker images
106
107   gerrit_branch:
108     type: string
109     label: Gerrit code branch
110     description: Gerrit branch where to download the code from
111
112   dmaap_topic:
113     type: string
114     description: DMaaP Topic name
115
116   openstack_tenant_id:
117     type: string
118     description: Openstack tenant ID
119
120   openstack_username:
121     type: string
122     description: Openstack username
123
124   openstack_auth_method:
125     type: string
126     description: Openstack authentication method (password VS. api-key)
127
128   openstack_api_key:
129     type: string
130     description: Openstack API Key
131
132   horizon_url:
133     type: string
134     description: URL of Openstack Horizon
135
136   keystone_url:
137     type: string
138     description: URL of Openstack Keystone
139
140   cloud_env:
141     type: string
142     description: Cloud Provider Name
143
144   ######################
145   #                    #
146   # Network parameters #
147   #                    #
148   ######################
149
150   external_dns:
151     type: string
152     description: External DNS for OAM ONAP network
153
154   ### Private IP addresses ###
155   oam_network_cidr:
156     type: string
157     description: CIDR of the OAM ONAP network
158
159   aai1_ip_addr:
160     type: string
161     description: AAI Instance 1 IP Address
162
163   aai2_ip_addr:
164     type: string
165     description: AAI Instance 2 IP Address
166
167   appc_ip_addr:
168     type: string
169     description: APP-C IP Address
170
171   dcae_ip_addr:
172     type: string
173     description: DCAE IP Address
174  
175   dcae_coll_ip_addr:
176     type: string
177     description: DCAE Collector IP Address
178
179   dcae_db_ip_addr:
180     type: string
181     description: DCAE Database IP Address
182
183   dcae_hdp1_ip_addr:
184     type: string
185     description: Hadoop VM1 IP Address
186
187   dcae_hdp2_ip_addr:
188     type: string
189     description: Hadoop VM2 IP Address
190
191   dcae_hdp3_ip_addr:
192     type: string
193     description: Hadoop VM3 IP Address
194
195   dns_ip_addr:
196     type: string
197     description: DNS IP Address
198
199   mso_ip_addr:
200     type: string
201     description: MSO IP Address
202
203   mr_ip_addr:
204     type: string
205     description: Message Router IP Address
206
207   policy_ip_addr:
208     type: string
209     description: Policy Engine IP Address
210
211   portal_ip_addr:
212     type: string
213     description: Portal IP Address
214
215   robot_ip_addr:
216     type: string
217     description: Robot Framework IP Address
218
219   sdc_ip_addr:
220     type: string
221     description: SDC IP Address
222
223   sdnc_ip_addr:
224     type: string
225     description: SDN-C IP Address
226
227   vid_ip_addr:
228     type: string
229     description: VID IP Address
230
231   clamp_ip_addr:
232     type: string
233     description: CLAMP IP Address
234
235
236   ###########################
237   #                         #
238   # Parameters used by DCAE #
239   #                         #
240   ###########################
241
242   dcae_base_environment:
243     type: string
244     description: DCAE Base Environment configuration (RACKSPACE/2-NIC/1-NIC-FLOATING-IPS)
245
246   dcae_zone:
247     type: string
248     description: DCAE Zone to use in VM names created by DCAE controller
249
250   dcae_state:
251     type: string
252     description: DCAE State to use in VM names created by DCAE controller
253
254   nexus_repo_root:
255     type: string
256     description: Root URL of Nexus repository
257
258   nexus_url_snapshot:
259     type: string
260     description: Snapshot of Maven repository for DCAE deployment
261
262   openstack_region:
263     type: string
264     description: Region where the DCAE controller will spin the VMs
265
266   gitlab_branch:
267     type: string
268     description: Branch of the Gitlab repository
269     
270   dcae_code_version:
271     type: string
272     description: DCAE Code Version Number
273
274   #####################
275   #                   #
276   # ONAP repositories #
277   #                   #
278   #####################
279
280   aai_repo:
281     type: string
282     description: AAI repository
283
284   appc_repo:
285     type: string
286     description: APPC repository
287
288   dcae_repo:
289     type: string
290     description: DCAE repository
291
292   mr_repo:
293     type: string
294     description: Message Router repository
295
296   mso_repo:
297     type: string
298     description: MSO repository
299
300   policy_repo:
301     type: string
302     description: Policy repository
303
304   portal_repo:
305     type: string
306     description: Portal repository
307
308   robot_repo:
309     type: string
310     description: Robot repository
311
312   sdc_repo:
313     type: string
314     description: SDC repository
315
316   sdnc_repo:
317     type: string
318     description: SDNC repository
319
320   vid_repo:
321     type: string
322     description: VID repository
323
324   clamp_repo:
325     type: string
326     description: CLAMP repository
327
328
329 #############
330 #           #
331 # RESOURCES #
332 #           #
333 #############
334
335 resources:
336   random-str:
337     type: OS::Heat::RandomString
338     properties:
339       length: 4
340
341
342   # Public key used to access ONAP components
343   vm_key:
344     type: OS::Nova::KeyPair
345     properties:
346       name:
347         str_replace:
348           template: base_rand
349           params:
350             base: { get_param: key_name }
351             rand: { get_resource: random-str }
352       public_key: { get_param: pub_key }
353       save_private_key: false
354
355
356   # ONAP management private network
357   oam_onap:
358     type: OS::Neutron::Net
359     properties:
360       name:
361         str_replace:
362           template: oam_onap_rand
363           params:
364             rand: { get_resource: random-str }
365
366   oam_onap_subnet:
367     type: OS::Neutron::Subnet
368     properties:
369       name:
370         str_replace:
371           template: oam_onap_rand
372           params:
373             rand: { get_resource: random-str }
374       network_id: { get_resource: oam_onap }
375       cidr: { get_param: oam_network_cidr }
376
377
378   # DNS Server instantiation
379   dns_private_port:
380     type: OS::Neutron::Port
381     properties:
382       network: { get_resource: oam_onap }
383       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dns_ip_addr }}]
384
385   dns_vm:
386     type: OS::Nova::Server
387     properties:
388       image: { get_param: ubuntu_1404_image }
389       flavor: { get_param: flavor_small }
390       name:
391         str_replace:
392           template: base-dns-server
393           params:
394             base: { get_param: vm_base_name }
395       key_name: { get_resource: vm_key }
396       networks:
397         - network: { get_param: public_net_id }
398         - port: { get_resource: dns_private_port }
399       user_data_format: RAW
400       user_data:
401         str_replace:
402           params:
403             __nexus_repo__: { get_param: nexus_repo }
404             __artifacts_version__: { get_param: artifacts_version }
405             __oam_network_cidr__: { get_param: oam_network_cidr }
406             __dns_ip_addr__: { get_param: dns_ip_addr }
407             __aai1_ip_addr__: { get_param: aai1_ip_addr }
408             __aai2_ip_addr__: { get_param: aai2_ip_addr }
409             __appc_ip_addr__: { get_param: appc_ip_addr }
410             __dcae_ip_addr__: { get_param: dcae_ip_addr }
411             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
412             __mso_ip_addr__: { get_param: mso_ip_addr }
413             __mr_ip_addr__: { get_param: mr_ip_addr }
414             __policy_ip_addr__: { get_param: policy_ip_addr }
415             __portal_ip_addr__: { get_param: portal_ip_addr }
416             __robot_ip_addr__: { get_param: robot_ip_addr }
417             __sdc_ip_addr__: { get_param: sdc_ip_addr }
418             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
419             __vid_ip_addr__: { get_param: vid_ip_addr }
420             __clamp_ip_addr__: { get_param: clamp_ip_addr }
421             __cloud_env__: { get_param: cloud_env }
422             __external_dns__: { get_param: external_dns }
423           template: |
424             #!/bin/bash
425
426             # Create configuration files
427             mkdir -p /opt/config
428             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
429             echo "__cloud_env__" > /opt/config/cloud_env.txt
430             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
431             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
432             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
433             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
434             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
435             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
436             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
437             echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
438             echo "__mso_ip_addr__" > /opt/config/mso_ip_addr.txt
439             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
440             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
441             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
442             echo "__robot_ip_addr__" > /opt/config/robot_ip_addr.txt
443             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
444             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
445             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
446             echo "__clamp_ip_addr__" > /opt/config/clamp_ip_addr.txt
447             echo "__external_dns__" > /opt/config/external_dns.txt
448
449             # Download and run install script
450             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dns_install.sh -o /opt/dns_install.sh
451             cd /opt
452             chmod +x dns_install.sh
453             ./dns_install.sh
454
455
456   # A&AI instantiation (2 VMs)
457   aai1_private_port:
458     type: OS::Neutron::Port
459     properties:
460       network: { get_resource: oam_onap }
461       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai1_ip_addr }}]
462
463   aai1_vm:
464     type: OS::Nova::Server
465     depends_on: aai2_vm
466     properties:
467       image: { get_param: ubuntu_1404_image }
468       flavor: { get_param: flavor_xlarge }
469       name:
470         str_replace:
471           template: base-aai-inst1
472           params:
473             base: { get_param: vm_base_name }      
474       key_name: { get_resource: vm_key }
475       networks:
476         - network: { get_param: public_net_id }
477         - port: { get_resource: aai1_private_port }
478       user_data_format: RAW
479       user_data:
480         str_replace:
481           params:
482             __nexus_repo__: { get_param: nexus_repo }
483             __nexus_docker_repo__: { get_param: nexus_docker_repo }
484             __nexus_username__: { get_param: nexus_username }
485             __nexus_password__: { get_param: nexus_password }
486             __dmaap_topic__: { get_param: dmaap_topic }
487             __artifacts_version__: { get_param: artifacts_version }
488             __dns_ip_addr__: { get_param: dns_ip_addr }
489             __aai_ip_addr__: { get_param: aai1_ip_addr }
490             __oam_network_cidr__: { get_param: oam_network_cidr }
491             __docker_version__: { get_param: docker_version }
492             __gerrit_branch__: { get_param: gerrit_branch }
493             __cloud_env__: { get_param: cloud_env }
494             __external_dns__: { get_param: external_dns }
495             __aai_repo__: { get_param: aai_repo }
496           template: |
497             #!/bin/bash
498
499             # Create configuration files
500             mkdir -p /opt/config
501             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
502             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
503             echo "__nexus_username__" > /opt/config/nexus_username.txt
504             echo "__nexus_password__" > /opt/config/nexus_password.txt
505             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
506             echo "__aai_ip_addr__" > /opt/config/local_ip_addr.txt
507             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
508             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
509             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
510             echo "__docker_version__" > /opt/config/docker_version.txt
511             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
512             echo "aai_instance_1" > /opt/config/aai_instance.txt
513             echo "__cloud_env__" > /opt/config/cloud_env.txt
514             echo "__external_dns__" > /opt/config/external_dns.txt
515             echo "__aai_repo__" > /opt/config/remote_repo.txt
516
517             # Download and run install script
518             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aai_install.sh -o /opt/aai_install.sh
519             cd /opt
520             chmod +x aai_install.sh
521             ./aai_install.sh
522
523
524   aai2_private_port:
525     type: OS::Neutron::Port
526     properties:
527       network: { get_resource: oam_onap }
528       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: aai2_ip_addr }}]
529
530   aai2_vm:
531     type: OS::Nova::Server
532     properties:
533       image: { get_param: ubuntu_1404_image }
534       flavor: { get_param: flavor_xlarge }
535       name:
536         str_replace:
537           template: base-aai-inst2
538           params:
539             base: { get_param: vm_base_name }      
540       key_name: { get_resource: vm_key }
541       networks:
542         - network: { get_param: public_net_id }
543         - port: { get_resource: aai2_private_port }
544       user_data_format: RAW
545       user_data:
546         str_replace:
547           params:
548             __nexus_repo__: { get_param: nexus_repo }
549             __nexus_docker_repo__: { get_param: nexus_docker_repo }
550             __nexus_username__: { get_param: nexus_username }
551             __nexus_password__: { get_param: nexus_password }
552             __dmaap_topic__: { get_param: dmaap_topic }
553             __artifacts_version__: { get_param: artifacts_version }
554             __dns_ip_addr__: { get_param: dns_ip_addr }
555             __aai_ip_addr__: { get_param: aai2_ip_addr }
556             __oam_network_cidr__: { get_param: oam_network_cidr }
557             __docker_version__: { get_param: docker_version }
558             __gerrit_branch__: { get_param: gerrit_branch }
559             __cloud_env__: { get_param: cloud_env }
560             __external_dns__: { get_param: external_dns }
561             __aai_repo__: { get_param: aai_repo }
562           template: |
563             #!/bin/bash
564
565             # Create configuration files
566             mkdir -p /opt/config
567             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
568             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
569             echo "__nexus_username__" > /opt/config/nexus_username.txt
570             echo "__nexus_password__" > /opt/config/nexus_password.txt
571             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
572             echo "__aai_ip_addr__" > /opt/config/local_ip_addr.txt
573             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
574             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
575             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
576             echo "__docker_version__" > /opt/config/docker_version.txt
577             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
578             echo "aai_instance_2" > /opt/config/aai_instance.txt
579             echo "__cloud_env__" > /opt/config/cloud_env.txt
580             echo "__external_dns__" > /opt/config/external_dns.txt
581             echo "__aai_repo__" > /opt/config/remote_repo.txt
582
583             # Download and run install script
584             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aai_install.sh -o /opt/aai_install.sh
585             cd /opt
586             chmod +x aai_install.sh
587             ./aai_install.sh
588
589
590   # MSO instantiation
591   mso_private_port:
592     type: OS::Neutron::Port
593     properties:
594       network: { get_resource: oam_onap }
595       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: mso_ip_addr }}]
596
597   mso_vm:
598     type: OS::Nova::Server
599     properties:
600       image: { get_param: ubuntu_1604_image }
601       flavor: { get_param: flavor_large }
602       name:
603         str_replace:
604           template: base-mso
605           params:
606             base: { get_param: vm_base_name }      
607       key_name: { get_resource: vm_key }
608       networks:
609         - network: { get_param: public_net_id }
610         - port: { get_resource: mso_private_port }
611       user_data_format: RAW
612       user_data:
613         str_replace:
614           params:
615             __nexus_repo__: { get_param: nexus_repo }
616             __nexus_docker_repo__: { get_param: nexus_docker_repo }
617             __nexus_username__: { get_param: nexus_username }
618             __nexus_password__: { get_param: nexus_password }
619             __openstack_username__: { get_param: openstack_username }
620             __openstack_tenant_id__: { get_param: openstack_tenant_id }
621             __openstack_api_key__: { get_param: openstack_api_key }
622             __openstack_region__: { get_param: openstack_region }
623             __keystone_url__: { get_param: keystone_url }
624             __dmaap_topic__: { get_param: dmaap_topic }
625             __artifacts_version__: { get_param: artifacts_version }
626             __dns_ip_addr__: { get_param: dns_ip_addr }
627             __mso_ip_addr__: { get_param: mso_ip_addr }
628             __oam_network_cidr__: { get_param: oam_network_cidr }
629             __docker_version__: { get_param: docker_version }
630             __gerrit_branch__: { get_param: gerrit_branch }
631             __cloud_env__: { get_param: cloud_env }
632             __external_dns__: { get_param: external_dns }
633             __mso_repo__: { get_param: mso_repo }
634           template: |
635             #!/bin/bash
636
637             # Create configuration files
638             mkdir -p /opt/config
639             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
640             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
641             echo "__nexus_username__" > /opt/config/nexus_username.txt
642             echo "__nexus_password__" > /opt/config/nexus_password.txt
643             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
644             echo "__mso_ip_addr__" > /opt/config/local_ip_addr.txt
645             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
646             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
647             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
648             echo "__openstack_username__" > /opt/config/openstack_username.txt
649             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
650             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
651             echo "__openstack_region__" > /opt/config/openstack_region.txt
652             echo "__keystone_url__" > /opt/config/keystone.txt
653             echo "__docker_version__" > /opt/config/docker_version.txt
654             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
655             echo "__cloud_env__" > /opt/config/cloud_env.txt
656             echo "__external_dns__" > /opt/config/external_dns.txt
657             echo "__mso_repo__" > /opt/config/remote_repo.txt
658
659             # Download and run install script
660             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/mso_install.sh -o /opt/mso_install.sh
661             cd /opt
662             chmod +x mso_install.sh
663             ./mso_install.sh
664
665
666   # Message Router instantiation
667   mrouter_private_port:
668     type: OS::Neutron::Port
669     properties:
670       network: { get_resource: oam_onap }
671       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: mr_ip_addr }}]
672
673   mrouter_vm:
674     type: OS::Nova::Server
675     properties:
676       image: { get_param: ubuntu_1404_image }
677       flavor: { get_param: flavor_large }
678       name:
679         str_replace: 
680           template: base-message-router
681           params:
682             base: { get_param: vm_base_name }
683       key_name: { get_resource: vm_key }
684       networks:
685         - network: { get_param: public_net_id }
686         - port: { get_resource: mrouter_private_port }
687       user_data_format: RAW
688       user_data:
689         str_replace:
690           params:
691             __nexus_repo__: { get_param: nexus_repo }
692             __nexus_docker_repo__: { get_param: nexus_docker_repo }
693             __nexus_username__: { get_param: nexus_username }
694             __nexus_password__: { get_param: nexus_password }
695             __artifacts_version__: { get_param: artifacts_version }
696             __mr_ip_addr__: { get_param: mr_ip_addr }
697             __dns_ip_addr__: { get_param: dns_ip_addr }
698             __oam_network_cidr__: { get_param: oam_network_cidr }
699             __gerrit_branch__: { get_param: gerrit_branch }
700             __cloud_env__: { get_param: cloud_env }
701             __external_dns__: { get_param: external_dns }
702             __mr_repo__: { get_param: mr_repo }
703           template: |
704             #!/bin/bash
705
706             # Create configuration files
707             mkdir -p /opt/config
708             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
709             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
710             echo "__nexus_username__" > /opt/config/nexus_username.txt
711             echo "__nexus_password__" > /opt/config/nexus_password.txt
712             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
713             echo "__mr_ip_addr__" > /opt/config/local_ip_addr.txt
714             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
715             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
716             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
717             echo "__cloud_env__" > /opt/config/cloud_env.txt
718             echo "__external_dns__" > /opt/config/external_dns.txt
719             echo "__mr_repo__" > /opt/config/remote_repo.txt
720
721             # Download and run install script
722             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/mr_install.sh -o /opt/mr_install.sh
723             cd /opt
724             chmod +x mr_install.sh
725             ./mr_install.sh
726
727
728   # Robot Framework instantiation
729   robot_private_port:
730     type: OS::Neutron::Port
731     properties:
732       network: { get_resource: oam_onap }
733       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: robot_ip_addr }}]
734  
735   robot_vm:
736     type: OS::Nova::Server
737     properties:
738       image: { get_param: ubuntu_1604_image }
739       flavor: { get_param: flavor_small }
740       name:
741         str_replace: 
742           template: base-robot
743           params:
744             base: { get_param: vm_base_name }
745       key_name: { get_resource: vm_key }
746       networks:
747         - network: { get_param: public_net_id }
748         - port: { get_resource: robot_private_port }
749       user_data_format: RAW
750       user_data:
751         str_replace:
752           params:
753             __nexus_repo__: { get_param: nexus_repo }
754             __nexus_docker_repo__: { get_param: nexus_docker_repo }
755             __nexus_username__: { get_param: nexus_username }
756             __nexus_password__: { get_param: nexus_password }
757             __network_name__: { get_attr: [oam_onap, name] }
758             __openstack_username__: { get_param: openstack_username }
759             __openstack_api_key__: { get_param : openstack_api_key }
760             __artifacts_version__: { get_param: artifacts_version }
761             __openstack_region__: { get_param: openstack_region }
762             __robot_ip_addr__: { get_param: robot_ip_addr }
763             __dns_ip_addr__: { get_param: dns_ip_addr }
764             __oam_network_cidr__: { get_param: oam_network_cidr }
765             __docker_version__: { get_param: docker_version }
766             __gerrit_branch__: { get_param: gerrit_branch }
767             __keystone_url__: { get_param: keystone_url }
768             __aai1_ip_addr__: { get_param: aai1_ip_addr }
769             __aai2_ip_addr__: { get_param: aai2_ip_addr }
770             __appc_ip_addr__: { get_param: appc_ip_addr }
771             __dcae_ip_addr__: { get_param: dcae_ip_addr }
772             __mso_ip_addr__: { get_param: mso_ip_addr }
773             __mr_ip_addr__: { get_param: mr_ip_addr }
774             __policy_ip_addr__: { get_param: policy_ip_addr }
775             __portal_ip_addr__: { get_param: portal_ip_addr }
776             __sdc_ip_addr__: { get_param: sdc_ip_addr }
777             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
778             __vid_ip_addr__: { get_param: vid_ip_addr }
779             __cloud_env__: { get_param: cloud_env }
780             __external_dns__: { get_param: external_dns }
781             __vm_image_name__: { get_param: ubuntu_1404_image }
782             __vm_flavor__: { get_param: flavor_medium }
783             __robot_repo__: { get_param: robot_repo }
784           template: |
785             #!/bin/bash
786
787             # Create configuration files
788             mkdir -p /opt/config
789             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
790             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
791             echo "__nexus_username__" > /opt/config/nexus_username.txt
792             echo "__nexus_password__" > /opt/config/nexus_password.txt
793             echo "__network_name__" > /opt/config/network.txt
794             echo "__openstack_username__" > /opt/config/openstack_username.txt
795             echo "__openstack_api_key__" > /opt/config/openstack_password.txt
796             echo "__openstack_region__" > /opt/config/region.txt
797             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
798             echo "__robot_ip_addr__" > /opt/config/local_ip_addr.txt
799             echo "__docker_version__" > /opt/config/docker_version.txt
800             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
801             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
802             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
803             echo "__keystone_url__" > /opt/config/keystone.txt
804             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
805             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
806             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
807             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
808             echo "__mso_ip_addr__" > /opt/config/mso_ip_addr.txt
809             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
810             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
811             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
812             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
813             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
814             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
815             echo "__cloud_env__" > /opt/config/cloud_env.txt
816             echo "__external_dns__" > /opt/config/external_dns.txt
817             echo "__vm_image_name__" > /opt/config/vm_image_name.txt
818             echo "__vm_flavor__" > /opt/config/vm_flavor.txt
819             echo "__robot_repo__" > /opt/config/remote_repo.txt
820
821             # Download and run install script
822             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/robot_install.sh -o /opt/robot_install.sh
823             cd /opt
824             chmod +x robot_install.sh
825             ./robot_install.sh
826
827
828   # VID instantiation
829   vid_private_port:
830     type: OS::Neutron::Port
831     properties:
832       network: { get_resource: oam_onap }
833       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: vid_ip_addr }}]
834
835   vid_vm:
836     type: OS::Nova::Server
837     properties:
838       image: { get_param: ubuntu_1404_image }
839       flavor: { get_param: flavor_medium }
840       name:
841         str_replace: 
842           template: base-vid
843           params:
844             base: { get_param: vm_base_name }
845       key_name: { get_resource: vm_key }
846       networks:
847         - network: { get_param: public_net_id }
848         - port: { get_resource: vid_private_port }
849       user_data_format: RAW
850       user_data:
851         str_replace:
852           params:
853             __nexus_repo__: { get_param: nexus_repo }
854             __nexus_docker_repo__: { get_param: nexus_docker_repo }
855             __nexus_username__: { get_param: nexus_username }
856             __nexus_password__: { get_param: nexus_password }
857             __artifacts_version__: { get_param: artifacts_version }
858             __vid_ip_addr__: { get_param: vid_ip_addr }
859             __dns_ip_addr__: { get_param: dns_ip_addr }
860             __oam_network_cidr__: { get_param: oam_network_cidr }
861             __docker_version__: { get_param: docker_version }
862             __gerrit_branch__: { get_param: gerrit_branch }
863             __cloud_env__: { get_param: cloud_env }
864             __external_dns__: { get_param: external_dns }
865             __vid_repo__: { get_param: vid_repo }
866           template: |
867             #!/bin/bash
868
869             # Create configuration files
870             mkdir -p /opt/config
871             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
872             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
873             echo "__nexus_username__" > /opt/config/nexus_username.txt
874             echo "__nexus_password__" > /opt/config/nexus_password.txt
875             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
876             echo "__vid_ip_addr__" > /opt/config/local_ip_addr.txt
877             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
878             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
879             echo "__docker_version__" > /opt/config/docker_version.txt
880             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
881             echo "__cloud_env__" > /opt/config/cloud_env.txt
882             echo "__external_dns__" > /opt/config/external_dns.txt
883             echo "__vid_repo__" > /opt/config/remote_repo.txt
884
885             # Download and run install script
886             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/vid_install.sh -o /opt/vid_install.sh
887             cd /opt
888             chmod +x vid_install.sh
889             ./vid_install.sh
890
891  
892   # SDN-C instantiation
893   sdnc_private_port:
894     type: OS::Neutron::Port
895     properties:
896       network: { get_resource: oam_onap }
897       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdnc_ip_addr }}]
898
899   sdnc_vm:
900     type: OS::Nova::Server
901     properties:
902       image: { get_param: ubuntu_1404_image }
903       flavor: { get_param: flavor_large }
904       name:
905         str_replace: 
906           template: base-sdnc
907           params:
908             base: { get_param: vm_base_name }
909       key_name: { get_resource: vm_key }
910       networks:
911         - network: { get_param: public_net_id }
912         - port: { get_resource: sdnc_private_port }
913       user_data_format: RAW
914       user_data:
915         str_replace:
916           params:
917             __nexus_repo__: { get_param: nexus_repo }
918             __nexus_docker_repo__: { get_param: nexus_docker_repo }
919             __nexus_username__: { get_param: nexus_username }
920             __nexus_password__: { get_param: nexus_password }
921             __artifacts_version__: { get_param: artifacts_version }
922             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
923             __dns_ip_addr__: { get_param: dns_ip_addr }
924             __oam_network_cidr__: { get_param: oam_network_cidr }
925             __docker_version__: { get_param: docker_version }
926             __gerrit_branch__: { get_param: gerrit_branch }
927             __cloud_env__: { get_param: cloud_env }
928             __external_dns__: { get_param: external_dns }
929             __sdnc_repo__: { get_param: sdnc_repo }
930           template: |
931             #!/bin/bash
932
933             # Create configuration files
934             mkdir -p /opt/config
935             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
936             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
937             echo "__nexus_username__" > /opt/config/nexus_username.txt
938             echo "__nexus_password__" > /opt/config/nexus_password.txt
939             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
940             echo "__sdnc_ip_addr__" > /opt/config/local_ip_addr.txt
941             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
942             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
943             echo "__docker_version__" > /opt/config/docker_version.txt
944             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
945             echo "__cloud_env__" > /opt/config/cloud_env.txt
946             echo "__external_dns__" > /opt/config/external_dns.txt
947             echo "__sdnc_repo__" > /opt/config/remote_repo.txt
948
949             # Download and run install script
950             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdnc_install.sh -o /opt/sdnc_install.sh
951             cd /opt
952             chmod +x sdnc_install.sh
953             ./sdnc_install.sh
954
955
956   # SDC instantiation
957   sdc_private_port:
958     type: OS::Neutron::Port
959     properties:
960       network: { get_resource: oam_onap }
961       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: sdc_ip_addr }}]
962
963   sdc_volume_data:
964     type: OS::Cinder::Volume
965     properties:
966       name: vol1-sdc-data
967       size: 100
968
969   sdc_vm:
970     type: OS::Nova::Server
971     properties:
972       image: { get_param: ubuntu_1604_image }
973       flavor: { get_param: flavor_xlarge }
974       name:
975         str_replace:
976           template: base-sdc
977           params:
978             base: { get_param: vm_base_name }
979       key_name: { get_resource: vm_key }
980       networks:
981         - network: { get_param: public_net_id }
982         - port: { get_resource: sdc_private_port }
983       block_device_mapping:
984         - device_name: /dev/vdb
985           volume_id: { get_resource: sdc_volume_data }
986       user_data_format: RAW
987       user_data:
988         str_replace:
989           params:
990             __nexus_repo__: { get_param: nexus_repo }
991             __nexus_docker_repo__: { get_param: nexus_docker_repo }
992             __nexus_username__: { get_param: nexus_username }
993             __nexus_password__: { get_param: nexus_password }
994             __env_name__: { get_param: dmaap_topic }
995             __artifacts_version__: { get_param: artifacts_version }
996             __sdc_ip_addr__: { get_param: sdc_ip_addr }
997             __dns_ip_addr__: { get_param: dns_ip_addr }
998             __oam_network_cidr__: { get_param: oam_network_cidr }
999             __mr_ip_addr__: { get_param: mr_ip_addr }
1000             __docker_version__: { get_param: docker_version }
1001             __gerrit_branch__: { get_param: gerrit_branch }
1002             __cloud_env__: { get_param: cloud_env }
1003             __external_dns__: { get_param: external_dns }
1004             __sdc_repo__: { get_param: sdc_repo }
1005           template: |
1006             #!/bin/bash
1007
1008             # Create configuration files
1009             mkdir -p /opt/config
1010             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1011             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1012             echo "__nexus_username__" > /opt/config/nexus_username.txt
1013             echo "__nexus_password__" > /opt/config/nexus_password.txt
1014             echo "__env_name__" > /opt/config/env_name.txt
1015             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1016             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1017             echo "__sdc_ip_addr__" > /opt/config/local_ip_addr.txt
1018             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1019             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
1020             echo "__docker_version__" > /opt/config/docker_version.txt
1021             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1022             echo "__cloud_env__" > /opt/config/cloud_env.txt
1023             echo "__external_dns__" > /opt/config/external_dns.txt
1024             echo "__sdc_repo__" > /opt/config/remote_repo.txt
1025
1026             # Download and run install script
1027             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdc_install.sh -o /opt/sdc_install.sh
1028             cd /opt
1029             chmod +x sdc_install.sh
1030             ./sdc_install.sh
1031
1032
1033   # PORTAL instantiation
1034   portal_private_port:
1035     type: OS::Neutron::Port
1036     properties:
1037       network: { get_resource: oam_onap }
1038       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: portal_ip_addr }}]
1039
1040   portal_vm:
1041     type: OS::Nova::Server
1042     properties:
1043       image: { get_param: ubuntu_1404_image }
1044       flavor: { get_param: flavor_large }
1045       name:
1046         str_replace: 
1047           template: base-portal
1048           params:
1049             base: { get_param: vm_base_name }
1050       key_name: { get_resource: vm_key }
1051       networks:
1052         - network: { get_param: public_net_id }
1053         - port: { get_resource: portal_private_port }
1054       user_data_format: RAW
1055       user_data:
1056         str_replace:
1057           params:
1058             __nexus_repo__: { get_param: nexus_repo }
1059             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1060             __nexus_username__: { get_param: nexus_username }
1061             __nexus_password__: { get_param: nexus_password }
1062             __artifacts_version__: { get_param: artifacts_version }
1063             __portal_ip_addr__: { get_param: portal_ip_addr }
1064             __dns_ip_addr__: { get_param: dns_ip_addr }
1065             __oam_network_cidr__: { get_param: oam_network_cidr }
1066             __docker_version__: { get_param: docker_version }
1067             __gerrit_branch__: { get_param: gerrit_branch }
1068             __cloud_env__: { get_param: cloud_env }
1069             __external_dns__: { get_param: external_dns }
1070             __portal_repo__: { get_param: portal_repo }
1071           template: |
1072             #!/bin/bash
1073
1074             # Create configuration files
1075             mkdir -p /opt/config
1076             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1077             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1078             echo "__nexus_username__" > /opt/config/nexus_username.txt
1079             echo "__nexus_password__" > /opt/config/nexus_password.txt
1080             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
1081             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1082             echo "__portal_ip_addr__" > /opt/config/local_ip_addr.txt
1083             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1084             echo "__docker_version__" > /opt/config/docker_version.txt
1085             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1086             echo "__cloud_env__" > /opt/config/cloud_env.txt
1087             echo "__external_dns__" > /opt/config/external_dns.txt
1088             echo "__portal_repo__" > /opt/config/remote_repo.txt
1089
1090             # Download and run install script
1091             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/portal_install.sh -o /opt/portal_install.sh
1092             cd /opt
1093             chmod +x portal_install.sh
1094             ./portal_install.sh
1095
1096
1097   # DCAE Controller instantiation
1098   dcae_c_private_port:
1099     type: OS::Neutron::Port
1100     properties:
1101       network: { get_resource: oam_onap }
1102       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
1103
1104   dcae_c_vm:
1105     type: OS::Nova::Server
1106     properties:
1107       image: { get_param: ubuntu_1404_image }
1108       flavor: { get_param: flavor_medium }
1109       name:
1110         str_replace: 
1111           template: base-dcae-controller
1112           params:
1113             base: { get_param: vm_base_name }
1114       key_name: { get_resource: vm_key }
1115       networks:
1116         - network: { get_param: public_net_id }
1117         - port: { get_resource: dcae_c_private_port }
1118       user_data_format: RAW
1119       user_data:
1120         str_replace:
1121           params:
1122             __nexus_repo__: { get_param: nexus_repo }
1123             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1124             __nexus_username__: { get_param: nexus_username }
1125             __nexus_password__: { get_param: nexus_password }
1126             __nexus_url_snapshots__: { get_param: nexus_url_snapshot }
1127             __gitlab_branch__: { get_param: gitlab_branch }
1128             __dns_ip_addr__: { get_param: dns_ip_addr }
1129             __oam_network_cidr__: { get_param: oam_network_cidr }
1130             __dcae_zone__: { get_param: dcae_zone }
1131             __dcae_state__: { get_param: dcae_state }
1132             __artifacts_version__: { get_param: artifacts_version }
1133             __tenant_id__: { get_param: openstack_tenant_id }
1134             __openstack_private_network_name__: { get_attr: [oam_onap, name] }
1135             __openstack_user__: { get_param: openstack_username }
1136             __openstack_password__: { get_param: openstack_api_key }
1137             __openstack_auth_method__: { get_param: openstack_auth_method }
1138             __key_name__: { get_param: key_name }
1139             __rand_str__: { get_resource: random-str }
1140             __pub_key__: { get_param: pub_key }
1141             __nexus_repo_root__: { get_param: nexus_repo_root }
1142             __openstack_region__: { get_param: openstack_region }
1143             __horizon_url__: { get_param: horizon_url }
1144             __keystone_url__: { get_param: keystone_url }
1145             __docker_version__: { get_param: docker_version }
1146             __gerrit_branch__: { get_param: gerrit_branch }
1147             __dcae_code_version__: { get_param: dcae_code_version }
1148             __cloud_env__: { get_param: cloud_env }
1149             __public_net_id__: { get_param: public_net_id }
1150             __dcae_base_environment__: { get_param: dcae_base_environment }
1151             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1152             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
1153             __dcae_db_ip_addr__: { get_param: dcae_db_ip_addr }
1154             __dcae_hdp1_ip_addr__: { get_param: dcae_hdp1_ip_addr }
1155             __dcae_hdp2_ip_addr__: { get_param: dcae_hdp2_ip_addr }
1156             __dcae_hdp3_ip_addr__: { get_param: dcae_hdp3_ip_addr }
1157             __external_dns__: { get_param: external_dns }
1158             __ubuntu_1404_image__: { get_param: ubuntu_1404_image }
1159             __ubuntu_1604_image__: { get_param: ubuntu_1604_image }
1160             __flavor_small__: { get_param: flavor_small }
1161             __flavor_medium__: { get_param: flavor_medium }
1162             __flavor_large__: { get_param: flavor_large }
1163             __flavor_xlarge__: { get_param: flavor_xlarge }
1164             __dcae_repo__: { get_param: dcae_repo }
1165             __mr_repo__: { get_param: mr_repo }
1166           template: |
1167             #!/bin/bash
1168
1169             # Create configuration files
1170             mkdir -p /opt/config
1171             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1172             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1173             echo "__nexus_username__" > /opt/config/nexus_username.txt
1174             echo "__nexus_password__" > /opt/config/nexus_password.txt
1175             echo "__nexus_url_snapshots__" > /opt/config/nexus_url_snapshots.txt
1176             echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
1177             echo "__docker_version__" > /opt/config/docker_version.txt
1178             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1179             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1180             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1181             echo "__dcae_zone__" > /opt/config/dcae_zone.txt
1182             echo "__dcae_state__" > /opt/config/dcae_state.txt
1183             echo "__tenant_id__" > /opt/config/tenant_id.txt
1184             echo "__openstack_private_network_name__" > /opt/config/openstack_private_network_name.txt
1185             echo "__openstack_user__" > /opt/config/openstack_user.txt
1186             echo "__openstack_password__" > /opt/config/openstack_password.txt
1187             echo "__openstack_auth_method__" > /opt/config/openstack_auth_method.txt
1188             echo "__key_name__" > /opt/config/key_name.txt
1189             echo "__rand_str__" > /opt/config/rand_str.txt
1190             echo "__pub_key__" > /opt/config/pub_key.txt
1191             echo "__nexus_repo_root__" > /opt/config/nexus_repo_root.txt
1192             echo "__openstack_region__" > /opt/config/openstack_region.txt
1193             echo "__horizon_url__" > /opt/config/horizon_url.txt
1194             echo "__keystone_url__" > /opt/config/keystone_url.txt
1195             echo "__cloud_env__" > /opt/config/cloud_env.txt
1196             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
1197             echo "__public_net_id__" > /opt/config/public_net_id.txt
1198             echo "__dcae_base_environment__" > /opt/config/dcae_base_environment.txt
1199             echo "__dcae_code_version__" > /opt/config/dcae_code_version.txt
1200             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1201             echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
1202             echo "__dcae_db_ip_addr__" > /opt/config/dcae_db_ip_addr.txt
1203             echo "__dcae_hdp1_ip_addr__" > /opt/config/dcae_hdp1_ip_addr.txt
1204             echo "__dcae_hdp2_ip_addr__" > /opt/config/dcae_hdp2_ip_addr.txt
1205             echo "__dcae_hdp3_ip_addr__" > /opt/config/dcae_hdp3_ip_addr.txt
1206             echo "__external_dns__" > /opt/config/external_dns.txt
1207             echo "__ubuntu_1404_image__" > /opt/config/ubuntu_1404_image.txt
1208             echo "__ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1209             echo "__flavor_small__" > /opt/config/flavor_small.txt
1210             echo "__flavor_medium__" > /opt/config/flavor_medium.txt
1211             echo "__flavor_large__" > /opt/config/flavor_large.txt
1212             echo "__flavor_xlarge__" > /opt/config/flavor_xlarge.txt
1213             echo "__dcae_repo__" > /opt/config/remote_repo.txt
1214             echo "__mr_repo__" > /opt/config/mr_repo.txt
1215
1216             # Download and run install script
1217             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dcae_install.sh -o /opt/dcae_install.sh
1218             cd /opt
1219             chmod +x dcae_install.sh
1220             ./dcae_install.sh
1221
1222
1223   # Policy Engine instantiation
1224   policy_private_port:
1225     type: OS::Neutron::Port
1226     properties:
1227       network: { get_resource: oam_onap }
1228       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: policy_ip_addr }}]
1229
1230   policy_vm:
1231     type: OS::Nova::Server
1232     properties:
1233       image: { get_param: ubuntu_1404_image }
1234       flavor: { get_param: flavor_xlarge }
1235       name:
1236         str_replace: 
1237           template: base-policy
1238           params:
1239             base: { get_param: vm_base_name }
1240       key_name: { get_resource: vm_key }
1241       networks:
1242         - network: { get_param: public_net_id }
1243         - port: { get_resource: policy_private_port }
1244       user_data_format: RAW
1245       user_data:
1246         str_replace:
1247           params:
1248             __nexus_repo__: { get_param: nexus_repo }
1249             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1250             __nexus_username__: { get_param: nexus_username }
1251             __nexus_password__: { get_param: nexus_password }
1252             __artifacts_version__: { get_param: artifacts_version }
1253             __policy_ip_addr__: { get_param: policy_ip_addr }
1254             __dns_ip_addr__: { get_param: dns_ip_addr }
1255             __oam_network_cidr__: { get_param: oam_network_cidr }
1256             __docker_version__: { get_param: docker_version }
1257             __gerrit_branch__: { get_param: gerrit_branch }
1258             __cloud_env__: { get_param: cloud_env }
1259             __external_dns__: { get_param: external_dns }
1260             __policy_repo__: { get_param: policy_repo }
1261           template: |
1262             #!/bin/bash
1263
1264             # Create configuration files
1265             mkdir -p /opt/config
1266             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1267             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1268             echo "__nexus_username__" > /opt/config/nexus_username.txt
1269             echo "__nexus_password__" > /opt/config/nexus_password.txt
1270             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1271             echo "__policy_ip_addr__" > /opt/config/local_ip_addr.txt
1272             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1273             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
1274             echo "__docker_version__" > /opt/config/docker_version.txt
1275             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1276             echo "__cloud_env__" > /opt/config/cloud_env.txt
1277             echo "__external_dns__" > /opt/config/external_dns.txt
1278             echo "__policy_repo__" > /opt/config/remote_repo.txt
1279
1280             # Download and run install script
1281             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/policy_install.sh -o /opt/policy_install.sh
1282             cd /opt
1283             chmod +x policy_install.sh
1284             ./policy_install.sh
1285
1286
1287   # APP-C instantiation
1288   appc_private_port:
1289     type: OS::Neutron::Port
1290     properties:
1291       network: { get_resource: oam_onap }
1292       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: appc_ip_addr }}]
1293
1294   appc_vm:
1295     type: OS::Nova::Server
1296     properties:
1297       image: { get_param: ubuntu_1404_image }
1298       flavor: { get_param: flavor_large }
1299       name:
1300         str_replace: 
1301           template: base-appc
1302           params:
1303             base: { get_param: vm_base_name }
1304       key_name: { get_resource: vm_key }
1305       networks:
1306         - network: { get_param: public_net_id }
1307         - port: { get_resource: appc_private_port }
1308       user_data_format: RAW
1309       user_data:
1310         str_replace:
1311           params:
1312             __nexus_repo__: { get_param: nexus_repo }
1313             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1314             __nexus_username__: { get_param: nexus_username }
1315             __nexus_password__: { get_param: nexus_password }
1316             __dmaap_topic__: { get_param: dmaap_topic }
1317             __artifacts_version__: { get_param: artifacts_version }
1318             __appc_ip_addr__: { get_param: appc_ip_addr }
1319             __dns_ip_addr__: { get_param: dns_ip_addr }
1320             __oam_network_cidr__: { get_param: oam_network_cidr }
1321             __docker_version__: { get_param: docker_version }
1322             __gerrit_branch__: { get_param: gerrit_branch }
1323             __cloud_env__: { get_param: cloud_env }
1324             __external_dns__: { get_param: external_dns }
1325             __appc_repo__: { get_param: appc_repo }
1326           template: |
1327             #!/bin/bash
1328
1329             # Create configuration files
1330             mkdir -p /opt/config
1331             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1332             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1333             echo "__nexus_username__" > /opt/config/nexus_username.txt
1334             echo "__nexus_password__" > /opt/config/nexus_password.txt
1335             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1336             echo "__appc_ip_addr__" > /opt/config/local_ip_addr.txt
1337             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1338             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
1339             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1340             echo "__docker_version__" > /opt/config/docker_version.txt
1341             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1342             echo "__cloud_env__" > /opt/config/cloud_env.txt
1343             echo "__external_dns__" > /opt/config/external_dns.txt
1344             echo "__appc_repo__" > /opt/config/remote_repo.txt
1345
1346             # Download and run install script
1347             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/appc_install.sh -o /opt/appc_install.sh
1348             cd /opt
1349             chmod +x appc_install.sh
1350             ./appc_install.sh
1351
1352
1353   # CLAMP instantiation
1354   clamp_private_port:
1355     type: OS::Neutron::Port
1356     properties:
1357       network: { get_resource: oam_onap }
1358       fixed_ips: [{"subnet": { get_resource: oam_onap_subnet }, "ip_address": { get_param: clamp_ip_addr }}]
1359
1360   clamp_vm:
1361     type: OS::Nova::Server
1362     properties:
1363       image: { get_param: ubuntu_1604_image }
1364       flavor: { get_param: flavor_medium }
1365       name:
1366         str_replace:
1367           template: base-clamp
1368           params:
1369             base: { get_param: vm_base_name }      
1370       key_name: { get_resource: vm_key }
1371       networks:
1372         - network: { get_param: public_net_id }
1373         - port: { get_resource: clamp_private_port }
1374       user_data_format: RAW
1375       user_data:
1376         str_replace:
1377           params:
1378             __nexus_repo__: { get_param: nexus_repo }
1379             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1380             __nexus_username__: { get_param: nexus_username }
1381             __nexus_password__: { get_param: nexus_password }
1382             __openstack_username__: { get_param: openstack_username }
1383             __openstack_tenant_id__: { get_param: openstack_tenant_id }
1384             __openstack_api_key__: { get_param: openstack_api_key }
1385             __openstack_region__: { get_param: openstack_region }
1386             __keystone_url__: { get_param: keystone_url }
1387             __dmaap_topic__: { get_param: dmaap_topic }
1388             __artifacts_version__: { get_param: artifacts_version }
1389             __dns_ip_addr__: { get_param: dns_ip_addr }
1390             __clamp_ip_addr__: { get_param: clamp_ip_addr }
1391             __oam_network_cidr__: { get_param: oam_network_cidr }
1392             __docker_version__: { get_param: docker_version }
1393             __gerrit_branch__: { get_param: gerrit_branch }
1394             __cloud_env__: { get_param: cloud_env }
1395             __external_dns__: { get_param: external_dns }
1396             __clamp_repo__: { get_param: clamp_repo }
1397           template: |
1398             #!/bin/bash
1399
1400             # Create configuration files
1401             mkdir -p /opt/config
1402             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1403             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1404             echo "__nexus_username__" > /opt/config/nexus_username.txt
1405             echo "__nexus_password__" > /opt/config/nexus_password.txt
1406             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1407             echo "__clamp_ip_addr__" > /opt/config/local_ip_addr.txt
1408             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1409             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
1410             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1411             echo "__openstack_username__" > /opt/config/openstack_username.txt
1412             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
1413             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
1414             echo "__openstack_region__" > /opt/config/openstack_region.txt
1415             echo "__keystone_url__" > /opt/config/keystone.txt
1416             echo "__docker_version__" > /opt/config/docker_version.txt
1417             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1418             echo "__cloud_env__" > /opt/config/cloud_env.txt
1419             echo "__external_dns__" > /opt/config/external_dns.txt
1420             echo "__clamp_repo__" > /opt/config/remote_repo.txt
1421
1422             # Download and run install script
1423             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/clamp_install.sh -o /opt/clamp_install.sh
1424             cd /opt
1425             chmod +x clamp_install.sh
1426             ./clamp_install.sh