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