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