1 heat_template_version: 2013-05-23
3 description: Heat template to deploy ONAP components
7 # Generic parameters used across all ONAP components
10 label: Public network name or ID
11 description: Public network that enables remote connection to the compute instance
16 description: Public/Private key pair name
21 description: Public key or SSL certificate to be installed on the compute instance
25 label: Nexus Repository
26 description: Complete URL for the Nexus repository.
30 label: Nexus Docker Images Repository
31 description: Complete URL for the Nexus repository for docker images.
35 label: Nexus Repository Username
36 description: Nexus Repository username
40 label: Nexus Repository Password
41 description: Nexus Repository Password
46 description: DmaaP Topic that MSO and A&AI listen to
50 label: Artifacts Version
51 description: Artifacts version of ONAP components
56 description: Docker version of ONAP docker images
60 label: Gerrit code branch
61 description: Gerrit branch where to download the code from
63 # Parameters for DCAE instantiation
67 description: DCAE Zone to use in VM names created by DCAE controller
72 description: DCAE State to use in VM names created by DCAE controller
76 label: Rackspace tenant ID
77 description: Rackspace tenant ID
81 label: Rackspace username
82 description: Rackspace username
86 label: Rackspace API Key
87 description: Rackspace API Key
91 label: Rackspace Password
92 description: Rackspace Password
96 label: Root URL of nexus repository
97 description: Root URL of nexus repository
101 label: Snapshot of Maven repository for DCAE deployment
102 description: Snapshot of Maven repository
106 label: Rackspace Region
107 description: Rackspace region where the DCAE controller will spin the VMs
111 label: Branch of the Gitlab repository
112 description: Branch of the Gitlab repository
117 type: OS::Heat::RandomString
121 # Public key used to access ONAP components
123 type: OS::Nova::KeyPair
129 base: { get_param: key_name }
130 rand: { get_resource: random-str }
131 public_key: { get_param: pub_key }
132 save_private_key: false
135 # ONAP management private network
137 type: OS::Neutron::Net
141 template: oam_ecomp_rand
143 rand: { get_resource: random-str }
146 type: OS::Neutron::Subnet
150 template: oam_ecomp_rand
152 rand: { get_resource: random-str }
153 network_id: { get_resource: oam_ecomp }
157 # DNS Server instantiation
159 type: OS::Neutron::Port
161 network: { get_resource: oam_ecomp }
162 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.0.1}]
165 type: OS::Nova::Server
167 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
168 flavor: 4 GB General Purpose v1
170 key_name: { get_resource: vm_key }
172 - network: { get_param: public_net_id }
173 - port: { get_resource: dns_private_port }
174 user_data_format: RAW
178 __nexus_repo__: { get_param: nexus_repo }
179 __artifacts_version__: { get_param: artifacts_version }
183 # Download dependencies
184 add-apt-repository -y ppa:openjdk-r/ppa
186 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk bind9 bind9utils bind9-doc ntp ntpdate
189 mkdir /etc/bind/zones
191 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/db_simpledemo_openecomp_org -o /etc/bind/zones/db.simpledemo.openecomp.org
192 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/named.conf.options -o /etc/bind/named.conf.options
193 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/named.conf.local -o /etc/bind/named.conf.local
197 sed -i "s/OPTIONS=.*/OPTIONS=\"-4 -u bind\"/g" /etc/default/bind9
198 service bind9 restart
203 type: OS::Neutron::Port
205 network: { get_resource: oam_ecomp }
206 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.1.1}]
209 type: OS::Cinder::Volume
214 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
217 type: OS::Nova::Server
220 flavor: 15 GB Compute v1
222 key_name: { get_resource: vm_key }
223 block_device_mapping:
224 - volume_id: { get_resource: aai_volume }
227 - network: { get_param: public_net_id }
228 - port: { get_resource: aai_private_port }
229 user_data_format: RAW
233 __nexus_repo__: { get_param: nexus_repo }
234 __nexus_docker_repo__: { get_param: nexus_docker_repo }
235 __nexus_username__: { get_param: nexus_username }
236 __nexus_password__: { get_param: nexus_password }
237 __dmaap_topic__: { get_param: dmaap_topic }
238 __artifacts_version__: { get_param: artifacts_version }
239 __docker_version__: { get_param: docker_version }
243 # DNS/GW IP address configuration
244 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
247 # Download dependencies
248 add-apt-repository -y ppa:openjdk-r/ppa
250 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
252 # Download scripts from Nexus
253 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/aai_vm_init.sh -o /opt/aai_vm_init.sh
254 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/aai_serv.sh -o /opt/aai_serv.sh
255 chmod +x /opt/aai_vm_init.sh
256 chmod +x /opt/aai_serv.sh
257 mv /opt/aai_serv.sh /etc/init.d
258 update-rc.d aai_serv.sh defaults
260 # Download and install docker-engine and docker-compose
261 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
262 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
264 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
265 apt-get install -y docker-engine
268 mkdir -p /opt/openecomp/aai/logs
269 mkdir -p /opt/openecomp/aai/data
271 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
272 chmod +x /opt/docker/docker-compose
274 # Store credentials in files
276 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
277 echo "__nexus_username__" > /opt/config/nexus_username.txt
278 echo "__nexus_password__" > /opt/config/nexus_password.txt
279 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
280 echo "__docker_version__" > /opt/config/docker_version.txt
282 # Execute docker instructions
289 type: OS::Neutron::Port
291 network: { get_resource: oam_ecomp }
292 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.5.1}]
295 type: OS::Nova::Server
297 image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
298 flavor: 4 GB General Purpose v1
300 key_name: { get_resource: vm_key }
302 - network: { get_param: public_net_id }
303 - port: { get_resource: mso_private_port }
304 user_data_format: RAW
308 __nexus_repo__: { get_param: nexus_repo }
309 __nexus_docker_repo__: { get_param: nexus_docker_repo }
310 __nexus_username__: { get_param: nexus_username }
311 __nexus_password__: { get_param: nexus_password }
312 __openstack_username__: { get_param: openstack_username }
313 __openstack_tenant_id__: { get_param: openstack_tenant_id }
314 __openstack_api_key__: { get_param: openstack_api_key }
315 __dmaap_topic__: { get_param: dmaap_topic }
316 __artifacts_version__: { get_param: artifacts_version }
317 __docker_version__: { get_param: docker_version }
318 __gerrit_branch__: { get_param: gerrit_branch }
322 # DNS/GW IP address configuration
323 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
326 # Download dependencies
327 add-apt-repository -y ppa:openjdk-r/ppa
329 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
331 # Download scripts from Nexus
332 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_vm_init.sh -o /opt/mso_vm_init.sh
333 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_serv.sh -o /opt/mso_serv.sh
334 chmod +x /opt/mso_vm_init.sh
335 chmod +x /opt/mso_serv.sh
336 mv /opt/mso_serv.sh /etc/init.d
337 update-rc.d mso_serv.sh defaults
339 # Download and install docker-engine and docker-compose
340 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
341 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
343 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
344 apt-get install -y docker-engine
348 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
349 chmod +x /opt/docker/docker-compose
351 # Store credentials in files
353 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
354 echo "__nexus_username__" > /opt/config/nexus_username.txt
355 echo "__nexus_password__" > /opt/config/nexus_password.txt
356 echo "__openstack_username__" > /opt/config/openstack_username.txt
357 echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
358 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
359 echo "__docker_version__" > /opt/config/docker_version.txt
361 # Run docker-compose to spin up containers
363 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/mso/docker-config.git test_lab
364 MSO_ENCRYPTION_KEY=$(cat /opt/test_lab/encryption.key)
365 echo -n "__openstack_api_key__" | openssl aes-128-ecb -e -K $MSO_ENCRYPTION_KEY -nosalt | xxd -c 256 -p > /opt/config/api_key.txt
369 # Message Router instantiation
370 mrouter_private_port:
371 type: OS::Neutron::Port
373 network: { get_resource: oam_ecomp }
374 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.11.1}]
377 type: OS::Nova::Server
379 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
381 name: vm1-message-router
382 key_name: { get_resource: vm_key }
384 - network: { get_param: public_net_id }
385 - port: { get_resource: mrouter_private_port }
386 user_data_format: RAW
390 __nexus_repo__: { get_param: nexus_repo }
391 __nexus_docker_repo__: { get_param: nexus_docker_repo }
392 __nexus_username__: { get_param: nexus_username }
393 __nexus_password__: { get_param: nexus_password }
394 __artifacts_version__: { get_param: artifacts_version }
395 __gerrit_branch__: { get_param: gerrit_branch }
399 # DNS/GW IP address configuration
400 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
403 # Download dependencies
404 add-apt-repository -y ppa:openjdk-r/ppa
406 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
408 # Download scripts from Nexus
409 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_vm_init.sh -o /opt/mr_vm_init.sh
410 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_serv.sh -o /opt/mr_serv.sh
411 chmod +x /opt/mr_vm_init.sh
412 chmod +x /opt/mr_serv.sh
413 mv /opt/mr_serv.sh /etc/init.d
414 update-rc.d mr_serv.sh defaults
416 # Download and install docker-engine and docker-compose
417 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
418 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
420 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
421 apt-get install -y docker-engine
425 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
426 chmod +x /opt/docker/docker-compose
428 # Store credentials in files
430 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
431 echo "__nexus_username__" > /opt/config/nexus_username.txt
432 echo "__nexus_password__" > /opt/config/nexus_password.txt
434 # Run docker-compose to spin up containers
436 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/dcae/demo/startup/message-router.git dcae-startup-vm-message-router
440 # RobotE2E instantiation
442 type: OS::Neutron::Port
444 network: { get_resource: oam_ecomp }
445 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.10.1}]
448 type: OS::Nova::Server
450 image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
451 flavor: 2 GB General Purpose v1
453 key_name: { get_resource: vm_key }
455 - network: { get_param: public_net_id }
456 - port: { get_resource: robot_private_port }
457 user_data_format: RAW
461 __nexus_repo__: { get_param: nexus_repo }
462 __nexus_docker_repo__: { get_param: nexus_docker_repo }
463 __nexus_username__: { get_param: nexus_username }
464 __nexus_password__: { get_param: nexus_password }
465 __network_name__: { get_attr: [oam_ecomp, name] }
466 __openstack_username__: { get_param: openstack_username }
467 __openstack_api_key__: { get_param : openstack_api_key }
468 __openstack_password__: { get_param: openstack_password }
469 __artifacts_version__: { get_param: artifacts_version }
470 __openstack_region__: { get_param: openstack_region }
471 __docker_version__: { get_param: docker_version }
472 __gerrit_branch__: { get_param: gerrit_branch }
476 # DNS/GW IP address configuration
477 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
480 # Download dependencies
481 add-apt-repository -y ppa:openjdk-r/ppa
483 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
484 echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic
486 # Download scripts from Nexus
487 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_vm_init.sh -o /opt/robot_vm_init.sh
488 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_serv.sh -o /opt/robot_serv.sh
489 chmod +x /opt/robot_vm_init.sh
490 chmod +x /opt/robot_serv.sh
491 mv /opt/robot_serv.sh /etc/init.d
492 update-rc.d robot_serv.sh defaults
494 # Download and install docker-engine and docker-compose
495 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
496 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
498 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
499 apt-get install -y docker-engine
503 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
504 chmod +x /opt/docker/docker-compose
506 # Store credentials in files
508 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
509 echo "__nexus_repo__" > /opt/config/nexus_repo.txt
510 echo "__nexus_username__" > /opt/config/nexus_username.txt
511 echo "__nexus_password__" > /opt/config/nexus_password.txt
512 echo "__network_name__" > /opt/config/network.txt
513 echo "__openstack_username__" > /opt/config/openstack_username.txt
514 echo "__openstack_password__" > /opt/config/openstack_password.txt
515 echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
516 echo "__openstack_region__" > /opt/config/region.txt
517 echo "__artifacts_version__" > /opt/config/artifacts_version.txt
518 echo "__docker_version__" > /opt/config/docker_version.txt
520 # Execute RobotETE-specific instructions: create share folder to run as a docker volume
521 mkdir -p /opt/eteshare/logs
522 mkdir -p /opt/eteshare/config
524 # Run docker-compose to spin up containers
526 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/testsuite/properties.git testsuite/properties
532 type: OS::Neutron::Port
534 network: { get_resource: oam_ecomp }
535 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.8.1}]
538 type: OS::Nova::Server
540 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
541 flavor: 2 GB General Purpose v1
543 key_name: { get_resource: vm_key }
545 - network: { get_param: public_net_id }
546 - port: { get_resource: vid_private_port }
547 user_data_format: RAW
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 __artifacts_version__: { get_param: artifacts_version }
556 __docker_version__: { get_param: docker_version }
557 __gerrit_branch__: { get_param: gerrit_branch }
561 # DNS/GW IP address configuration
562 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
565 # Download dependencies
566 add-apt-repository -y ppa:openjdk-r/ppa
568 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk make git ntp ntpdate
570 # Download scripts from Nexus
571 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_vm_init.sh -o /opt/vid_vm_init.sh
572 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_serv.sh -o /opt/vid_serv.sh
573 chmod +x /opt/vid_vm_init.sh
574 chmod +x /opt/vid_serv.sh
575 mv /opt/vid_serv.sh /etc/init.d
576 update-rc.d vid_serv.sh defaults
578 # Download and install docker-engine and docker-compose
579 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
580 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
582 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
583 apt-get install -y docker-engine
587 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
588 chmod +x /opt/docker/docker-compose
590 # Store credentials in files
592 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
593 echo "__nexus_username__" > /opt/config/nexus_username.txt
594 echo "__nexus_password__" > /opt/config/nexus_password.txt
595 echo "__docker_version__" > /opt/config/docker_version.txt
597 # Run script to spin up containers
599 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/vid.git
603 # SDN-C instantiation
605 type: OS::Neutron::Port
607 network: { get_resource: oam_ecomp }
608 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.7.1}]
611 type: OS::Nova::Server
613 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
614 flavor: 4 GB General Purpose v1
616 key_name: { get_resource: vm_key }
618 - network: { get_param: public_net_id }
619 - port: { get_resource: sdnc_private_port }
620 user_data_format: RAW
624 __nexus_repo__: { get_param: nexus_repo }
625 __nexus_docker_repo__: { get_param: nexus_docker_repo }
626 __nexus_username__: { get_param: nexus_username }
627 __nexus_password__: { get_param: nexus_password }
628 __artifacts_version__: { get_param: artifacts_version }
629 __docker_version__: { get_param: docker_version }
630 __gerrit_branch__: { get_param: gerrit_branch }
634 # DNS/GW IP address configuration
636 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
637 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
640 # Download dependencies
641 add-apt-repository -y ppa:openjdk-r/ppa
643 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
645 # Download scripts from Nexus
646 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_vm_init.sh -o /opt/sdnc_vm_init.sh
647 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_serv.sh -o /opt/sdnc_serv.sh
648 chmod +x /opt/sdnc_vm_init.sh
649 chmod +x /opt/sdnc_serv.sh
650 mv /opt/sdnc_serv.sh /etc/init.d
651 update-rc.d sdnc_serv.sh defaults
653 # Download and install docker-engine and docker-compose
654 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
655 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
657 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
658 apt-get install -y docker-engine
662 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
663 chmod +x /opt/docker/docker-compose
665 # Store credentials in files
667 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
668 echo "__nexus_username__" > /opt/config/nexus_username.txt
669 echo "__nexus_password__" > /opt/config/nexus_password.txt
670 echo "__docker_version__" > /opt/config/docker_version.txt
672 # Run docker-compose to spin up containers
674 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/sdnc/oam.git sdnc
680 type: OS::Neutron::Port
682 network: { get_resource: oam_ecomp }
683 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.3.1}]
686 type: OS::Cinder::Volume
691 image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
694 type: OS::Cinder::Volume
700 sdc_volume_attachment:
701 type: OS::Cinder::VolumeAttachment
703 volume_id: { get_resource: sdc_volume_data }
704 instance_uuid: { get_resource: sdc_vm }
705 mountpoint: /dev/xvdb
708 type: OS::Nova::Server
710 flavor: 15 GB Compute v1
712 key_name: { get_resource: vm_key }
713 block_device_mapping:
714 - volume_id: { get_resource: sdc_volume_local }
717 - network: { get_param: public_net_id }
718 - port: { get_resource: sdc_private_port }
719 user_data_format: RAW
723 __nexus_repo__: { get_param: nexus_repo }
724 __nexus_docker_repo__: { get_param: nexus_docker_repo }
725 __nexus_username__: { get_param: nexus_username }
726 __nexus_password__: { get_param: nexus_password }
727 __env_name__: { get_param: dmaap_topic }
728 __artifacts_version__: { get_param: artifacts_version }
729 __docker_version__: { get_param: docker_version }
730 __gerrit_branch__: { get_param: gerrit_branch }
734 # DNS/GW IP address configuration
736 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
737 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
740 # Download dependencies
741 add-apt-repository -y ppa:openjdk-r/ppa
743 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
745 # Download scripts from Nexus
746 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_vm_init.sh -o /opt/asdc_vm_init.sh
747 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_serv.sh -o /opt/asdc_serv.sh
748 chmod +x /opt/asdc_vm_init.sh
749 chmod +x /opt/asdc_serv.sh
750 mv /opt/asdc_serv.sh /etc/init.d
751 update-rc.d asdc_serv.sh defaults
753 # Download and install docker-engine and docker-compose
754 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
755 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
757 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
758 apt-get install -y docker-engine
761 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
762 chmod +x /opt/docker/docker-compose
764 # Create partition and mount the external volume
765 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_ext_volume_partitions.txt -o /opt/asdc_ext_volume_partitions.txt
766 sfdisk /dev/xvdb < /opt/asdc_ext_volume_partitions.txt
767 mkfs -t ext4 /dev/xvdb1
769 mount /dev/xvdb1 /data
770 echo "/dev/xvdb1 /data ext4 errors=remount-ro,noatime,barrier=0 0 1" >> /etc/fstab
772 # Store credentials in files
774 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
775 echo "__nexus_username__" > /opt/config/nexus_username.txt
776 echo "__nexus_password__" > /opt/config/nexus_password.txt
777 echo "__env_name__" > /opt/config/env_name.txt
778 echo "10.0.11.1" > /opt/config/mr_ip_addr.txt
779 echo "__docker_version__" > /opt/config/docker_version.txt
781 # Run SDC-specific instructions
783 mkdir -p /data/environments
784 mkdir -p /data/scripts
785 mkdir -p /data/logs/BE
786 mkdir -p /data/logs/FE
788 chmod 777 /data/logs/BE
789 chmod 777 /data/logs/FE
791 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/sdc.git
793 cat > /root/.bash_aliases << EOF
794 alias dcls='/data/scripts/docker_clean.sh \$1'
795 alias dlog='/data/scripts/docker_login.sh \$1'
796 alias rund='/data/scripts/docker_run.sh'
797 alias health='/data/scripts/docker_health.sh'
800 # Run docker-compose to spin up containers
804 # PORTAL instantiation
806 type: OS::Neutron::Port
808 network: { get_resource: oam_ecomp }
809 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.9.1}]
812 type: OS::Cinder::Volume
817 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
820 type: OS::Nova::Server
822 flavor: 15 GB Memory v1
824 key_name: { get_resource: vm_key }
825 block_device_mapping:
826 - volume_id: { get_resource: portal_volume }
829 - network: { get_param: public_net_id }
830 - port: { get_resource: portal_private_port }
831 user_data_format: RAW
835 __nexus_repo__: { get_param: nexus_repo }
836 __nexus_docker_repo__: { get_param: nexus_docker_repo }
837 __nexus_username__: { get_param: nexus_username }
838 __nexus_password__: { get_param: nexus_password }
839 __artifacts_version__: { get_param: artifacts_version }
840 __docker_version__: { get_param: docker_version }
841 __gerrit_branch__: { get_param: gerrit_branch }
845 # DNS/GW IP address configuration
847 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
848 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
851 # Download dependencies
852 add-apt-repository -y ppa:openjdk-r/ppa
854 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git unzip mysql-client-core-5.6 ntp ntpdate
856 # Download scripts from Nexus
857 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_vm_init.sh -o /opt/portal_vm_init.sh
858 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_serv.sh -o /opt/portal_serv.sh
859 chmod +x /opt/portal_vm_init.sh
860 chmod +x /opt/portal_serv.sh
861 mv /opt/portal_serv.sh /etc/init.d
862 update-rc.d portal_serv.sh defaults
864 # Download and install docker-engine and docker-compose
865 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
866 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
868 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
869 apt-get install -y docker-engine
872 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
873 chmod +x /opt/docker/docker-compose
875 # Store credentials in files
877 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
878 echo "__nexus_username__" > /opt/config/nexus_username.txt
879 echo "__nexus_password__" > /opt/config/nexus_password.txt
880 echo "__docker_version__" > /opt/config/docker_version.txt
882 # Run Portal-specific instructions
883 mkdir -p /PROJECT/OpenSource/UbuntuEP/logs
885 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/portal.git
887 # Run docker-compose to spin up containers
891 # DCAE Controller instantiation
893 type: OS::Neutron::Port
895 network: { get_resource: oam_ecomp }
896 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.4.1}]
898 type: OS::Nova::Server
900 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
901 flavor: 8 GB General Purpose v1
902 name: vm1-dcae-controller
903 key_name: { get_resource: vm_key }
905 - network: { get_param: public_net_id }
906 - port: { get_resource: dcae_c_private_port }
907 user_data_format: RAW
911 __nexus_repo__: { get_param: nexus_repo }
912 __nexus_docker_repo__: { get_param: nexus_docker_repo }
913 __nexus_username__: { get_param: nexus_username }
914 __nexus_password__: { get_param: nexus_password }
915 __nexus_url_snapshots__: { get_param: nexus_url_snapshot }
916 __gitlab_branch__: { get_param: gitlab_branch }
917 __dcae_zone__: { get_param: dcae_zone }
918 __dcae_state__: { get_param: dcae_state }
919 __artifacts_version__: { get_param: artifacts_version }
920 __tenant_id__: { get_param: openstack_tenant_id }
921 __openstack_private_network_name__: { get_attr: [oam_ecomp, name] }
922 __openstack_user__: { get_param: openstack_username }
923 __openstack_password__: { get_param: openstack_api_key }
924 __key_name__: { get_param: key_name }
925 __rand_str__: { get_resource: random-str }
926 __pub_key__: { get_param: pub_key }
927 __nexus_repo_root__: { get_param: nexus_repo_root }
928 __openstack_region__: { get_param: openstack_region }
929 __docker_version__: { get_param: docker_version }
930 __gerrit_branch__: { get_param: gerrit_branch }
934 # DNS/GW IP address configuration
935 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
938 # Download dependencies
939 add-apt-repository -y ppa:openjdk-r/ppa
941 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk make git ntp ntpdate
943 # Download scripts from Nexus
944 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_vm_init.sh -o /opt/dcae_vm_init.sh
945 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_serv.sh -o /opt/dcae_serv.sh
946 chmod +x /opt/dcae_vm_init.sh
947 chmod +x /opt/dcae_serv.sh
948 mv /opt/dcae_serv.sh /etc/init.d
949 update-rc.d dcae_serv.sh defaults
951 # Download and install docker-engine and docker-compose
952 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
953 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
955 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
956 apt-get install -y docker-engine
959 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
960 chmod +x /opt/docker/docker-compose
962 # DCAE Controller specific deployment
964 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/dcae/demo/startup/controller.git dcae-startup-vm-controller
966 cd dcae-startup-vm-controller
967 mkdir -p /opt/app/dcae-controller
968 cat > /opt/app/dcae-controller/config.yaml << EOF_CONFIG
970 STATE: __dcae_state__
971 DCAE-VERSION: __artifacts_version__
972 HORIZON-URL: https://mycloud.rackspace.com/cloud/__tenant_id__
973 KEYSTONE-URL: https://identity.api.rackspacecloud.com/v2.0
974 OPENSTACK-TENANT-ID: __tenant_id__
975 OPENSTACK-TENANT-NAME: OPEN-ECOMP
976 OPENSTACK-REGION: __openstack_region__
977 OPENSTACK-PRIVATE-NETWORK: __openstack_private_network_name__
978 OPENSTACK-USER: __openstack_user__
979 OPENSTACK-PASSWORD: __openstack_password__
980 OPENSTACK-KEYNAME: __key_name_____rand_str___dcae
981 OPENSTACK-PUBKEY: __pub_key__
983 NEXUS-URL-ROOT: __nexus_repo_root__
984 NEXUS-USER: __nexus_username__
985 NEXUS-PASSWORD: __nexus_password__
986 NEXUS-URL-SNAPSHOTS: __nexus_url_snapshots__
987 NEXUS-RAWURL: __nexus_repo__
989 DOCKER-REGISTRY: __nexus_docker_repo__
991 GIT-MR-REPO: http://gerrit.onap.org/r/dcae/demo/startup/message-router.git
994 # Store credentials in files
996 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
997 echo "__nexus_username__" > /opt/config/nexus_username.txt
998 echo "__nexus_password__" > /opt/config/nexus_password.txt
999 echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
1000 echo "__docker_version__" > /opt/config/docker_version.txt
1006 # Policy engine instantiation
1007 policy_private_port:
1008 type: OS::Neutron::Port
1010 network: { get_resource: oam_ecomp }
1011 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.6.1}]
1014 type: OS::Cinder::Volume
1019 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
1022 type: OS::Nova::Server
1024 flavor: 15 GB Compute v1
1026 key_name: { get_resource: vm_key }
1027 block_device_mapping:
1028 - volume_id: { get_resource: policy_volume }
1031 - network: { get_param: public_net_id }
1032 - port: { get_resource: policy_private_port }
1033 user_data_format: RAW
1037 __nexus_repo__: { get_param: nexus_repo }
1038 __nexus_docker_repo__: { get_param: nexus_docker_repo }
1039 __nexus_username__: { get_param: nexus_username }
1040 __nexus_password__: { get_param: nexus_password }
1041 __artifacts_version__: { get_param: artifacts_version }
1042 __docker_version__: { get_param: docker_version }
1043 __gerrit_branch__: { get_param: gerrit_branch }
1047 # DNS/GW IP address configuration
1049 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
1050 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
1053 # Download dependencies
1054 add-apt-repository -y ppa:openjdk-r/ppa
1056 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
1058 # Download scripts from Nexus
1059 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_vm_init.sh -o /opt/policy_vm_init.sh
1060 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_serv.sh -o /opt/policy_serv.sh
1061 chmod +x /opt/policy_vm_init.sh
1062 chmod +x /opt/policy_serv.sh
1063 mv /opt/policy_serv.sh /etc/init.d
1064 update-rc.d policy_serv.sh defaults
1066 # Download and install docker-engine and docker-compose
1067 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1068 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1070 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1071 apt-get install -y docker-engine
1072 service docker start
1074 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1075 chmod +x /opt/docker/docker-compose
1077 # Store credentials in files
1078 mkdir -p /opt/config
1079 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1080 echo "__nexus_username__" > /opt/config/nexus_username.txt
1081 echo "__nexus_password__" > /opt/config/nexus_password.txt
1082 echo "__docker_version__" > /opt/config/docker_version.txt
1084 # Run docker-compose to spin up containers
1086 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/policy/docker.git policy
1091 # APP-C instantiation
1093 type: OS::Neutron::Port
1095 network: { get_resource: oam_ecomp }
1096 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.2.1}]
1099 type: OS::Nova::Server
1101 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
1102 flavor: 4 GB General Purpose v1
1104 key_name: { get_resource: vm_key }
1106 - network: { get_param: public_net_id }
1107 - port: { get_resource: appc_private_port }
1108 user_data_format: RAW
1112 __nexus_repo__: { get_param: nexus_repo }
1113 __nexus_docker_repo__: { get_param: nexus_docker_repo }
1114 __nexus_username__: { get_param: nexus_username }
1115 __nexus_password__: { get_param: nexus_password }
1116 __dmaap_topic__: { get_param: dmaap_topic }
1117 __artifacts_version__: { get_param: artifacts_version }
1118 __docker_version__: { get_param: docker_version }
1119 __gerrit_branch__: { get_param: gerrit_branch }
1123 # DNS/GW IP address configuration
1125 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
1126 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
1129 # Download dependencies
1130 add-apt-repository -y ppa:openjdk-r/ppa
1132 apt-get install -y apt-transport-https ca-certificates wget openjdk-7-jdk git ntp ntpdate
1134 # Download scripts from Nexus
1135 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_vm_init.sh -o /opt/appc_vm_init.sh
1136 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_serv.sh -o /opt/appc_serv.sh
1137 chmod +x /opt/appc_vm_init.sh
1138 chmod +x /opt/appc_serv.sh
1139 mv /opt/appc_serv.sh /etc/init.d
1140 update-rc.d appc_serv.sh defaults
1142 # Download and install docker-engine and docker-compose
1143 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1144 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1146 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1147 apt-get install -y docker-engine
1148 service docker start
1151 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1152 chmod +x /opt/docker/docker-compose
1154 # Store credentials in files
1155 mkdir -p /opt/config
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 "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1160 echo "__docker_version__" > /opt/config/docker_version.txt
1162 # Run docker-compose to spin up containers
1164 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/appc/deployment.git appc