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