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