Update INFO.yaml with new PTL
[demo.git] / heat / ONAP / onap_openstack.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   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   dns_list:
151     type: comma_delimited_list
152     description: List of External DNS for OAM ONAP network
153
154   external_dns:
155     type: string
156     description: First element of the dns_list for ONAP network
157
158   ### Private IP addresses ###
159   oam_network_cidr:
160     type: string
161     description: CIDR of the OAM ONAP network
162
163   aai1_ip_addr:
164     type: string
165     description: AAI Instance 1 IP Address
166
167   aai2_ip_addr:
168     type: string
169     description: AAI Instance 2 IP Address
170
171   appc_ip_addr:
172     type: string
173     description: APP-C IP Address
174
175   dcae_ip_addr:
176     type: string
177     description: DCAE IP Address
178  
179   dcae_coll_ip_addr:
180     type: string
181     description: DCAE Collector IP Address
182
183   dcae_db_ip_addr:
184     type: string
185     description: DCAE Database IP Address
186
187   dcae_hdp1_ip_addr:
188     type: string
189     description: Hadoop VM1 IP Address
190
191   dcae_hdp2_ip_addr:
192     type: string
193     description: Hadoop VM2 IP Address
194
195   dcae_hdp3_ip_addr:
196     type: string
197     description: Hadoop VM3 IP Address
198
199   dns_ip_addr:
200     type: string
201     description: DNS IP Address
202
203   mso_ip_addr:
204     type: string
205     description: MSO IP Address
206
207   mr_ip_addr:
208     type: string
209     description: Message Router IP Address
210
211   policy_ip_addr:
212     type: string
213     description: Policy Engine IP Address
214
215   portal_ip_addr:
216     type: string
217     description: Portal IP Address
218
219   robot_ip_addr:
220     type: string
221     description: Robot Framework IP Address
222
223   sdc_ip_addr:
224     type: string
225     description: SDC IP Address
226
227   sdnc_ip_addr:
228     type: string
229     description: SDN-C IP Address
230
231   vid_ip_addr:
232     type: string
233     description: VID IP Address
234
235   dcae_coll_float_ip:
236     type: string
237     description: DCAE Collector Floating IP Address
238
239   dcae_db_float_ip:
240     type: string
241     description: DCAE Collector Database Floating IP Address
242
243   dcae_hdp1_float_ip:
244     type: string
245     description: Hadoop VM1 Floating IP Address
246
247   dcae_hdp2_float_ip:
248     type: string
249     description: Hadoop VM2 Floating IP Address
250
251   dcae_hdp3_float_ip:
252     type: string
253     description: Hadoop VM3 Floating IP Address
254
255   ###########################
256   #                         #
257   # Parameters used by DCAE #
258   #                         #
259   ###########################
260
261   dcae_base_environment:
262     type: string
263     description: DCAE Base Environment configuration (RACKSPACE/2-NIC/1-NIC-FLOATING-IPS)
264
265   dcae_zone:
266     type: string
267     description: DCAE Zone to use in VM names created by DCAE controller
268
269   dcae_state:
270     type: string
271     description: DCAE State to use in VM names created by DCAE controller
272
273   nexus_repo_root:
274     type: string
275     description: Root URL of Nexus repository
276
277   nexus_url_snapshot:
278     type: string
279     description: Snapshot of Maven repository for DCAE deployment
280
281   openstack_region:
282     type: string
283     description: Region where the DCAE controller will spin the VMs
284
285   gitlab_branch:
286     type: string
287     description: Branch of the Gitlab repository
288     
289   dcae_code_version:
290     type: string
291     description: DCAE Code Version Number
292
293
294 #############
295 #           #
296 # RESOURCES #
297 #           #
298 #############
299
300 resources:
301   random-str:
302     type: OS::Heat::RandomString
303     properties:
304       length: 4
305
306
307   # Public key used to access ONAP components
308   vm_key:
309     type: OS::Nova::KeyPair
310     properties:
311       name:
312         str_replace:
313           template: base_rand
314           params:
315             base: { get_param: key_name }
316             rand: { get_resource: random-str }
317       public_key: { get_param: pub_key }
318       save_private_key: false
319
320
321   # ONAP management private network
322   oam_ecomp:
323     type: OS::Neutron::Net
324     properties:
325       name:
326         str_replace:
327           template: oam_ecomp_rand
328           params:
329             rand: { get_resource: random-str }
330
331   oam_ecomp_subnet:
332     type: OS::Neutron::Subnet
333     properties:
334       name:
335         str_replace:
336           template: oam_ecomp_rand
337           params:
338             rand: { get_resource: random-str }
339       network_id: { get_resource: oam_ecomp }
340       cidr: { get_param: oam_network_cidr }
341       dns_nameservers: { get_param: dns_list }
342
343   router:
344     type: OS::Neutron::Router
345     properties:
346       external_gateway_info:
347         network: { get_param: public_net_id }
348
349   router_interface:
350     type: OS::Neutron::RouterInterface
351     properties:
352       router_id: { get_resource: router }
353       subnet_id: { get_resource: oam_ecomp_subnet }
354
355
356   # DNS Server instantiation
357   dns_private_port:
358     type: OS::Neutron::Port
359     properties:
360       network: { get_resource: oam_ecomp }
361       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: dns_ip_addr }}]
362
363   dns_floating_ip:
364     type: OS::Neutron::FloatingIP
365     properties:
366       floating_network_id: { get_param: public_net_id }
367       port_id: { get_resource: dns_private_port }
368
369   dns_vm:
370     type: OS::Nova::Server
371     properties:
372       image: { get_param: ubuntu_1404_image }
373       flavor: { get_param: flavor_small }
374       name:
375         str_replace:
376           template: base-dns-server
377           params:
378             base: { get_param: vm_base_name }
379       key_name: { get_resource: vm_key }
380       networks:
381         - port: { get_resource: dns_private_port }
382       user_data_format: RAW
383       user_data:
384         str_replace:
385           params:
386             __nexus_repo__: { get_param: nexus_repo }
387             __artifacts_version__: { get_param: artifacts_version }
388             __oam_network_cidr__: { get_attr: [oam_ecomp_subnet, cidr] }
389             __dns_ip_addr__: { get_param: dns_ip_addr }
390             __aai1_ip_addr__: { get_param: aai1_ip_addr }
391             __aai2_ip_addr__: { get_param: aai2_ip_addr }
392             __appc_ip_addr__: { get_param: appc_ip_addr }
393             __dcae_ip_addr__: { get_param: dcae_ip_addr }
394             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
395             __mso_ip_addr__: { get_param: mso_ip_addr }
396             __mr_ip_addr__: { get_param: mr_ip_addr }
397             __policy_ip_addr__: { get_param: policy_ip_addr }
398             __portal_ip_addr__: { get_param: portal_ip_addr }
399             __robot_ip_addr__: { get_param: robot_ip_addr }
400             __sdc_ip_addr__: { get_param: sdc_ip_addr }
401             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
402             __vid_ip_addr__: { get_param: vid_ip_addr }
403             __cloud_env__: { get_param: cloud_env }
404             __external_dns__: { get_param: external_dns }
405           template: |
406             #!/bin/bash
407
408             # Create configuration files
409             mkdir -p /opt/config
410             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
411             echo "__cloud_env__" > /opt/config/cloud_env.txt
412             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
413             echo "__oam_network_cidr__" > /opt/config/oam_network_cidr.txt
414             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
415             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
416             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
417             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
418             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
419             echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
420             echo "__mso_ip_addr__" > /opt/config/mso_ip_addr.txt
421             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
422             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
423             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
424             echo "__robot_ip_addr__" > /opt/config/robot_ip_addr.txt
425             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
426             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
427             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
428             echo "__external_dns__" > /opt/config/external_dns.txt
429
430             # Download and run install script
431             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dns_install.sh -o /opt/dns_install.sh
432             cd /opt
433             chmod +x dns_install.sh
434             ./dns_install.sh
435
436
437   # A&AI instantiation (2 VMs)
438   aai1_private_port:
439     type: OS::Neutron::Port
440     properties:
441       network: { get_resource: oam_ecomp }
442       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: aai1_ip_addr }}]
443
444   aai1_floating_ip:
445     type: OS::Neutron::FloatingIP
446     properties:
447       floating_network_id: { get_param: public_net_id }
448       port_id: { get_resource: aai1_private_port }
449
450   aai1_vm:
451     type: OS::Nova::Server
452     depends_on: aai2_vm
453     properties:
454       image: { get_param: ubuntu_1404_image }
455       flavor: { get_param: flavor_xlarge }
456       name:
457         str_replace:
458           template: base-aai-inst1
459           params:
460             base: { get_param: vm_base_name }      
461       key_name: { get_resource: vm_key }
462       networks:
463         - port: { get_resource: aai1_private_port }
464       user_data_format: RAW
465       user_data:
466         str_replace:
467           params:
468             __nexus_repo__: { get_param: nexus_repo }
469             __nexus_docker_repo__: { get_param: nexus_docker_repo }
470             __nexus_username__: { get_param: nexus_username }
471             __nexus_password__: { get_param: nexus_password }
472             __dmaap_topic__: { get_param: dmaap_topic }
473             __artifacts_version__: { get_param: artifacts_version }
474             __dns_ip_addr__: { get_param: dns_ip_addr }
475             __docker_version__: { get_param: docker_version }
476             __gerrit_branch__: { get_param: gerrit_branch }
477             __cloud_env__: { get_param: cloud_env }
478             __external_dns__: { get_param: external_dns }
479           template: |
480             #!/bin/bash
481
482             # Create configuration files
483             mkdir -p /opt/config
484             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
485             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
486             echo "__nexus_username__" > /opt/config/nexus_username.txt
487             echo "__nexus_password__" > /opt/config/nexus_password.txt
488             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
489             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
490             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
491             echo "__docker_version__" > /opt/config/docker_version.txt
492             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
493             echo "aai_instance_1" > /opt/config/aai_instance.txt
494             echo "__cloud_env__" > /opt/config/cloud_env.txt
495             echo "__external_dns__" > /opt/config/external_dns.txt
496
497             # Download and run install script
498             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aai2_install.sh -o /opt/aai2_install.sh
499             cd /opt
500             chmod +x aai2_install.sh
501             ./aai2_install.sh
502
503
504   aai2_private_port:
505     type: OS::Neutron::Port
506     properties:
507       network: { get_resource: oam_ecomp }
508       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: aai2_ip_addr }}]
509
510   aai2_floating_ip:
511     type: OS::Neutron::FloatingIP
512     properties:
513       floating_network_id: { get_param: public_net_id }
514       port_id: { get_resource: aai2_private_port }
515
516   aai2_vm:
517     type: OS::Nova::Server
518     properties:
519       image: { get_param: ubuntu_1404_image }
520       flavor: { get_param: flavor_xlarge }
521       name:
522         str_replace:
523           template: base-aai-inst2
524           params:
525             base: { get_param: vm_base_name }      
526       key_name: { get_resource: vm_key }
527       networks:
528         - port: { get_resource: aai2_private_port }
529       user_data_format: RAW
530       user_data:
531         str_replace:
532           params:
533             __nexus_repo__: { get_param: nexus_repo }
534             __nexus_docker_repo__: { get_param: nexus_docker_repo }
535             __nexus_username__: { get_param: nexus_username }
536             __nexus_password__: { get_param: nexus_password }
537             __dmaap_topic__: { get_param: dmaap_topic }
538             __artifacts_version__: { get_param: artifacts_version }
539             __dns_ip_addr__: { get_param: dns_ip_addr }
540             __docker_version__: { get_param: docker_version }
541             __gerrit_branch__: { get_param: gerrit_branch }
542             __cloud_env__: { get_param: cloud_env }
543             __external_dns__: { get_param: external_dns }
544           template: |
545             #!/bin/bash
546
547             # Create configuration files
548             mkdir -p /opt/config
549             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
550             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
551             echo "__nexus_username__" > /opt/config/nexus_username.txt
552             echo "__nexus_password__" > /opt/config/nexus_password.txt
553             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
554             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
555             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
556             echo "__docker_version__" > /opt/config/docker_version.txt
557             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
558             echo "aai_instance_2" > /opt/config/aai_instance.txt
559             echo "__cloud_env__" > /opt/config/cloud_env.txt
560             echo "__external_dns__" > /opt/config/external_dns.txt
561
562             # Download and run install script
563             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aai2_install.sh -o /opt/aai2_install.sh
564             cd /opt
565             chmod +x aai2_install.sh
566             ./aai2_install.sh
567
568
569   # MSO instantiation
570   mso_private_port:
571     type: OS::Neutron::Port
572     properties:
573       network: { get_resource: oam_ecomp }
574       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: mso_ip_addr }}]
575
576   mso_floating_ip:
577     type: OS::Neutron::FloatingIP
578     properties:
579       floating_network_id: { get_param: public_net_id }
580       port_id: { get_resource: mso_private_port }
581
582   mso_vm:
583     type: OS::Nova::Server
584     properties:
585       image: { get_param: ubuntu_1604_image }
586       flavor: { get_param: flavor_large }
587       name:
588         str_replace:
589           template: base-mso
590           params:
591             base: { get_param: vm_base_name }      
592       key_name: { get_resource: vm_key }
593       networks:
594         - port: { get_resource: mso_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             __openstack_username__: { get_param: openstack_username }
604             __openstack_tenant_id__: { get_param: openstack_tenant_id }
605             __openstack_api_key__: { get_param: openstack_api_key }
606             __openstack_region__: { get_param: openstack_region }
607             __keystone_url__: { get_param: keystone_url }
608             __dmaap_topic__: { get_param: dmaap_topic }
609             __artifacts_version__: { get_param: artifacts_version }
610             __dns_ip_addr__: { get_param: dns_ip_addr }
611             __docker_version__: { get_param: docker_version }
612             __gerrit_branch__: { get_param: gerrit_branch }
613             __cloud_env__: { get_param: cloud_env }
614             __external_dns__: { get_param: external_dns }
615           template: |
616             #!/bin/bash
617
618             # Create configuration files
619             mkdir -p /opt/config
620             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
621             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
622             echo "__nexus_username__" > /opt/config/nexus_username.txt
623             echo "__nexus_password__" > /opt/config/nexus_password.txt
624             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
625             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
626             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
627             echo "__openstack_username__" > /opt/config/openstack_username.txt
628             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
629             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
630             echo "__openstack_region__" > /opt/config/openstack_region.txt
631             echo "__keystone_url__" > /opt/config/keystone.txt
632             echo "__docker_version__" > /opt/config/docker_version.txt
633             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
634             echo "__cloud_env__" > /opt/config/cloud_env.txt
635             echo "__external_dns__" > /opt/config/external_dns.txt
636
637             # Download and run install script
638             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/mso_install.sh -o /opt/mso_install.sh
639             cd /opt
640             chmod +x mso_install.sh
641             ./mso_install.sh
642
643
644   # Message Router instantiation
645   mrouter_private_port:
646     type: OS::Neutron::Port
647     properties:
648       network: { get_resource: oam_ecomp }
649       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: mr_ip_addr }}]
650
651   mrouter_floating_ip:
652     type: OS::Neutron::FloatingIP
653     properties:
654       floating_network_id: { get_param: public_net_id }
655       port_id: { get_resource: mrouter_private_port }
656
657   mrouter_vm:
658     type: OS::Nova::Server
659     properties:
660       image: { get_param: ubuntu_1404_image }
661       flavor: { get_param: flavor_large }
662       name:
663         str_replace: 
664           template: base-message-router
665           params:
666             base: { get_param: vm_base_name }
667       key_name: { get_resource: vm_key }
668       networks:
669         - port: { get_resource: mrouter_private_port }
670       user_data_format: RAW
671       user_data:
672         str_replace:
673           params:
674             __nexus_repo__: { get_param: nexus_repo }
675             __nexus_docker_repo__: { get_param: nexus_docker_repo }
676             __nexus_username__: { get_param: nexus_username }
677             __nexus_password__: { get_param: nexus_password }
678             __artifacts_version__: { get_param: artifacts_version }
679             __dns_ip_addr__: { get_param: dns_ip_addr }
680             __gerrit_branch__: { get_param: gerrit_branch }
681             __cloud_env__: { get_param: cloud_env }
682             __external_dns__: { get_param: external_dns }
683           template: |
684             #!/bin/bash
685
686             # Create configuration files
687             mkdir -p /opt/config
688             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
689             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
690             echo "__nexus_username__" > /opt/config/nexus_username.txt
691             echo "__nexus_password__" > /opt/config/nexus_password.txt
692             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
693             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
694             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
695             echo "__cloud_env__" > /opt/config/cloud_env.txt
696             echo "__external_dns__" > /opt/config/external_dns.txt
697
698             # Download and run install script
699             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/mr_install.sh -o /opt/mr_install.sh
700             cd /opt
701             chmod +x mr_install.sh
702             ./mr_install.sh
703
704
705   # Robot Framework instantiation
706   robot_private_port:
707     type: OS::Neutron::Port
708     properties:
709       network: { get_resource: oam_ecomp }
710       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: robot_ip_addr }}]
711
712   robot_floating_ip:
713     type: OS::Neutron::FloatingIP
714     properties:
715       floating_network_id: { get_param: public_net_id }
716       port_id: { get_resource: robot_private_port }
717  
718   robot_vm:
719     type: OS::Nova::Server
720     properties:
721       image: { get_param: ubuntu_1604_image }
722       flavor: { get_param: flavor_small }
723       name:
724         str_replace: 
725           template: base-robot
726           params:
727             base: { get_param: vm_base_name }
728       key_name: { get_resource: vm_key }
729       networks:
730         - port: { get_resource: robot_private_port }
731       user_data_format: RAW
732       user_data:
733         str_replace:
734           params:
735             __nexus_repo__: { get_param: nexus_repo }
736             __nexus_docker_repo__: { get_param: nexus_docker_repo }
737             __nexus_username__: { get_param: nexus_username }
738             __nexus_password__: { get_param: nexus_password }
739             __network_name__: { get_attr: [oam_ecomp, name] }
740             __openstack_username__: { get_param: openstack_username }
741             __openstack_api_key__: { get_param : openstack_api_key }
742             __artifacts_version__: { get_param: artifacts_version }
743             __openstack_region__: { get_param: openstack_region }
744             __dns_ip_addr__: { get_param: dns_ip_addr }
745             __docker_version__: { get_param: docker_version }
746             __gerrit_branch__: { get_param: gerrit_branch }
747             __cloud_env__: { get_param: cloud_env }
748             __keystone_url__: { get_param: keystone_url }
749             __aai1_ip_addr__: { get_param: aai1_ip_addr }
750             __aai2_ip_addr__: { get_param: aai2_ip_addr }
751             __appc_ip_addr__: { get_param: appc_ip_addr }
752             __dcae_ip_addr__: { get_param: dcae_ip_addr }
753             __mso_ip_addr__: { get_param: mso_ip_addr }
754             __mr_ip_addr__: { get_param: mr_ip_addr }
755             __policy_ip_addr__: { get_param: policy_ip_addr }
756             __portal_ip_addr__: { get_param: portal_ip_addr }
757             __sdc_ip_addr__: { get_param: sdc_ip_addr }
758             __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
759             __vid_ip_addr__: { get_param: vid_ip_addr }
760             __external_dns__: { get_param: external_dns }
761           template: |
762             #!/bin/bash
763
764             # Create configuration files
765             mkdir -p /opt/config
766             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
767             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
768             echo "__nexus_username__" > /opt/config/nexus_username.txt
769             echo "__nexus_password__" > /opt/config/nexus_password.txt
770             echo "__network_name__" > /opt/config/network.txt
771             echo "__openstack_username__" > /opt/config/openstack_username.txt
772             echo "__openstack_api_key__" > /opt/config/openstack_password.txt
773             echo "__openstack_region__" > /opt/config/region.txt
774             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
775             echo "__docker_version__" > /opt/config/docker_version.txt
776             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
777             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
778             echo "__keystone_url__" > /opt/config/keystone.txt
779             echo "__aai1_ip_addr__" > /opt/config/aai1_ip_addr.txt
780             echo "__aai2_ip_addr__" > /opt/config/aai2_ip_addr.txt
781             echo "__appc_ip_addr__" > /opt/config/appc_ip_addr.txt
782             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
783             echo "__mso_ip_addr__" > /opt/config/mso_ip_addr.txt
784             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
785             echo "__policy_ip_addr__" > /opt/config/policy_ip_addr.txt
786             echo "__portal_ip_addr__" > /opt/config/portal_ip_addr.txt
787             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
788             echo "__sdnc_ip_addr__" > /opt/config/sdnc_ip_addr.txt
789             echo "__vid_ip_addr__" > /opt/config/vid_ip_addr.txt
790             echo "__cloud_env__" > /opt/config/cloud_env.txt
791             echo "__external_dns__" > /opt/config/external_dns.txt
792
793             # Download and run install script
794             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/robot_install.sh -o /opt/robot_install.sh
795             cd /opt
796             chmod +x robot_install.sh
797             ./robot_install.sh
798
799
800   # VID instantiation
801   vid_private_port:
802     type: OS::Neutron::Port
803     properties:
804       network: { get_resource: oam_ecomp }
805       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: vid_ip_addr }}]
806
807   vid_floating_ip:
808     type: OS::Neutron::FloatingIP
809     properties:
810       floating_network_id: { get_param: public_net_id }
811       port_id: { get_resource: vid_private_port }
812
813   vid_vm:
814     type: OS::Nova::Server
815     properties:
816       image: { get_param: ubuntu_1404_image }
817       flavor: { get_param: flavor_medium }
818       name:
819         str_replace: 
820           template: base-vid
821           params:
822             base: { get_param: vm_base_name }
823       key_name: { get_resource: vm_key }
824       networks:
825         - port: { get_resource: vid_private_port }
826       user_data_format: RAW
827       user_data:
828         str_replace:
829           params:
830             __nexus_repo__: { get_param: nexus_repo }
831             __nexus_docker_repo__: { get_param: nexus_docker_repo }
832             __nexus_username__: { get_param: nexus_username }
833             __nexus_password__: { get_param: nexus_password }
834             __artifacts_version__: { get_param: artifacts_version }
835             __dns_ip_addr__: { get_param: dns_ip_addr }
836             __docker_version__: { get_param: docker_version }
837             __gerrit_branch__: { get_param: gerrit_branch }
838             __cloud_env__: { get_param: cloud_env }
839             __external_dns__: { get_param: external_dns }
840           template: |
841             #!/bin/bash
842
843             # Create configuration files
844             mkdir -p /opt/config
845             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
846             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
847             echo "__nexus_username__" > /opt/config/nexus_username.txt
848             echo "__nexus_password__" > /opt/config/nexus_password.txt
849             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
850             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
851             echo "__docker_version__" > /opt/config/docker_version.txt
852             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
853             echo "__cloud_env__" > /opt/config/cloud_env.txt
854             echo "__external_dns__" > /opt/config/external_dns.txt
855
856             # Download and run install script
857             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/vid_install.sh -o /opt/vid_install.sh
858             cd /opt
859             chmod +x vid_install.sh
860             ./vid_install.sh
861
862  
863   # SDN-C instantiation
864   sdnc_private_port:
865     type: OS::Neutron::Port
866     properties:
867       network: { get_resource: oam_ecomp }
868       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: sdnc_ip_addr }}]
869
870   sdnc_floating_ip:
871     type: OS::Neutron::FloatingIP
872     properties:
873       floating_network_id: { get_param: public_net_id }
874       port_id: { get_resource: sdnc_private_port }
875
876   sdnc_vm:
877     type: OS::Nova::Server
878     properties:
879       image: { get_param: ubuntu_1404_image }
880       flavor: { get_param: flavor_large }
881       name:
882         str_replace: 
883           template: base-sdnc
884           params:
885             base: { get_param: vm_base_name }
886       key_name: { get_resource: vm_key }
887       networks:
888         - port: { get_resource: sdnc_private_port }
889       user_data_format: RAW
890       user_data:
891         str_replace:
892           params:
893             __nexus_repo__: { get_param: nexus_repo }
894             __nexus_docker_repo__: { get_param: nexus_docker_repo }
895             __nexus_username__: { get_param: nexus_username }
896             __nexus_password__: { get_param: nexus_password }
897             __artifacts_version__: { get_param: artifacts_version }
898             __dns_ip_addr__: { get_param: dns_ip_addr }
899             __docker_version__: { get_param: docker_version }
900             __gerrit_branch__: { get_param: gerrit_branch }
901             __cloud_env__: { get_param: cloud_env }
902             __external_dns__: { get_param: external_dns }
903           template: |
904             #!/bin/bash
905
906             # Create configuration files
907             mkdir -p /opt/config
908             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
909             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
910             echo "__nexus_username__" > /opt/config/nexus_username.txt
911             echo "__nexus_password__" > /opt/config/nexus_password.txt
912             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
913             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
914             echo "__docker_version__" > /opt/config/docker_version.txt
915             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
916             echo "__cloud_env__" > /opt/config/cloud_env.txt
917             echo "__external_dns__" > /opt/config/external_dns.txt
918
919             # Download and run install script
920             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdnc_install.sh -o /opt/sdnc_install.sh
921             cd /opt
922             chmod +x sdnc_install.sh
923             ./sdnc_install.sh
924
925
926   # SDC instantiation
927   sdc_private_port:
928     type: OS::Neutron::Port
929     properties:
930       network: { get_resource: oam_ecomp }
931       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: sdc_ip_addr }}]
932
933   sdc_floating_ip:
934     type: OS::Neutron::FloatingIP
935     properties:
936       floating_network_id: { get_param: public_net_id }
937       port_id: { get_resource: sdc_private_port }
938
939   sdc_volume_data:
940     type: OS::Cinder::Volume
941     properties:
942       name: vol1-sdc-data
943       size: 100
944
945   sdc_vm:
946     type: OS::Nova::Server
947     properties:
948       image: { get_param: ubuntu_1604_image }
949       flavor: { get_param: flavor_xlarge }
950       name:
951         str_replace: 
952           template: base-sdc
953           params:
954             base: { get_param: vm_base_name }
955       key_name: { get_resource: vm_key }
956       networks:
957         - port: { get_resource: sdc_private_port }
958       block_device_mapping:
959         - device_name: /dev/vdb
960           volume_id: {get_resource: sdc_volume_data}
961       user_data_format: RAW
962       user_data:
963         str_replace:
964           params:
965             __nexus_repo__: { get_param: nexus_repo }
966             __nexus_docker_repo__: { get_param: nexus_docker_repo }
967             __nexus_username__: { get_param: nexus_username }
968             __nexus_password__: { get_param: nexus_password }
969             __env_name__: { get_param: dmaap_topic }
970             __artifacts_version__: { get_param: artifacts_version }
971             __dns_ip_addr__: { get_param: dns_ip_addr }
972             __mr_ip_addr__: { get_param: mr_ip_addr }
973             __public_ip__: { get_attr: [sdc_floating_ip, floating_ip_address] }
974             __docker_version__: { get_param: docker_version }
975             __gerrit_branch__: { get_param: gerrit_branch }
976             __cloud_env__: { get_param: cloud_env }
977             __external_dns__: { get_param: external_dns }
978           template: |
979             #!/bin/bash
980
981             # Create configuration files
982             mkdir -p /opt/config
983             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
984             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
985             echo "__nexus_username__" > /opt/config/nexus_username.txt
986             echo "__nexus_password__" > /opt/config/nexus_password.txt
987             echo "__env_name__" > /opt/config/env_name.txt
988             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
989             echo "__public_ip__" > /opt/config/public_ip.txt
990             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
991             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
992             echo "__docker_version__" > /opt/config/docker_version.txt
993             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
994             echo "__cloud_env__" > /opt/config/cloud_env.txt
995             echo "__external_dns__" > /opt/config/external_dns.txt
996
997             # Download and run install script
998             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/asdc_install.sh -o /opt/asdc_install.sh
999             cd /opt
1000             chmod +x asdc_install.sh
1001             ./asdc_install.sh
1002
1003
1004   # PORTAL instantiation
1005   portal_private_port:
1006     type: OS::Neutron::Port
1007     properties:
1008       network: { get_resource: oam_ecomp }
1009       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: portal_ip_addr }}]
1010
1011   portal_floating_ip:
1012     type: OS::Neutron::FloatingIP
1013     properties:
1014       floating_network_id: { get_param: public_net_id }
1015       port_id: { get_resource: portal_private_port }
1016
1017   portal_vm:
1018     type: OS::Nova::Server
1019     properties:
1020       image: { get_param: ubuntu_1404_image }
1021       flavor: { get_param: flavor_large }
1022       name:
1023         str_replace: 
1024           template: base-portal
1025           params:
1026             base: { get_param: vm_base_name }
1027       key_name: { get_resource: vm_key }
1028       networks:
1029         - port: { get_resource: portal_private_port }
1030       user_data_format: RAW
1031       user_data:
1032         str_replace:
1033           params:
1034             __nexus_repo__: { get_param: nexus_repo }
1035             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1036             __nexus_username__: { get_param: nexus_username }
1037             __nexus_password__: { get_param: nexus_password }
1038             __artifacts_version__: { get_param: artifacts_version }
1039             __dns_ip_addr__: { get_param: dns_ip_addr }
1040             __public_ip__: { get_attr: [portal_floating_ip, floating_ip_address] }
1041             __docker_version__: { get_param: docker_version }
1042             __gerrit_branch__: { get_param: gerrit_branch }
1043             __cloud_env__: { get_param: cloud_env }
1044             __external_dns__: { get_param: external_dns }
1045           template: |
1046             #!/bin/bash
1047
1048             # Create configuration files
1049             mkdir -p /opt/config
1050             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1051             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1052             echo "__nexus_username__" > /opt/config/nexus_username.txt
1053             echo "__nexus_password__" > /opt/config/nexus_password.txt
1054             echo "__public_ip__" > /opt/config/public_ip.txt
1055             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1056             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1057             echo "__docker_version__" > /opt/config/docker_version.txt
1058             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1059             echo "__cloud_env__" > /opt/config/cloud_env.txt
1060             echo "__external_dns__" > /opt/config/external_dns.txt
1061
1062             # Download and run install script
1063             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/portal_install.sh -o /opt/portal_install.sh
1064             cd /opt
1065             chmod +x portal_install.sh
1066             ./portal_install.sh
1067
1068
1069   # DCAE Controller instantiation
1070   dcae_c_private_port:
1071     type: OS::Neutron::Port
1072     properties:
1073       network: { get_resource: oam_ecomp }
1074       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
1075
1076   dcae_c_floating_ip:
1077     type: OS::Neutron::FloatingIP
1078     properties:
1079       floating_network_id: { get_param: public_net_id }
1080       port_id: { get_resource: dcae_c_private_port }
1081
1082   dcae_c_vm:
1083     type: OS::Nova::Server
1084     properties:
1085       image: { get_param: ubuntu_1404_image }
1086       flavor: { get_param: flavor_medium }
1087       name:
1088         str_replace: 
1089           template: base-dcae-controller
1090           params:
1091             base: { get_param: vm_base_name }
1092       key_name: { get_resource: vm_key }
1093       networks:
1094         - port: { get_resource: dcae_c_private_port }
1095       user_data_format: RAW
1096       user_data:
1097         str_replace:
1098           params:
1099             __nexus_repo__: { get_param: nexus_repo }
1100             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1101             __nexus_username__: { get_param: nexus_username }
1102             __nexus_password__: { get_param: nexus_password }
1103             __nexus_url_snapshots__: { get_param: nexus_url_snapshot }
1104             __gitlab_branch__: { get_param: gitlab_branch }
1105             __dns_ip_addr__: { get_param: dns_ip_addr }
1106             __dcae_zone__: { get_param: dcae_zone }
1107             __dcae_state__: { get_param: dcae_state }
1108             __artifacts_version__: { get_param: artifacts_version }
1109             __tenant_id__: { get_param: openstack_tenant_id }
1110             __openstack_private_network_name__: { get_attr: [oam_ecomp, name] }
1111             __openstack_user__: { get_param: openstack_username }
1112             __openstack_password__: { get_param: openstack_api_key }
1113             __openstack_auth_method__: { get_param: openstack_auth_method }
1114             __key_name__: { get_param: key_name }
1115             __rand_str__: { get_resource: random-str }
1116             __pub_key__: { get_param: pub_key }
1117             __nexus_repo_root__: { get_param: nexus_repo_root }
1118             __openstack_region__: { get_param: openstack_region }
1119             __horizon_url__: { get_param: horizon_url }
1120             __keystone_url__: { get_param: keystone_url }
1121             __docker_version__: { get_param: docker_version }
1122             __gerrit_branch__: { get_param: gerrit_branch }
1123             __dcae_code_version__: { get_param: dcae_code_version }
1124             __cloud_env__: { get_param: cloud_env }
1125             __public_net_id__: { get_param: public_net_id }
1126             __dcae_base_environment__: { get_param: dcae_base_environment }
1127             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1128             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
1129             __dcae_db_ip_addr__: { get_param: dcae_db_ip_addr }
1130             __dcae_hdp1_ip_addr__: { get_param: dcae_hdp1_ip_addr }
1131             __dcae_hdp2_ip_addr__: { get_param: dcae_hdp2_ip_addr }
1132             __dcae_hdp3_ip_addr__: { get_param: dcae_hdp3_ip_addr }
1133             __dcae_float_ip__: { get_attr: [dcae_c_floating_ip, floating_ip_address] }
1134             __dcae_coll_float_ip__: { get_param: dcae_coll_float_ip }
1135             __dcae_db_float_ip__: { get_param: dcae_db_float_ip }
1136             __dcae_hdp1_float_ip__: { get_param: dcae_hdp1_float_ip }
1137             __dcae_hdp2_float_ip__: { get_param: dcae_hdp2_float_ip }
1138             __dcae_hdp3_float_ip__: { get_param: dcae_hdp3_float_ip }
1139             __external_dns__: { get_param: external_dns }
1140             __ubuntu_1404_image__: { get_param: ubuntu_1404_image }
1141             __ubuntu_1604_image__: { get_param: ubuntu_1604_image }
1142             __flavor_small__: { get_param: flavor_small }
1143             __flavor_medium__: { get_param: flavor_medium }
1144             __flavor_large__: { get_param: flavor_large }
1145             __flavor_xlarge__: { get_param: flavor_xlarge }
1146           template: |
1147             #!/bin/bash
1148
1149             # Create configuration files
1150             mkdir -p /opt/config
1151             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1152             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1153             echo "__nexus_username__" > /opt/config/nexus_username.txt
1154             echo "__nexus_password__" > /opt/config/nexus_password.txt
1155             echo "__nexus_url_snapshots__" > /opt/config/nexus_url_snapshots.txt
1156             echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
1157             echo "__docker_version__" > /opt/config/docker_version.txt
1158             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1159             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1160             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1161             echo "__dcae_zone__" > /opt/config/dcae_zone.txt
1162             echo "__dcae_state__" > /opt/config/dcae_state.txt
1163             echo "__tenant_id__" > /opt/config/tenant_id.txt
1164             echo "__openstack_private_network_name__" > /opt/config/openstack_private_network_name.txt
1165             echo "__openstack_user__" > /opt/config/openstack_user.txt
1166             echo "__openstack_password__" > /opt/config/openstack_password.txt
1167             echo "__openstack_auth_method__" > /opt/config/openstack_auth_method.txt
1168             echo "__key_name__" > /opt/config/key_name.txt
1169             echo "__rand_str__" > /opt/config/rand_str.txt
1170             echo "__pub_key__" > /opt/config/pub_key.txt
1171             echo "__nexus_repo_root__" > /opt/config/nexus_repo_root.txt
1172             echo "__openstack_region__" > /opt/config/openstack_region.txt
1173             echo "__horizon_url__" > /opt/config/horizon_url.txt
1174             echo "__keystone_url__" > /opt/config/keystone_url.txt
1175             echo "__cloud_env__" > /opt/config/cloud_env.txt
1176             echo "__public_net_id__" > /opt/config/public_net_id.txt
1177             echo "__dcae_base_environment__" > /opt/config/dcae_base_environment.txt
1178             echo "__dcae_code_version__" > /opt/config/dcae_code_version.txt
1179             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1180             echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
1181             echo "__dcae_db_ip_addr__" > /opt/config/dcae_db_ip_addr.txt
1182             echo "__dcae_hdp1_ip_addr__" > /opt/config/dcae_hdp1_ip_addr.txt
1183             echo "__dcae_hdp2_ip_addr__" > /opt/config/dcae_hdp2_ip_addr.txt
1184             echo "__dcae_hdp3_ip_addr__" > /opt/config/dcae_hdp3_ip_addr.txt
1185             echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
1186             echo "__dcae_coll_float_ip__" > /opt/config/dcae_coll_float_ip.txt
1187             echo "__dcae_db_float_ip__" > /opt/config/dcae_db_float_ip.txt
1188             echo "__dcae_hdp1_float_ip__" > /opt/config/dcae_hdp1_float_ip.txt
1189             echo "__dcae_hdp2_float_ip__" > /opt/config/dcae_hdp2_float_ip.txt
1190             echo "__dcae_hdp3_float_ip__" > /opt/config/dcae_hdp3_float_ip.txt
1191             echo "__external_dns__" > /opt/config/external_dns.txt
1192             echo "__ubuntu_1404_image__" > /opt/config/ubuntu_1404_image.txt
1193             echo "__ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1194             echo "__flavor_small__" > /opt/config/flavor_small.txt
1195             echo "__flavor_medium__" > /opt/config/flavor_medium.txt
1196             echo "__flavor_large__" > /opt/config/flavor_large.txt
1197             echo "__flavor_xlarge__" > /opt/config/flavor_xlarge.txt
1198
1199             # Download and run install script
1200             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/dcae_install.sh -o /opt/dcae_install.sh
1201             cd /opt
1202             chmod +x dcae_install.sh
1203             ./dcae_install.sh
1204
1205
1206   # Policy Engine instantiation
1207   policy_private_port:
1208     type: OS::Neutron::Port
1209     properties:
1210       network: { get_resource: oam_ecomp }
1211       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: policy_ip_addr }}]
1212
1213   policy_floating_ip:
1214     type: OS::Neutron::FloatingIP
1215     properties:
1216       floating_network_id: { get_param: public_net_id }
1217       port_id: { get_resource: policy_private_port }
1218
1219   policy_vm:
1220     type: OS::Nova::Server
1221     properties:
1222       image: { get_param: ubuntu_1404_image }
1223       flavor: { get_param: flavor_xlarge }
1224       name:
1225         str_replace: 
1226           template: base-policy
1227           params:
1228             base: { get_param: vm_base_name }
1229       key_name: { get_resource: vm_key }
1230       networks:
1231         - port: { get_resource: policy_private_port }
1232       user_data_format: RAW
1233       user_data:
1234         str_replace:
1235           params:
1236             __nexus_repo__: { get_param: nexus_repo }
1237             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1238             __nexus_username__: { get_param: nexus_username }
1239             __nexus_password__: { get_param: nexus_password }
1240             __artifacts_version__: { get_param: artifacts_version }
1241             __dns_ip_addr__: { get_param: dns_ip_addr }
1242             __public_ip__: { get_attr: [policy_floating_ip, floating_ip_address] }
1243             __docker_version__: { get_param: docker_version }
1244             __gerrit_branch__: { get_param: gerrit_branch }
1245             __cloud_env__: { get_param: cloud_env }
1246             __external_dns__: { get_param: external_dns }
1247           template: |
1248             #!/bin/bash
1249
1250             # Create configuration files
1251             mkdir -p /opt/config
1252             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1253             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1254             echo "__nexus_username__" > /opt/config/nexus_username.txt
1255             echo "__nexus_password__" > /opt/config/nexus_password.txt
1256             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1257             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1258             echo "__public_ip__" > /opt/config/public_ip.txt
1259             echo "__docker_version__" > /opt/config/docker_version.txt
1260             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1261             echo "__cloud_env__" > /opt/config/cloud_env.txt
1262             echo "__external_dns__" > /opt/config/external_dns.txt
1263
1264             # Download and run install script
1265             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/policy_install.sh -o /opt/policy_install.sh
1266             cd /opt
1267             chmod +x policy_install.sh
1268             ./policy_install.sh
1269
1270
1271   # APP-C instantiation
1272   appc_private_port:
1273     type: OS::Neutron::Port
1274     properties:
1275       network: { get_resource: oam_ecomp }
1276       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: appc_ip_addr }}]
1277
1278   appc_floating_ip:
1279     type: OS::Neutron::FloatingIP
1280     properties:
1281       floating_network_id: { get_param: public_net_id }
1282       port_id: { get_resource: appc_private_port }
1283
1284   appc_vm:
1285     type: OS::Nova::Server
1286     properties:
1287       image: { get_param: ubuntu_1404_image }
1288       flavor: { get_param: flavor_large }
1289       name:
1290         str_replace: 
1291           template: base-appc
1292           params:
1293             base: { get_param: vm_base_name }
1294       key_name: { get_resource: vm_key }
1295       networks:
1296         - port: { get_resource: appc_private_port }
1297       user_data_format: RAW
1298       user_data:
1299         str_replace:
1300           params:
1301             __nexus_repo__: { get_param: nexus_repo }
1302             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1303             __nexus_username__: { get_param: nexus_username }
1304             __nexus_password__: { get_param: nexus_password }
1305             __dmaap_topic__: { get_param: dmaap_topic }
1306             __artifacts_version__: { get_param: artifacts_version }
1307             __dns_ip_addr__: { get_param: dns_ip_addr }
1308             __docker_version__: { get_param: docker_version }
1309             __gerrit_branch__: { get_param: gerrit_branch }
1310             __cloud_env__: { get_param: cloud_env }
1311             __external_dns__: { get_param: external_dns }
1312           template: |
1313             #!/bin/bash
1314
1315             # Create configuration files
1316             mkdir -p /opt/config
1317             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1318             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1319             echo "__nexus_username__" > /opt/config/nexus_username.txt
1320             echo "__nexus_password__" > /opt/config/nexus_password.txt
1321             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1322             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1323             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1324             echo "__docker_version__" > /opt/config/docker_version.txt
1325             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1326             echo "__cloud_env__" > /opt/config/cloud_env.txt
1327             echo "__external_dns__" > /opt/config/external_dns.txt
1328
1329             # Download and run install script
1330             curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/appc_install.sh -o /opt/appc_install.sh
1331             cd /opt
1332             chmod +x appc_install.sh
1333             ./appc_install.sh