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