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