Assign public interface to vFW in OpenStack
[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             __external_dns__: { get_param: external_dns }
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             echo "__external_dns__" > /opt/config/external_dns.txt
474
475             # Download and run install script
476             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dns_install.sh -o /opt/dns_install.sh
477             cd /opt
478             chmod +x dns_install.sh
479             ./dns_install.sh
480
481
482   # A&AI instantiation
483   aai_private_port:
484     type: OS::Neutron::Port
485     properties:
486       network: { get_resource: oam_ecomp }
487       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: aai_ip_addr }}]
488
489   aai_floating_ip:
490     type: OS::Neutron::FloatingIP
491     properties:
492       floating_network_id: { get_param: public_net_id }
493       port_id: { get_resource: aai_private_port }
494       floating_ip_address: { get_param: aai_float_ip }
495
496   aai_vm:
497     type: OS::Nova::Server
498     properties:
499       image: { get_param: ubuntu_1404_image }
500       flavor: { get_param: flavor_xlarge }
501       name:
502         str_replace:
503           template: base-aai
504           params:
505             base: { get_param: vm_base_name }      
506       key_name: { get_resource: vm_key }
507       networks:
508         - port: { get_resource: aai_private_port }
509       user_data_format: RAW
510       user_data:
511         str_replace:
512           params:
513             __nexus_repo__: { get_param: nexus_repo }
514             __nexus_docker_repo__: { get_param: nexus_docker_repo }
515             __nexus_username__: { get_param: nexus_username }
516             __nexus_password__: { get_param: nexus_password }
517             __dmaap_topic__: { get_param: dmaap_topic }
518             __artifacts_version__: { get_param: artifacts_version }
519             __dns_ip_addr__: { get_param: dns_ip_addr }
520             __sdc_ip_addr__: { get_param: sdc_ip_addr }
521             __docker_version__: { get_param: docker_version }
522             __cloud_env__: { get_param: cloud_env }
523             __external_dns__: { get_param: external_dns }
524           template: |
525             #!/bin/bash
526
527             # Create configuration files
528             mkdir -p /opt/config
529             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
530             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
531             echo "__nexus_username__" > /opt/config/nexus_username.txt
532             echo "__nexus_password__" > /opt/config/nexus_password.txt
533             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
534             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
535             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
536             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
537             echo "__docker_version__" > /opt/config/docker_version.txt
538             echo "__cloud_env__" > /opt/config/cloud_env.txt
539             echo "__external_dns__" > /opt/config/external_dns.txt
540
541             # Download and run install script
542             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/aai_install.sh -o /opt/aai_install.sh
543             cd /opt
544             chmod +x aai_install.sh
545             ./aai_install.sh
546
547
548   # MSO instantiation
549   mso_private_port:
550     type: OS::Neutron::Port
551     properties:
552       network: { get_resource: oam_ecomp }
553       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: mso_ip_addr }}]
554
555   mso_floating_ip:
556     type: OS::Neutron::FloatingIP
557     properties:
558       floating_network_id: { get_param: public_net_id }
559       port_id: { get_resource: mso_private_port }
560       floating_ip_address: { get_param: mso_float_ip }
561
562   mso_vm:
563     type: OS::Nova::Server
564     properties:
565       image: { get_param: ubuntu_1604_image }
566       flavor: { get_param: flavor_large }
567       name:
568         str_replace:
569           template: base-mso
570           params:
571             base: { get_param: vm_base_name }      
572       key_name: { get_resource: vm_key }
573       networks:
574         - port: { get_resource: mso_private_port }
575       user_data_format: RAW
576       user_data:
577         str_replace:
578           params:
579             __nexus_repo__: { get_param: nexus_repo }
580             __nexus_docker_repo__: { get_param: nexus_docker_repo }
581             __nexus_username__: { get_param: nexus_username }
582             __nexus_password__: { get_param: nexus_password }
583             __openstack_username__: { get_param: openstack_username }
584             __openstack_tenant_id__: { get_param: openstack_tenant_id }
585             __openstack_api_key__: { get_param: openstack_api_key }
586             __openstack_region__: { get_param: openstack_region }
587             __keystone_url__: { get_param: keystone_url }
588             __dmaap_topic__: { get_param: dmaap_topic }
589             __artifacts_version__: { get_param: artifacts_version }
590             __dns_ip_addr__: { get_param: dns_ip_addr }
591             __docker_version__: { get_param: docker_version }
592             __gerrit_branch__: { get_param: gerrit_branch }
593             __cloud_env__: { get_param: cloud_env }
594             __external_dns__: { get_param: external_dns }
595           template: |
596             #!/bin/bash
597
598             # Create configuration files
599             mkdir -p /opt/config
600             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
601             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
602             echo "__nexus_username__" > /opt/config/nexus_username.txt
603             echo "__nexus_password__" > /opt/config/nexus_password.txt
604             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
605             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
606             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
607             echo "__openstack_username__" > /opt/config/openstack_username.txt
608             echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
609             echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
610             echo "__openstack_region__" > /opt/config/openstack_region.txt
611             echo "__keystone_url__" > /opt/config/keystone.txt
612             echo "__docker_version__" > /opt/config/docker_version.txt
613             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
614             echo "__cloud_env__" > /opt/config/cloud_env.txt
615             echo "__external_dns__" > /opt/config/external_dns.txt
616
617             # Download and run install script
618             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_install.sh -o /opt/mso_install.sh
619             cd /opt
620             chmod +x mso_install.sh
621             ./mso_install.sh
622
623
624   # Message Router instantiation
625   mrouter_private_port:
626     type: OS::Neutron::Port
627     properties:
628       network: { get_resource: oam_ecomp }
629       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: mr_ip_addr }}]
630
631   mrouter_floating_ip:
632     type: OS::Neutron::FloatingIP
633     properties:
634       floating_network_id: { get_param: public_net_id }
635       port_id: { get_resource: mrouter_private_port }
636       floating_ip_address: { get_param: mr_float_ip }
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       floating_ip_address: { get_param: robot_float_ip }
699  
700   robot_vm:
701     type: OS::Nova::Server
702     properties:
703       image: { get_param: ubuntu_1604_image }
704       flavor: { get_param: flavor_small }
705       name:
706         str_replace: 
707           template: base-robot
708           params:
709             base: { get_param: vm_base_name }
710       key_name: { get_resource: vm_key }
711       networks:
712         - port: { get_resource: robot_private_port }
713       user_data_format: RAW
714       user_data:
715         str_replace:
716           params:
717             __nexus_repo__: { get_param: nexus_repo }
718             __nexus_docker_repo__: { get_param: nexus_docker_repo }
719             __nexus_username__: { get_param: nexus_username }
720             __nexus_password__: { get_param: nexus_password }
721             __network_name__: { get_attr: [oam_ecomp, name] }
722             __openstack_username__: { get_param: openstack_username }
723             __openstack_api_key__: { get_param : openstack_api_key }
724             __artifacts_version__: { get_param: artifacts_version }
725             __openstack_region__: { get_param: openstack_region }
726             __dns_ip_addr__: { get_param: dns_ip_addr }
727             __docker_version__: { get_param: docker_version }
728             __gerrit_branch__: { get_param: gerrit_branch }
729             __cloud_env__: { get_param: cloud_env }
730             __external_dns__: { get_param: external_dns }
731           template: |
732             #!/bin/bash
733
734             # Create configuration files
735             mkdir -p /opt/config
736             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
737             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
738             echo "__nexus_username__" > /opt/config/nexus_username.txt
739             echo "__nexus_password__" > /opt/config/nexus_password.txt
740             echo "__network_name__" > /opt/config/network.txt
741             echo "__openstack_username__" > /opt/config/openstack_username.txt
742             echo "__openstack_api_key__" > /opt/config/openstack_password.txt
743             echo "__openstack_region__" > /opt/config/region.txt
744             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
745             echo "__docker_version__" > /opt/config/docker_version.txt
746             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
747             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
748             echo "__cloud_env__" > /opt/config/cloud_env.txt
749             echo "__external_dns__" > /opt/config/external_dns.txt
750
751             # Download and run install script
752             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_install.sh -o /opt/robot_install.sh
753             cd /opt
754             chmod +x robot_install.sh
755             ./robot_install.sh
756
757
758   # VID instantiation
759   vid_private_port:
760     type: OS::Neutron::Port
761     properties:
762       network: { get_resource: oam_ecomp }
763       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: vid_ip_addr }}]
764
765   vid_floating_ip:
766     type: OS::Neutron::FloatingIP
767     properties:
768       floating_network_id: { get_param: public_net_id }
769       port_id: { get_resource: vid_private_port }
770       floating_ip_address: { get_param: vid_float_ip }
771
772   vid_vm:
773     type: OS::Nova::Server
774     properties:
775       image: { get_param: ubuntu_1404_image }
776       flavor: { get_param: flavor_medium }
777       name:
778         str_replace: 
779           template: base-vid
780           params:
781             base: { get_param: vm_base_name }
782       key_name: { get_resource: vm_key }
783       networks:
784         - port: { get_resource: vid_private_port }
785       user_data_format: RAW
786       user_data:
787         str_replace:
788           params:
789             __nexus_repo__: { get_param: nexus_repo }
790             __nexus_docker_repo__: { get_param: nexus_docker_repo }
791             __nexus_username__: { get_param: nexus_username }
792             __nexus_password__: { get_param: nexus_password }
793             __artifacts_version__: { get_param: artifacts_version }
794             __dns_ip_addr__: { get_param: dns_ip_addr }
795             __docker_version__: { get_param: docker_version }
796             __gerrit_branch__: { get_param: gerrit_branch }
797             __cloud_env__: { get_param: cloud_env }
798             __external_dns__: { get_param: external_dns }
799           template: |
800             #!/bin/bash
801
802             # Create configuration files
803             mkdir -p /opt/config
804             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
805             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
806             echo "__nexus_username__" > /opt/config/nexus_username.txt
807             echo "__nexus_password__" > /opt/config/nexus_password.txt
808             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
809             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
810             echo "__docker_version__" > /opt/config/docker_version.txt
811             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
812             echo "__cloud_env__" > /opt/config/cloud_env.txt
813             echo "__external_dns__" > /opt/config/external_dns.txt
814
815             # Download and run install script
816             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_install.sh -o /opt/vid_install.sh
817             cd /opt
818             chmod +x vid_install.sh
819             ./vid_install.sh
820
821  
822   # SDN-C instantiation
823   sdnc_private_port:
824     type: OS::Neutron::Port
825     properties:
826       network: { get_resource: oam_ecomp }
827       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: sdnc_ip_addr }}]
828
829   sdnc_floating_ip:
830     type: OS::Neutron::FloatingIP
831     properties:
832       floating_network_id: { get_param: public_net_id }
833       port_id: { get_resource: sdnc_private_port }
834       floating_ip_address: { get_param: sdnc_float_ip }
835
836   sdnc_vm:
837     type: OS::Nova::Server
838     properties:
839       image: { get_param: ubuntu_1404_image }
840       flavor: { get_param: flavor_large }
841       name:
842         str_replace: 
843           template: base-sdnc
844           params:
845             base: { get_param: vm_base_name }
846       key_name: { get_resource: vm_key }
847       networks:
848         - port: { get_resource: sdnc_private_port }
849       user_data_format: RAW
850       user_data:
851         str_replace:
852           params:
853             __nexus_repo__: { get_param: nexus_repo }
854             __nexus_docker_repo__: { get_param: nexus_docker_repo }
855             __nexus_username__: { get_param: nexus_username }
856             __nexus_password__: { get_param: nexus_password }
857             __artifacts_version__: { get_param: artifacts_version }
858             __dns_ip_addr__: { get_param: dns_ip_addr }
859             __docker_version__: { get_param: docker_version }
860             __gerrit_branch__: { get_param: gerrit_branch }
861             __cloud_env__: { get_param: cloud_env }
862             __external_dns__: { get_param: external_dns }
863           template: |
864             #!/bin/bash
865
866             # Create configuration files
867             mkdir -p /opt/config
868             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
869             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
870             echo "__nexus_username__" > /opt/config/nexus_username.txt
871             echo "__nexus_password__" > /opt/config/nexus_password.txt
872             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
873             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
874             echo "__docker_version__" > /opt/config/docker_version.txt
875             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
876             echo "__cloud_env__" > /opt/config/cloud_env.txt
877             echo "__external_dns__" > /opt/config/external_dns.txt
878
879             # Download and run install script
880             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_install.sh -o /opt/sdnc_install.sh
881             cd /opt
882             chmod +x sdnc_install.sh
883             ./sdnc_install.sh
884
885
886   # SDC instantiation
887   sdc_private_port:
888     type: OS::Neutron::Port
889     properties:
890       network: { get_resource: oam_ecomp }
891       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: sdc_ip_addr }}]
892
893   sdc_floating_ip:
894     type: OS::Neutron::FloatingIP
895     properties:
896       floating_network_id: { get_param: public_net_id }
897       port_id: { get_resource: sdc_private_port }
898       floating_ip_address: { get_param: sdc_float_ip }
899
900   sdc_volume_data:
901     type: OS::Cinder::Volume
902     properties:
903       name: vol1-sdc-data
904       size: 100
905
906   sdc_vm:
907     type: OS::Nova::Server
908     properties:
909       image: { get_param: ubuntu_1604_image }
910       flavor: { get_param: flavor_xlarge }
911       name:
912         str_replace: 
913           template: base-sdc
914           params:
915             base: { get_param: vm_base_name }
916       key_name: { get_resource: vm_key }
917       networks:
918         - port: { get_resource: sdc_private_port }
919       block_device_mapping:
920         - device_name: /dev/vdb
921           volume_id: {get_resource: sdc_volume_data}
922       user_data_format: RAW
923       user_data:
924         str_replace:
925           params:
926             __nexus_repo__: { get_param: nexus_repo }
927             __nexus_docker_repo__: { get_param: nexus_docker_repo }
928             __nexus_username__: { get_param: nexus_username }
929             __nexus_password__: { get_param: nexus_password }
930             __env_name__: { get_param: dmaap_topic }
931             __artifacts_version__: { get_param: artifacts_version }
932             __dns_ip_addr__: { get_param: dns_ip_addr }
933             __mr_ip_addr__: { get_param: mr_ip_addr }
934             __public_ip__: { get_attr: [sdc_floating_ip, floating_ip_address] }
935             __docker_version__: { get_param: docker_version }
936             __gerrit_branch__: { get_param: gerrit_branch }
937             __cloud_env__: { get_param: cloud_env }
938             __external_dns__: { get_param: external_dns }
939           template: |
940             #!/bin/bash
941
942             # Create configuration files
943             mkdir -p /opt/config
944             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
945             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
946             echo "__nexus_username__" > /opt/config/nexus_username.txt
947             echo "__nexus_password__" > /opt/config/nexus_password.txt
948             echo "__env_name__" > /opt/config/env_name.txt
949             echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
950             echo "__public_ip__" > /opt/config/public_ip.txt
951             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
952             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
953             echo "__docker_version__" > /opt/config/docker_version.txt
954             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
955             echo "__cloud_env__" > /opt/config/cloud_env.txt
956             echo "__external_dns__" > /opt/config/external_dns.txt
957
958             # Download and run install script
959             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_install.sh -o /opt/asdc_install.sh
960             cd /opt
961             chmod +x asdc_install.sh
962             ./asdc_install.sh
963
964
965   # PORTAL instantiation
966   portal_private_port:
967     type: OS::Neutron::Port
968     properties:
969       network: { get_resource: oam_ecomp }
970       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: portal_ip_addr }}]
971
972   portal_floating_ip:
973     type: OS::Neutron::FloatingIP
974     properties:
975       floating_network_id: { get_param: public_net_id }
976       port_id: { get_resource: portal_private_port }
977       floating_ip_address: { get_param: portal_float_ip }
978
979   portal_vm:
980     type: OS::Nova::Server
981     properties:
982       image: { get_param: ubuntu_1404_image }
983       flavor: { get_param: flavor_large }
984       name:
985         str_replace: 
986           template: base-portal
987           params:
988             base: { get_param: vm_base_name }
989       key_name: { get_resource: vm_key }
990       networks:
991         - port: { get_resource: portal_private_port }
992       user_data_format: RAW
993       user_data:
994         str_replace:
995           params:
996             __nexus_repo__: { get_param: nexus_repo }
997             __nexus_docker_repo__: { get_param: nexus_docker_repo }
998             __nexus_username__: { get_param: nexus_username }
999             __nexus_password__: { get_param: nexus_password }
1000             __artifacts_version__: { get_param: artifacts_version }
1001             __dns_ip_addr__: { get_param: dns_ip_addr }
1002             __public_ip__: { get_attr: [portal_floating_ip, floating_ip_address] }
1003             __docker_version__: { get_param: docker_version }
1004             __gerrit_branch__: { get_param: gerrit_branch }
1005             __cloud_env__: { get_param: cloud_env }
1006             __external_dns__: { get_param: external_dns }
1007           template: |
1008             #!/bin/bash
1009
1010             # Create configuration files
1011             mkdir -p /opt/config
1012             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1013             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1014             echo "__nexus_username__" > /opt/config/nexus_username.txt
1015             echo "__nexus_password__" > /opt/config/nexus_password.txt
1016             echo "__public_ip__" > /opt/config/public_ip.txt
1017             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1018             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1019             echo "__docker_version__" > /opt/config/docker_version.txt
1020             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1021             echo "__cloud_env__" > /opt/config/cloud_env.txt
1022             echo "__external_dns__" > /opt/config/external_dns.txt
1023
1024             # Download and run install script
1025             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_install.sh -o /opt/portal_install.sh
1026             cd /opt
1027             chmod +x portal_install.sh
1028             ./portal_install.sh
1029
1030
1031   # DCAE Controller instantiation
1032   dcae_c_private_port:
1033     type: OS::Neutron::Port
1034     properties:
1035       network: { get_resource: oam_ecomp }
1036       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
1037
1038   dcae_c_floating_ip:
1039     type: OS::Neutron::FloatingIP
1040     properties:
1041       floating_network_id: { get_param: public_net_id }
1042       port_id: { get_resource: dcae_c_private_port }
1043       floating_ip_address: { get_param: dcae_float_ip }
1044
1045   dcae_c_vm:
1046     type: OS::Nova::Server
1047     properties:
1048       image: { get_param: ubuntu_1404_image }
1049       flavor: { get_param: flavor_medium }
1050       name:
1051         str_replace: 
1052           template: base-dcae-controller
1053           params:
1054             base: { get_param: vm_base_name }
1055       key_name: { get_resource: vm_key }
1056       networks:
1057         - port: { get_resource: dcae_c_private_port }
1058       user_data_format: RAW
1059       user_data:
1060         str_replace:
1061           params:
1062             __nexus_repo__: { get_param: nexus_repo }
1063             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1064             __nexus_username__: { get_param: nexus_username }
1065             __nexus_password__: { get_param: nexus_password }
1066             __nexus_url_snapshots__: { get_param: nexus_url_snapshot }
1067             __gitlab_branch__: { get_param: gitlab_branch }
1068             __dns_ip_addr__: { get_param: dns_ip_addr }
1069             __dcae_zone__: { get_param: dcae_zone }
1070             __dcae_state__: { get_param: dcae_state }
1071             __artifacts_version__: { get_param: artifacts_version }
1072             __tenant_id__: { get_param: openstack_tenant_id }
1073             __openstack_private_network_name__: { get_attr: [oam_ecomp, name] }
1074             __openstack_user__: { get_param: openstack_username }
1075             __openstack_password__: { get_param: openstack_api_key }
1076             __openstack_auth_method__: { get_param: openstack_auth_method }
1077             __key_name__: { get_param: key_name }
1078             __rand_str__: { get_resource: random-str }
1079             __pub_key__: { get_param: pub_key }
1080             __nexus_repo_root__: { get_param: nexus_repo_root }
1081             __openstack_region__: { get_param: openstack_region }
1082             __horizon_url__: { get_param: horizon_url }
1083             __keystone_url__: { get_param: keystone_url }
1084             __docker_version__: { get_param: docker_version }
1085             __gerrit_branch__: { get_param: gerrit_branch }
1086             __dcae_code_version__: { get_param: dcae_code_version }
1087             __cloud_env__: { get_param: cloud_env }
1088             __public_net_id__: { get_param: public_net_id }
1089             __dcae_base_environment__: { get_param: dcae_base_environment }
1090             __dcae_ip_addr__: { get_param: dcae_ip_addr }
1091             __dcae_coll_ip_addr__: { get_param: dcae_coll_ip_addr }
1092             __dcae_db_ip_addr__: { get_param: dcae_db_ip_addr }
1093             __dcae_hdp1_ip_addr__: { get_param: dcae_hdp1_ip_addr }
1094             __dcae_hdp2_ip_addr__: { get_param: dcae_hdp2_ip_addr }
1095             __dcae_hdp3_ip_addr__: { get_param: dcae_hdp3_ip_addr }
1096             __dcae_float_ip__: { get_param: dcae_float_ip }
1097             __dcae_coll_float_ip__: { get_param: dcae_coll_float_ip }
1098             __dcae_db_float_ip__: { get_param: dcae_db_float_ip }
1099             __dcae_hdp1_float_ip__: { get_param: dcae_hdp1_float_ip }
1100             __dcae_hdp2_float_ip__: { get_param: dcae_hdp2_float_ip }
1101             __dcae_hdp3_float_ip__: { get_param: dcae_hdp3_float_ip }
1102             __external_dns__: { get_param: external_dns }
1103             __ubuntu_1404_image__: { get_param: ubuntu_1404_image }
1104             __ubuntu_1604_image__: { get_param: ubuntu_1604_image }
1105             __flavor_small__: { get_param: flavor_small }
1106             __flavor_medium__: { get_param: flavor_medium }
1107             __flavor_large__: { get_param: flavor_large }
1108             __flavor_xlarge__: { get_param: flavor_xlarge }
1109           template: |
1110             #!/bin/bash
1111
1112             # Create configuration files
1113             mkdir -p /opt/config
1114             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1115             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1116             echo "__nexus_username__" > /opt/config/nexus_username.txt
1117             echo "__nexus_password__" > /opt/config/nexus_password.txt
1118             echo "__nexus_url_snapshots__" > /opt/config/nexus_url_snapshots.txt
1119             echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
1120             echo "__docker_version__" > /opt/config/docker_version.txt
1121             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1122             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1123             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1124             echo "__dcae_zone__" > /opt/config/dcae_zone.txt
1125             echo "__dcae_state__" > /opt/config/dcae_state.txt
1126             echo "__tenant_id__" > /opt/config/tenant_id.txt
1127             echo "__openstack_private_network_name__" > /opt/config/openstack_private_network_name.txt
1128             echo "__openstack_user__" > /opt/config/openstack_user.txt
1129             echo "__openstack_password__" > /opt/config/openstack_password.txt
1130             echo "__openstack_auth_method__" > /opt/config/openstack_auth_method.txt
1131             echo "__key_name__" > /opt/config/key_name.txt
1132             echo "__rand_str__" > /opt/config/rand_str.txt
1133             echo "__pub_key__" > /opt/config/pub_key.txt
1134             echo "__nexus_repo_root__" > /opt/config/nexus_repo_root.txt
1135             echo "__openstack_region__" > /opt/config/openstack_region.txt
1136             echo "__horizon_url__" > /opt/config/horizon_url.txt
1137             echo "__keystone_url__" > /opt/config/keystone_url.txt
1138             echo "__cloud_env__" > /opt/config/cloud_env.txt
1139             echo "__public_net_id__" > /opt/config/public_net_id.txt
1140             echo "__dcae_base_environment__" > /opt/config/dcae_base_environment.txt
1141             echo "__dcae_code_version__" > /opt/config/dcae_code_version.txt
1142             echo "__dcae_ip_addr__" > /opt/config/dcae_ip_addr.txt
1143             echo "__dcae_coll_ip_addr__" > /opt/config/dcae_coll_ip_addr.txt
1144             echo "__dcae_db_ip_addr__" > /opt/config/dcae_db_ip_addr.txt
1145             echo "__dcae_hdp1_ip_addr__" > /opt/config/dcae_hdp1_ip_addr.txt
1146             echo "__dcae_hdp2_ip_addr__" > /opt/config/dcae_hdp2_ip_addr.txt
1147             echo "__dcae_hdp3_ip_addr__" > /opt/config/dcae_hdp3_ip_addr.txt
1148             echo "__dcae_float_ip__" > /opt/config/dcae_float_ip.txt
1149             echo "__dcae_coll_float_ip__" > /opt/config/dcae_coll_float_ip.txt
1150             echo "__dcae_db_float_ip__" > /opt/config/dcae_db_float_ip.txt
1151             echo "__dcae_hdp1_float_ip__" > /opt/config/dcae_hdp1_float_ip.txt
1152             echo "__dcae_hdp2_float_ip__" > /opt/config/dcae_hdp2_float_ip.txt
1153             echo "__dcae_hdp3_float_ip__" > /opt/config/dcae_hdp3_float_ip.txt
1154             echo "__external_dns__" > /opt/config/external_dns.txt
1155             echo "__ubuntu_1404_image__" > /opt/config/ubuntu_1404_image.txt
1156             echo "__ubuntu_1604_image__" > /opt/config/ubuntu_1604_image.txt
1157             echo "__flavor_small__" > /opt/config/flavor_small.txt
1158             echo "__flavor_medium__" > /opt/config/flavor_medium.txt
1159             echo "__flavor_large__" > /opt/config/flavor_large.txt
1160             echo "__flavor_xlarge__" > /opt/config/flavor_xlarge.txt
1161
1162             # Download and run install script
1163             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_install.sh -o /opt/dcae_install.sh
1164             cd /opt
1165             chmod +x dcae_install.sh
1166             ./dcae_install.sh
1167
1168
1169   # Policy Engine instantiation
1170   policy_private_port:
1171     type: OS::Neutron::Port
1172     properties:
1173       network: { get_resource: oam_ecomp }
1174       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: policy_ip_addr }}]
1175
1176   policy_floating_ip:
1177     type: OS::Neutron::FloatingIP
1178     properties:
1179       floating_network_id: { get_param: public_net_id }
1180       port_id: { get_resource: policy_private_port }
1181       floating_ip_address: { get_param: policy_float_ip }
1182
1183   policy_vm:
1184     type: OS::Nova::Server
1185     properties:
1186       image: { get_param: ubuntu_1404_image }
1187       flavor: { get_param: flavor_xlarge }
1188       name:
1189         str_replace: 
1190           template: base-policy
1191           params:
1192             base: { get_param: vm_base_name }
1193       key_name: { get_resource: vm_key }
1194       networks:
1195         - port: { get_resource: policy_private_port }
1196       user_data_format: RAW
1197       user_data:
1198         str_replace:
1199           params:
1200             __nexus_repo__: { get_param: nexus_repo }
1201             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1202             __nexus_username__: { get_param: nexus_username }
1203             __nexus_password__: { get_param: nexus_password }
1204             __artifacts_version__: { get_param: artifacts_version }
1205             __dns_ip_addr__: { get_param: dns_ip_addr }
1206             __public_ip__: { get_attr: [policy_floating_ip, floating_ip_address] }
1207             __docker_version__: { get_param: docker_version }
1208             __gerrit_branch__: { get_param: gerrit_branch }
1209             __cloud_env__: { get_param: cloud_env }
1210             __external_dns__: { get_param: external_dns }
1211           template: |
1212             #!/bin/bash
1213
1214             # Create configuration files
1215             mkdir -p /opt/config
1216             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1217             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1218             echo "__nexus_username__" > /opt/config/nexus_username.txt
1219             echo "__nexus_password__" > /opt/config/nexus_password.txt
1220             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1221             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1222             echo "__public_ip__" > /opt/config/public_ip.txt
1223             echo "__docker_version__" > /opt/config/docker_version.txt
1224             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1225             echo "__cloud_env__" > /opt/config/cloud_env.txt
1226             echo "__external_dns__" > /opt/config/external_dns.txt
1227
1228             # Download and run install script
1229             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_install.sh -o /opt/policy_install.sh
1230             cd /opt
1231             chmod +x policy_install.sh
1232             ./policy_install.sh
1233
1234
1235   # APP-C instantiation
1236   appc_private_port:
1237     type: OS::Neutron::Port
1238     properties:
1239       network: { get_resource: oam_ecomp }
1240       fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: appc_ip_addr }}]
1241
1242   appc_floating_ip:
1243     type: OS::Neutron::FloatingIP
1244     properties:
1245       floating_network_id: { get_param: public_net_id }
1246       port_id: { get_resource: appc_private_port }
1247       floating_ip_address: { get_param: appc_float_ip }
1248
1249   appc_vm:
1250     type: OS::Nova::Server
1251     properties:
1252       image: { get_param: ubuntu_1404_image }
1253       flavor: { get_param: flavor_large }
1254       name:
1255         str_replace: 
1256           template: base-appc
1257           params:
1258             base: { get_param: vm_base_name }
1259       key_name: { get_resource: vm_key }
1260       networks:
1261         - port: { get_resource: appc_private_port }
1262       user_data_format: RAW
1263       user_data:
1264         str_replace:
1265           params:
1266             __nexus_repo__: { get_param: nexus_repo }
1267             __nexus_docker_repo__: { get_param: nexus_docker_repo }
1268             __nexus_username__: { get_param: nexus_username }
1269             __nexus_password__: { get_param: nexus_password }
1270             __dmaap_topic__: { get_param: dmaap_topic }
1271             __artifacts_version__: { get_param: artifacts_version }
1272             __dns_ip_addr__: { get_param: dns_ip_addr }
1273             __docker_version__: { get_param: docker_version }
1274             __gerrit_branch__: { get_param: gerrit_branch }
1275             __cloud_env__: { get_param: cloud_env }
1276             __external_dns__: { get_param: external_dns }
1277           template: |
1278             #!/bin/bash
1279
1280             # Create configuration files
1281             mkdir -p /opt/config
1282             echo "__nexus_repo__" > /opt/config/nexus_repo.txt
1283             echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1284             echo "__nexus_username__" > /opt/config/nexus_username.txt
1285             echo "__nexus_password__" > /opt/config/nexus_password.txt
1286             echo "__artifacts_version__" > /opt/config/artifacts_version.txt
1287             echo "__dns_ip_addr__" > /opt/config/dns_ip_addr.txt
1288             echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1289             echo "__docker_version__" > /opt/config/docker_version.txt
1290             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
1291             echo "__cloud_env__" > /opt/config/cloud_env.txt
1292             echo "__external_dns__" > /opt/config/external_dns.txt
1293
1294             # Download and run install script
1295             curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_install.sh -o /opt/appc_install.sh
1296             cd /opt
1297             chmod +x appc_install.sh
1298             ./appc_install.sh