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