1 heat_template_version: 2015-10-15
3 description: Heat template to install ONAP components
13 # Generic parameters used across all ONAP components
16 description: Public network for floating IP address allocation
20 description: Name of the Ubuntu 14.04 image
24 description: Name of the Ubuntu 16.04 image
28 description: Name of the Small Flavor supported by the cloud provider
32 description: Name of the Medium Flavor supported by the cloud provider
36 description: Name of the Large Flavor supported by the cloud provider
40 description: Name of the Extra Large Flavor supported by the cloud provider
44 description: Base name of ONAP VMs
48 description: Public/Private key pair name
52 description: Public key to be installed on the compute instance
56 description: Complete URL for the Nexus repository.
60 description: Complete URL for the Nexus repository for docker images.
64 description: Nexus Repository username
68 description: Nexus Repository Password
72 description: Gitlab Repository username
76 description: Gitlab Repository Password
80 description: Artifacts version of ONAP components
84 label: Version number of ONAP docker images
88 label: Gerrit code branch
89 description: Gerrit branch where to download the code from
93 description: DmaaP Topic name
97 description: Openstack tenant ID
101 description: Openstack username
105 description: Openstack API Key
109 description: URL of Openstack Horizon
113 description: URL of Openstack Keystone
117 type: comma_delimited_list
118 description: External DNS for OAM ONAP network
122 description: CIDR of the OAM ONAP network
126 description: A&AI IP Address
130 description: APP-C IP Address
134 description: DCAE IP Address
138 description: DNS IP Address
142 description: MSO IP Address
146 description: Message Router IP Address
150 description: Policy Engine IP Address
154 description: Portal IP Address
158 description: Robot Framework IP Address
162 description: SDC IP Address
166 description: SDN-C IP Address
170 description: VID IP Address
172 # Parameters for DCAE instantiation
175 description: DCAE Zone to use in VM names created by DCAE controller
179 description: DCAE State to use in VM names created by DCAE controller
183 description: Root URL of Nexus repository
187 description: Snapshot of Maven repository for DCAE deployment
191 description: Region where the DCAE controller will spin the VMs
195 description: Branch of the Gitlab repository
206 type: OS::Heat::RandomString
211 # Public key used to access ONAP components
213 type: OS::Nova::KeyPair
219 base: { get_param: key_name }
220 rand: { get_resource: random-str }
221 public_key: { get_param: pub_key }
222 save_private_key: false
225 # ONAP management private network
227 type: OS::Neutron::Net
231 template: oam_ecomp_rand
233 rand: { get_resource: random-str }
236 type: OS::Neutron::Subnet
240 template: oam_ecomp_rand
242 rand: { get_resource: random-str }
243 network_id: { get_resource: oam_ecomp }
244 cidr: { get_param: oam_network_cidr }
245 dns_nameservers: { get_param: external_dns }
248 type: OS::Neutron::Router
250 external_gateway_info:
251 network: { get_param: public_net_id }
254 type: OS::Neutron::RouterInterface
256 router_id: { get_resource: router }
257 subnet_id: { get_resource: oam_ecomp_subnet }
260 # DNS Server instantiation
262 type: OS::Neutron::Port
264 network: { get_resource: oam_ecomp }
265 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: dns_ip_addr }}]
268 type: OS::Neutron::FloatingIP
270 floating_network_id: { get_param: public_net_id }
271 port_id: { get_resource: dns_private_port }
274 type: OS::Nova::Server
276 image: { get_param: ubuntu_1404_image }
277 flavor: { get_param: flavor_small }
280 template: base-dns-server
282 base: { get_param: vm_base_name }
283 key_name: { get_resource: vm_key }
285 - port: { get_resource: dns_private_port }
286 user_data_format: RAW
290 __nexus_repo__: { get_param: nexus_repo }
291 __artifacts_version__: { get_param: artifacts_version }
292 __oam_network_cidr__: { get_attr: [oam_ecomp_subnet, cidr] }
293 __dns_ip_addr__: { get_param: dns_ip_addr }
294 __aai_ip_addr__: { get_param: aai_ip_addr }
295 __appc_ip_addr__: { get_param: appc_ip_addr }
296 __dcae_ip_addr__: { get_param: dcae_ip_addr }
297 __mso_ip_addr__: { get_param: mso_ip_addr }
298 __mr_ip_addr__: { get_param: mr_ip_addr }
299 __policy_ip_addr__: { get_param: policy_ip_addr }
300 __portal_ip_addr__: { get_param: portal_ip_addr }
301 __robot_ip_addr__: { get_param: robot_ip_addr }
302 __sdc_ip_addr__: { get_param: sdc_ip_addr }
303 __sdnc_ip_addr__: { get_param: sdnc_ip_addr }
304 __vid_ip_addr__: { get_param: vid_ip_addr }
310 echo 127.0.0.1 $hn >> /etc/hosts
312 # Download dependencies
313 add-apt-repository -y ppa:openjdk-r/ppa
315 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk bind9 bind9utils bind9-doc ntp ntpdate
318 mkdir /etc/bind/zones
319 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/bind_zones -o /etc/bind/zones/db.simpledemo.openecomp.org
320 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/bind_options -o /etc/bind/named.conf.options
321 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/named.conf.local -o /etc/bind/named.conf.local
324 #NETMASK=$(echo "__oam_network_cidr__" | cut -d"/" -f2)
325 #if [[ $NETMASK == "8" ]]
327 # ADDR=$(echo "__dns_ip_addr__" | cut -d"." -f1)
328 #elif [[ $NETMASK == "16" ]]
330 # ADDR=$(echo "__dns_ip_addr__" | cut -d"." -f1).$(echo "__dns_ip_addr__" | cut -d"." -f2)
331 #elif [[ $NETMASK == "24" ]]
333 # ADDR=$(echo "__dns_ip_addr__" | cut -d"." -f1).$(echo "__dns_ip_addr__" | cut -d"." -f2).$(echo "__dns_ip_addr__" | cut -d"." -f3)
336 #sed -i "s/netmask/$ADDR\/$NETMASK/g" /etc/bind/named.conf.options
337 sed -i "s/dns_ip_addr/"__dns_ip_addr__"/g" /etc/bind/named.conf.options
339 A=$(echo "__dcae_ip_addr__" | cut -d"." -f1)
340 B=$(echo "__dcae_ip_addr__" | cut -d"." -f2)
341 C=$(echo "__dcae_ip_addr__" | cut -d"." -f3)
342 sed -i "s/aai_ip_addr/"__aai_ip_addr__"/g" /etc/bind/zones/db.simpledemo.openecomp.org
343 sed -i "s/appc_ip_addr/"__appc_ip_addr__"/g" /etc/bind/zones/db.simpledemo.openecomp.org
344 sed -i "s/dcae_ip_addr/"__dcae_ip_addr__"/g" /etc/bind/zones/db.simpledemo.openecomp.org
345 sed -i "s/dns_ip_addr/"__dns_ip_addr__"/g" /etc/bind/zones/db.simpledemo.openecomp.org
346 sed -i "s/mso_ip_addr/"__mso_ip_addr__"/g" /etc/bind/zones/db.simpledemo.openecomp.org
347 sed -i "s/mr_ip_addr/"__mr_ip_addr__"/g" /etc/bind/zones/db.simpledemo.openecomp.org
348 sed -i "s/policy_ip_addr/"__policy_ip_addr__"/g" /etc/bind/zones/db.simpledemo.openecomp.org
349 sed -i "s/portal_ip_addr/"__portal_ip_addr__"/g" /etc/bind/zones/db.simpledemo.openecomp.org
350 sed -i "s/robot_ip_addr/"__robot_ip_addr__"/g" /etc/bind/zones/db.simpledemo.openecomp.org
351 sed -i "s/sdc_ip_addr/"__sdc_ip_addr__"/g" /etc/bind/zones/db.simpledemo.openecomp.org
352 sed -i "s/sdnc_ip_addr/"__sdnc_ip_addr__"/g" /etc/bind/zones/db.simpledemo.openecomp.org
353 sed -i "s/vid_ip_addr/"__vid_ip_addr__"/g" /etc/bind/zones/db.simpledemo.openecomp.org
354 sed -i "s/dcae_coll_ip_addr/"$A.$B.$C"/g" /etc/bind/zones/db.simpledemo.openecomp.org
357 sed -i "s/OPTIONS=.*/OPTIONS=\"-4 -u bind\"/g" /etc/default/bind9
359 # Restart bind to pick up configuration changes
360 service bind9 restart
365 type: OS::Neutron::Port
367 network: { get_resource: oam_ecomp }
368 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: aai_ip_addr }}]
371 type: OS::Neutron::FloatingIP
373 floating_network_id: { get_param: public_net_id }
374 port_id: { get_resource: aai_private_port }
377 type: OS::Nova::Server
380 image: { get_param: ubuntu_1404_image }
381 flavor: { get_param: flavor_xlarge }
386 base: { get_param: vm_base_name }
387 key_name: { get_resource: vm_key }
389 - port: { get_resource: aai_private_port }
390 user_data_format: RAW
394 __nexus_repo__: { get_param: nexus_repo }
395 __nexus_docker_repo__: { get_param: nexus_docker_repo }
396 __nexus_username__: { get_param: nexus_username }
397 __nexus_password__: { get_param: nexus_password }
398 __gitlab_username__: { get_param: gitlab_username }
399 __gitlab_password__: { get_param: gitlab_password }
400 __dmaap_topic__: { get_param: dmaap_topic }
401 __artifacts_version__: { get_param: artifacts_version }
402 __dns_ip_addr__: { get_param: dns_ip_addr }
403 __docker_version__: { get_param: docker_version }
408 echo 127.0.0.1 $hn >> /etc/hosts
410 # Download dependencies
411 add-apt-repository -y ppa:openjdk-r/ppa
413 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
415 # Download scripts from Nexus
416 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/aai_vm_init.sh -o /opt/aai_vm_init.sh
417 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/aai_serv.sh -o /opt/aai_serv.sh
418 chmod +x /opt/aai_vm_init.sh
419 chmod +x /opt/aai_serv.sh
420 mv /opt/aai_serv.sh /etc/init.d
421 update-rc.d aai_serv.sh defaults
423 # Download and install docker-engine and docker-compose
424 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
425 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
427 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
428 apt-get install -y docker-engine
432 mkdir /opt/openecomp/aai
433 mkdir /opt/openecomp/aai/logs
434 mkdir /opt/openecomp/aai/data
436 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
437 chmod +x /opt/docker/docker-compose
439 # Store credentials in files
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 "__dmaap_topic__" > /opt/config/dmaap_topic.txt
445 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
446 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
447 echo "gerrit.onap.org" > /opt/config/gitlab_certname.txt
448 echo "__docker_version__" > /opt/config/docker_version.txt
450 # DNS/GW IP address configuration
451 echo "nameserver __dns_ip_addr__" >> /etc/resolvconf/resolv.conf.d/head
454 # Reboot the VM to pick up configuration changes
460 type: OS::Neutron::Port
462 network: { get_resource: oam_ecomp }
463 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: mso_ip_addr }}]
466 type: OS::Neutron::FloatingIP
468 floating_network_id: { get_param: public_net_id }
469 port_id: { get_resource: mso_private_port }
472 type: OS::Nova::Server
474 image: { get_param: ubuntu_1604_image }
475 flavor: { get_param: flavor_large }
480 base: { get_param: vm_base_name }
481 key_name: { get_resource: vm_key }
483 - port: { get_resource: mso_private_port }
484 user_data_format: RAW
488 __nexus_repo__: { get_param: nexus_repo }
489 __nexus_docker_repo__: { get_param: nexus_docker_repo }
490 __nexus_username__: { get_param: nexus_username }
491 __nexus_password__: { get_param: nexus_password }
492 __openstack_username__: { get_param: openstack_username }
493 __openstack_tenant_id__: { get_param: openstack_tenant_id }
494 __openstack_api_key__: { get_param: openstack_api_key }
495 __keystone_url__: { get_param: keystone_url }
496 __dmaap_topic__: { get_param: dmaap_topic }
497 __artifacts_version__: { get_param: artifacts_version }
498 __dns_ip_addr__: { get_param: dns_ip_addr }
499 __docker_version__: { get_param: docker_version }
500 __gerrit_branch__: { get_param: gerrit_branch }
505 echo 127.0.0.1 $hn >> /etc/hosts
507 # Download dependencies
508 add-apt-repository -y ppa:openjdk-r/ppa
510 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
512 # Download scripts from Nexus
513 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_vm_init.sh -o /opt/mso_vm_init.sh
514 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_serv.sh -o /opt/mso_serv.sh
515 chmod +x /opt/mso_vm_init.sh
516 chmod +x /opt/mso_serv.sh
517 mv /opt/mso_serv.sh /etc/init.d
518 update-rc.d mso_serv.sh defaults
520 # Download and install docker-engine and docker-compose
521 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
522 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
524 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
525 apt-get install -y docker-engine
529 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
530 chmod +x /opt/docker/docker-compose
532 # Store credentials in files
534 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
535 echo "__nexus_username__" > /opt/config/nexus_username.txt
536 echo "__nexus_password__" > /opt/config/nexus_password.txt
537 echo "__openstack_username__" > /opt/config/openstack_username.txt
538 echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
539 echo "__keystone_url__" > /opt/config/keystone.txt
540 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
541 echo "__docker_version__" > /opt/config/docker_version.txt
543 # Clone Gerrit repository
545 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/mso/docker-config.git test_lab
546 MSO_ENCRYPTION_KEY=$(cat /opt/test_lab/encryption.key)
547 echo -n "__openstack_api_key__" | openssl aes-128-ecb -e -K $MSO_ENCRYPTION_KEY -nosalt | xxd -c 256 -p > /opt/config/api_key.txt
549 # Rename network interface
550 sed -i "s/GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0\"/g" /etc/default/grub
551 grub-mkconfig -o /boot/grub/grub.cfg
552 sed -i "s/ens3/eth0/g" /etc/network/interfaces.d/*.cfg
554 # DNS/GW IP address configuration
555 echo "nameserver __dns_ip_addr__" >> /etc/resolvconf/resolv.conf.d/head
558 # Reboot the VM to pick up configuration changes
562 # Message Router instantiation
563 mrouter_private_port:
564 type: OS::Neutron::Port
566 network: { get_resource: oam_ecomp }
567 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: mr_ip_addr }}]
570 type: OS::Neutron::FloatingIP
572 floating_network_id: { get_param: public_net_id }
573 port_id: { get_resource: mrouter_private_port }
576 type: OS::Nova::Server
578 image: { get_param: ubuntu_1404_image }
579 flavor: { get_param: flavor_large }
582 template: base-message-router
584 base: { get_param: vm_base_name }
585 key_name: { get_resource: vm_key }
587 - port: { get_resource: mrouter_private_port }
588 user_data_format: RAW
592 __nexus_repo__: { get_param: nexus_repo }
593 __nexus_docker_repo__: { get_param: nexus_docker_repo }
594 __nexus_username__: { get_param: nexus_username }
595 __nexus_password__: { get_param: nexus_password }
596 __artifacts_version__: { get_param: artifacts_version }
597 __dns_ip_addr__: { get_param: dns_ip_addr }
598 __gerrit_branch__: { get_param: gerrit_branch }
603 echo 127.0.0.1 $hn >> /etc/hosts
605 # Download dependencies
606 add-apt-repository -y ppa:openjdk-r/ppa
608 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
610 # Download scripts from Nexus
611 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_vm_init.sh -o /opt/mr_vm_init.sh
612 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_serv.sh -o /opt/mr_serv.sh
613 chmod +x /opt/mr_vm_init.sh
614 chmod +x /opt/mr_serv.sh
615 mv /opt/mr_serv.sh /etc/init.d
616 update-rc.d mr_serv.sh defaults
618 # Download and install docker-engine and docker-compose
619 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
620 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
622 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
623 apt-get install -y docker-engine
627 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
628 chmod +x /opt/docker/docker-compose
630 # Store credentials in files
632 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
633 echo "__nexus_username__" > /opt/config/nexus_username.txt
634 echo "__nexus_password__" > /opt/config/nexus_password.txt
636 # Clone Gerrit repository
638 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/dcae/demo/startup/message-router.git dcae-startup-vm-message-router
640 # DNS/GW IP address configuration
641 echo "nameserver __dns_ip_addr__" >> /etc/resolvconf/resolv.conf.d/head
644 # Reboot the VM to pick up configuration changes
648 # Robot Framework instantiation
650 type: OS::Neutron::Port
652 network: { get_resource: oam_ecomp }
653 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: robot_ip_addr }}]
656 type: OS::Neutron::FloatingIP
658 floating_network_id: { get_param: public_net_id }
659 port_id: { get_resource: robot_private_port }
662 type: OS::Nova::Server
664 image: { get_param: ubuntu_1604_image }
665 flavor: { get_param: flavor_small }
670 base: { get_param: vm_base_name }
671 key_name: { get_resource: vm_key }
673 - port: { get_resource: robot_private_port }
674 user_data_format: RAW
678 __nexus_repo__: { get_param: nexus_repo }
679 __nexus_docker_repo__: { get_param: nexus_docker_repo }
680 __nexus_username__: { get_param: nexus_username }
681 __nexus_password__: { get_param: nexus_password }
682 __network_name__: { get_attr: [oam_ecomp, name] }
683 __openstack_username__: { get_param: openstack_username }
684 __openstack_api_key__: { get_param : openstack_api_key }
685 __artifacts_version__: { get_param: artifacts_version }
686 __openstack_region__: { get_param: openstack_region }
687 __dns_ip_addr__: { get_param: dns_ip_addr }
688 __docker_version__: { get_param: docker_version }
689 __gerrit_branch__: { get_param: gerrit_branch }
694 echo 127.0.0.1 $hn >> /etc/hosts
696 # Download dependencies
697 add-apt-repository -y ppa:openjdk-r/ppa
699 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
700 echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic
702 # Download scripts from Nexus
703 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_vm_init.sh -o /opt/robot_vm_init.sh
704 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_serv.sh -o /opt/robot_serv.sh
705 chmod +x /opt/robot_vm_init.sh
706 chmod +x /opt/robot_serv.sh
707 mv /opt/robot_serv.sh /etc/init.d
708 update-rc.d robot_serv.sh defaults
710 # Download and install docker-engine and docker-compose
711 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
712 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
714 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
715 apt-get install -y docker-engine
719 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
720 chmod +x /opt/docker/docker-compose
722 # Store credentials in files
724 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
725 echo "__nexus_repo__" > /opt/config/nexus_repo.txt
726 echo "__nexus_username__" > /opt/config/nexus_username.txt
727 echo "__nexus_password__" > /opt/config/nexus_password.txt
728 echo "__network_name__" > /opt/config/network.txt
729 echo "__openstack_username__" > /opt/config/openstack_username.txt
730 echo "__openstack_api_key__" > /opt/config/openstack_password.txt
731 echo "__openstack_region__" > /opt/config/region.txt
732 echo "__artifacts_version__" > /opt/config/artifacts_version.txt
733 echo "__docker_version__" > /opt/config/docker_version.txt
735 # Execute RobotETE-specific instructions: create share folder to run as a docker volume
736 mkdir -p /opt/eteshare/logs
737 mkdir -p /opt/eteshare/config
739 # Clone Gerrit repository
741 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/testsuite/properties.git testsuite/properties
743 # Rename network interface
744 sed -i "s/GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0\"/g" /etc/default/grub
745 grub-mkconfig -o /boot/grub/grub.cfg
746 sed -i "s/ens3/eth0/g" /etc/network/interfaces.d/*.cfg
748 # DNS/GW IP address configuration
749 echo "nameserver __dns_ip_addr__" >> /etc/resolvconf/resolv.conf.d/head
752 # Reboot the VM to pick up configuration changes
758 type: OS::Neutron::Port
760 network: { get_resource: oam_ecomp }
761 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: vid_ip_addr }}]
764 type: OS::Neutron::FloatingIP
766 floating_network_id: { get_param: public_net_id }
767 port_id: { get_resource: vid_private_port }
770 type: OS::Nova::Server
772 image: { get_param: ubuntu_1404_image }
773 flavor: { get_param: flavor_medium }
778 base: { get_param: vm_base_name }
779 key_name: { get_resource: vm_key }
781 - port: { get_resource: vid_private_port }
782 user_data_format: RAW
786 __nexus_repo__: { get_param: nexus_repo }
787 __nexus_docker_repo__: { get_param: nexus_docker_repo }
788 __nexus_username__: { get_param: nexus_username }
789 __nexus_password__: { get_param: nexus_password }
790 __artifacts_version__: { get_param: artifacts_version }
791 __dns_ip_addr__: { get_param: dns_ip_addr }
792 __docker_version__: { get_param: docker_version }
793 __gerrit_branch__: { get_param: gerrit_branch }
798 echo 127.0.0.1 $hn >> /etc/hosts
800 # Download dependencies
801 add-apt-repository -y ppa:openjdk-r/ppa
803 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk make git ntp ntpdate
805 # Download scripts from Nexus
806 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_vm_init.sh -o /opt/vid_vm_init.sh
807 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_serv.sh -o /opt/vid_serv.sh
808 chmod +x /opt/vid_vm_init.sh
809 chmod +x /opt/vid_serv.sh
810 mv /opt/vid_serv.sh /etc/init.d
811 update-rc.d vid_serv.sh defaults
813 # Download and install docker-engine and docker-compose
814 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
815 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
817 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
818 apt-get install -y docker-engine
822 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
823 chmod +x /opt/docker/docker-compose
825 # Store credentials in files
827 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
828 echo "__nexus_username__" > /opt/config/nexus_username.txt
829 echo "__nexus_password__" > /opt/config/nexus_password.txt
830 echo "__docker_version__" > /opt/config/docker_version.txt
832 # Clone Gerrit repository
834 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/vid.git
836 # DNS/GW IP address configuration
837 echo "nameserver __dns_ip_addr__" >> /etc/resolvconf/resolv.conf.d/head
840 # Reboot the VM to pick up configuration changes
844 # SDN-C instantiation
846 type: OS::Neutron::Port
848 network: { get_resource: oam_ecomp }
849 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: sdnc_ip_addr }}]
852 type: OS::Neutron::FloatingIP
854 floating_network_id: { get_param: public_net_id }
855 port_id: { get_resource: sdnc_private_port }
858 type: OS::Nova::Server
860 image: { get_param: ubuntu_1404_image }
861 flavor: { get_param: flavor_large }
866 base: { get_param: vm_base_name }
867 key_name: { get_resource: vm_key }
869 - port: { get_resource: sdnc_private_port }
870 user_data_format: RAW
874 __nexus_repo__: { get_param: nexus_repo }
875 __nexus_docker_repo__: { get_param: nexus_docker_repo }
876 __nexus_username__: { get_param: nexus_username }
877 __nexus_password__: { get_param: nexus_password }
878 __artifacts_version__: { get_param: artifacts_version }
879 __dns_ip_addr__: { get_param: dns_ip_addr }
880 __docker_version__: { get_param: docker_version }
881 __gerrit_branch__: { get_param: gerrit_branch }
886 echo 127.0.0.1 $hn >> /etc/hosts
888 # Download dependencies
889 add-apt-repository -y ppa:openjdk-r/ppa
891 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
893 # Download scripts from Nexus
894 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_vm_init.sh -o /opt/sdnc_vm_init.sh
895 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_serv.sh -o /opt/sdnc_serv.sh
896 chmod +x /opt/sdnc_vm_init.sh
897 chmod +x /opt/sdnc_serv.sh
898 mv /opt/sdnc_serv.sh /etc/init.d
899 update-rc.d sdnc_serv.sh defaults
901 # Download and install docker-engine and docker-compose
902 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
903 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
905 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
906 apt-get install -y docker-engine
910 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
911 chmod +x /opt/docker/docker-compose
913 # Store credentials in files
915 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
916 echo "__nexus_username__" > /opt/config/nexus_username.txt
917 echo "__nexus_password__" > /opt/config/nexus_password.txt
918 echo "__docker_version__" > /opt/config/docker_version.txt
920 # Clone Gerrit repository
922 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/sdnc/oam.git sdnc
924 # DNS/GW IP address configuration
925 echo "nameserver __dns_ip_addr__" >> /etc/resolvconf/resolv.conf.d/head
928 # Reboot the VM to pick up configuration changes
934 type: OS::Neutron::Port
936 network: { get_resource: oam_ecomp }
937 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: sdc_ip_addr }}]
940 type: OS::Neutron::FloatingIP
942 floating_network_id: { get_param: public_net_id }
943 port_id: { get_resource: sdc_private_port }
946 type: OS::Cinder::Volume
951 sdc_volume_attachment:
952 type: OS::Cinder::VolumeAttachment
954 volume_id: { get_resource: sdc_volume_data }
955 instance_uuid: { get_resource: sdc_vm }
959 type: OS::Nova::Server
961 image: { get_param: ubuntu_1604_image }
962 flavor: { get_param: flavor_xlarge }
967 base: { get_param: vm_base_name }
968 key_name: { get_resource: vm_key }
970 - port: { get_resource: sdc_private_port }
971 user_data_format: RAW
975 __nexus_repo__: { get_param: nexus_repo }
976 __nexus_docker_repo__: { get_param: nexus_docker_repo }
977 __nexus_username__: { get_param: nexus_username }
978 __nexus_password__: { get_param: nexus_password }
979 __env_name__: { get_param: dmaap_topic }
980 __artifacts_version__: { get_param: artifacts_version }
981 __dns_ip_addr__: { get_param: dns_ip_addr }
982 __mr_ip_addr__: { get_param: mr_ip_addr }
983 __public_ip__: { get_attr: [sdc_floating_ip, floating_ip_address] }
984 __docker_version__: { get_param: docker_version }
985 __gerrit_branch__: { get_param: gerrit_branch }
990 echo 127.0.0.1 $hn >> /etc/hosts
992 # Download dependencies
993 add-apt-repository -y ppa:openjdk-r/ppa
995 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
997 # Download scripts from Nexus
998 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_vm_init.sh -o /opt/asdc_vm_init.sh
999 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_serv.sh -o /opt/asdc_serv.sh
1000 chmod +x /opt/asdc_vm_init.sh
1001 chmod +x /opt/asdc_serv.sh
1002 mv /opt/asdc_serv.sh /etc/init.d
1003 update-rc.d asdc_serv.sh defaults
1005 # Download and install docker-engine and docker-compose
1006 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1007 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
1009 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1010 apt-get install -y docker-engine
1011 service docker start
1013 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1014 chmod +x /opt/docker/docker-compose
1016 # Create partition and mount the external volume
1017 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_ext_volume_partitions.txt -o /opt/asdc_ext_volume_partitions.txt
1018 sfdisk /dev/vdb < /opt/asdc_ext_volume_partitions.txt
1019 mkfs -t ext4 /dev/vdb1
1021 mount /dev/vdb1 /data
1022 echo "/dev/vdb1 /data ext4 errors=remount-ro,noatime,barrier=0 0 1" >> /etc/fstab
1024 # Store credentials in files
1025 mkdir -p /opt/config
1026 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1027 echo "__nexus_username__" > /opt/config/nexus_username.txt
1028 echo "__nexus_password__" > /opt/config/nexus_password.txt
1029 echo "__env_name__" > /opt/config/env_name.txt
1030 echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
1031 echo "__public_ip__" > /opt/config/public_ip.txt
1032 echo "__docker_version__" > /opt/config/docker_version.txt
1034 # Run SDC-specific instructions
1036 mkdir -p /data/environments
1037 mkdir -p /data/scripts
1038 mkdir -p /data/logs/BE
1039 mkdir -p /data/logs/FE
1041 chmod 777 /data/logs/BE
1042 chmod 777 /data/logs/FE
1044 # Clone Gerrit repository
1045 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/sdc.git
1047 cat > /root/.bash_aliases << EOF
1048 alias dcls='/data/scripts/docker_clean.sh \$1'
1049 alias dlog='/data/scripts/docker_login.sh \$1'
1050 alias rund='/data/scripts/docker_run.sh'
1051 alias health='/data/scripts/docker_health.sh'
1054 # Rename network interface
1055 sed -i "s/GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0\"/g" /etc/default/grub
1056 grub-mkconfig -o /boot/grub/grub.cfg
1057 sed -i "s/ens3/eth0/g" /etc/network/interfaces.d/*.cfg
1059 # DNS/GW IP address configuration
1060 echo "nameserver __dns_ip_addr__" >> /etc/resolvconf/resolv.conf.d/head
1063 # Reboot the VM to pick up configuration changes
1067 # PORTAL instantiation
1068 portal_private_port:
1069 type: OS::Neutron::Port
1071 network: { get_resource: oam_ecomp }
1072 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: portal_ip_addr }}]
1075 type: OS::Neutron::FloatingIP
1077 floating_network_id: { get_param: public_net_id }
1078 port_id: { get_resource: portal_private_port }
1081 type: OS::Nova::Server
1083 image: { get_param: ubuntu_1404_image }
1084 flavor: { get_param: flavor_large }
1087 template: base-portal
1089 base: { get_param: vm_base_name }
1090 key_name: { get_resource: vm_key }
1092 - port: { get_resource: portal_private_port }
1093 user_data_format: RAW
1097 __nexus_repo__: { get_param: nexus_repo }
1098 __nexus_docker_repo__: { get_param: nexus_docker_repo }
1099 __nexus_username__: { get_param: nexus_username }
1100 __nexus_password__: { get_param: nexus_password }
1101 __artifacts_version__: { get_param: artifacts_version }
1102 __dns_ip_addr__: { get_param: dns_ip_addr }
1103 __public_ip__: { get_attr: [portal_floating_ip, floating_ip_address] }
1104 __docker_version__: { get_param: docker_version }
1105 __gerrit_branch__: { get_param: gerrit_branch }
1110 echo 127.0.0.1 $hn >> /etc/hosts
1112 # Download dependencies
1113 add-apt-repository -y ppa:openjdk-r/ppa
1115 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk unzip mysql-client-core-5.6 ntp ntpdate
1117 # Download scripts from Nexus
1118 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_vm_init.sh -o /opt/portal_vm_init.sh
1119 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_serv.sh -o /opt/portal_serv.sh
1120 chmod +x /opt/portal_vm_init.sh
1121 chmod +x /opt/portal_serv.sh
1122 mv /opt/portal_serv.sh /etc/init.d
1123 update-rc.d portal_serv.sh defaults
1125 # Download and install docker-engine and docker-compose
1126 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1127 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1129 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1130 apt-get install -y docker-engine
1131 service docker start
1133 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1134 chmod +x /opt/docker/docker-compose
1136 # Store credentials in files
1137 mkdir -p /opt/config
1138 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1139 echo "__nexus_username__" > /opt/config/nexus_username.txt
1140 echo "__nexus_password__" > /opt/config/nexus_password.txt
1141 echo "__public_ip__" > /opt/config/public_ip.txt
1142 echo "__docker_version__" > /opt/config/docker_version.txt
1144 # Clone Gerrit repository
1145 mkdir -p /PROJECT/OpenSource/UbuntuEP/logs
1147 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/portal.git
1149 # DNS/GW IP address configuration
1150 echo "nameserver __dns_ip_addr__" >> /etc/resolvconf/resolv.conf.d/head
1153 # Reboot the VM to pick up configuration changes
1157 # DCAE Controller instantiation
1158 dcae_c_private_port:
1159 type: OS::Neutron::Port
1161 network: { get_resource: oam_ecomp }
1162 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: dcae_ip_addr }}]
1165 type: OS::Neutron::FloatingIP
1167 floating_network_id: { get_param: public_net_id }
1168 port_id: { get_resource: dcae_c_private_port }
1171 type: OS::Nova::Server
1173 image: { get_param: ubuntu_1404_image }
1174 flavor: { get_param: flavor_medium }
1177 template: base-dcae-controller
1179 base: { get_param: vm_base_name }
1180 key_name: { get_resource: vm_key }
1182 - port: { get_resource: dcae_c_private_port }
1183 user_data_format: RAW
1187 __nexus_repo__: { get_param: nexus_repo }
1188 __nexus_docker_repo__: { get_param: nexus_docker_repo }
1189 __nexus_username__: { get_param: nexus_username }
1190 __nexus_password__: { get_param: nexus_password }
1191 __nexus_url_snapshots__: { get_param: nexus_url_snapshot }
1192 __gitlab_branch__: { get_param: gitlab_branch }
1193 __dns_ip_addr__: { get_param: dns_ip_addr }
1194 __dcae_zone__: { get_param: dcae_zone }
1195 __dcae_state__: { get_param: dcae_state }
1196 __artifacts_version__: { get_param: artifacts_version }
1197 __tenant_id__: { get_param: openstack_tenant_id }
1198 __openstack_private_network_name__: { get_attr: [oam_ecomp, name] }
1199 __openstack_user__: { get_param: openstack_username }
1200 __openstack_password__: { get_param: openstack_api_key }
1201 __key_name__: { get_param: key_name }
1202 __rand_str__: { get_resource: random-str }
1203 __pub_key__: { get_param: pub_key }
1204 __nexus_repo_root__: { get_param: nexus_repo_root }
1205 __openstack_region__: { get_param: openstack_region }
1206 __horizon_url__ : { get_param: horizon_url }
1207 __keystone_url__ : { get_param: keystone_url }
1208 __docker_version__: { get_param: docker_version }
1209 __gerrit_branch__: { get_param: gerrit_branch }
1214 echo 127.0.0.1 $hn >> /etc/hosts
1216 # Download dependencies
1217 add-apt-repository -y ppa:openjdk-r/ppa
1219 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk make git ntp ntpdate
1221 # Download scripts from Nexus
1222 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_vm_init.sh -o /opt/dcae_vm_init.sh
1223 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_serv.sh -o /opt/dcae_serv.sh
1224 chmod +x /opt/dcae_vm_init.sh
1225 chmod +x /opt/dcae_serv.sh
1226 mv /opt/dcae_serv.sh /etc/init.d
1227 update-rc.d dcae_serv.sh defaults
1229 # Download and install docker-engine and docker-compose
1230 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1231 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1233 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1234 apt-get install -y docker-engine
1235 service docker start
1237 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1238 chmod +x /opt/docker/docker-compose
1240 # Clone Gerrit repository
1242 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/dcae/demo/startup/controller.git dcae-startup-vm-controller
1244 # DCAE Controller specific deployment
1245 cd /opt/dcae-startup-vm-controller
1246 mkdir -p /opt/app/dcae-controller
1247 cat > /opt/app/dcae-controller/config.yaml << EOF_CONFIG
1249 STATE: __dcae_state__
1250 DCAE-VERSION: __artifacts_version__
1251 HORIZON-URL: __horizon_url__/__openstack_user__
1252 KEYSTONE-URL: __keystone_url__
1253 OPENSTACK-TENANT-ID: __tenant_id__
1254 OPENSTACK-TENANT-NAME: OPEN-ECOMP
1255 OPENSTACK-REGION: __openstack_region__
1256 OPENSTACK-PRIVATE-NETWORK: __openstack_private_network_name__
1257 OPENSTACK-USER: __openstack_user__
1258 OPENSTACK-PASSWORD: __openstack_password__
1259 OPENSTACK-KEYNAME: __key_name_____rand_str___dcae
1260 OPENSTACK-PUBKEY: __pub_key__
1262 NEXUS-URL-ROOT: __nexus_repo_root__
1263 NEXUS-USER: __nexus_username__
1264 NEXUS-PASSWORD: __nexus_password__
1265 NEXUS-URL-SNAPSHOTS: __nexus_url_snapshots__
1266 NEXUS-RAWURL: __nexus_repo__
1268 DOCKER-REGISTRY: __nexus_docker_repo__
1270 GIT-MR-REPO: http://gerrit.onap.org/r/dcae/demo/startup/message-router.git
1273 # Store credentials in files
1274 mkdir -p /opt/config
1275 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1276 echo "__nexus_username__" > /opt/config/nexus_username.txt
1277 echo "__nexus_password__" > /opt/config/nexus_password.txt
1278 echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
1279 echo "__docker_version__" > /opt/config/docker_version.txt
1281 # DNS/GW IP address configuration
1282 echo "nameserver __dns_ip_addr__" >> /etc/resolvconf/resolv.conf.d/head
1285 # Reboot the VM to pick up configuration changes
1289 # Policy Engine instantiation
1290 policy_private_port:
1291 type: OS::Neutron::Port
1293 network: { get_resource: oam_ecomp }
1294 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: policy_ip_addr }}]
1297 type: OS::Neutron::FloatingIP
1299 floating_network_id: { get_param: public_net_id }
1300 port_id: { get_resource: policy_private_port }
1303 type: OS::Nova::Server
1305 image: { get_param: ubuntu_1404_image }
1306 flavor: { get_param: flavor_xlarge }
1309 template: base-policy
1311 base: { get_param: vm_base_name }
1312 key_name: { get_resource: vm_key }
1314 - port: { get_resource: policy_private_port }
1315 user_data_format: RAW
1319 __nexus_repo__: { get_param: nexus_repo }
1320 __nexus_docker_repo__: { get_param: nexus_docker_repo }
1321 __nexus_username__: { get_param: nexus_username }
1322 __nexus_password__: { get_param: nexus_password }
1323 __artifacts_version__: { get_param: artifacts_version }
1324 __dns_ip_addr__: { get_param: dns_ip_addr }
1325 __public_ip__: { get_attr: [policy_floating_ip, floating_ip_address] }
1326 __docker_version__: { get_param: docker_version }
1327 __gerrit_branch__: { get_param: gerrit_branch }
1332 echo 127.0.0.1 $hn >> /etc/hosts
1334 # Download dependencies
1335 add-apt-repository -y ppa:openjdk-r/ppa
1337 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
1339 # Download scripts from Nexus
1340 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_vm_init.sh -o /opt/policy_vm_init.sh
1341 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_serv.sh -o /opt/policy_serv.sh
1342 chmod +x /opt/policy_vm_init.sh
1343 chmod +x /opt/policy_serv.sh
1344 mv /opt/policy_serv.sh /etc/init.d
1345 update-rc.d policy_serv.sh defaults
1347 # Download and install docker-engine and docker-compose
1348 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1349 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1351 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1352 apt-get install -y docker-engine
1353 service docker start
1355 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1356 chmod +x /opt/docker/docker-compose
1358 # Store credentials in files
1359 mkdir -p /opt/config
1360 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1361 echo "__nexus_username__" > /opt/config/nexus_username.txt
1362 echo "__nexus_password__" > /opt/config/nexus_password.txt
1363 echo "__public_ip__" > /opt/config/public_ip.txt
1364 echo "__docker_version__" > /opt/config/docker_version.txt
1366 # Clone Gerrit repository
1368 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/policy/docker.git policy
1370 # DNS/GW IP address configuration
1371 echo "nameserver __dns_ip_addr__" >> /etc/resolvconf/resolv.conf.d/head
1374 # Reboot the VM to pick up configuration changes
1378 # APP-C instantiation
1380 type: OS::Neutron::Port
1382 network: { get_resource: oam_ecomp }
1383 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": { get_param: appc_ip_addr }}]
1386 type: OS::Neutron::FloatingIP
1388 floating_network_id: { get_param: public_net_id }
1389 port_id: { get_resource: appc_private_port }
1392 type: OS::Nova::Server
1394 image: { get_param: ubuntu_1404_image }
1395 flavor: { get_param: flavor_large }
1400 base: { get_param: vm_base_name }
1401 key_name: { get_resource: vm_key }
1403 - port: { get_resource: appc_private_port }
1404 user_data_format: RAW
1408 __nexus_repo__: { get_param: nexus_repo }
1409 __nexus_docker_repo__: { get_param: nexus_docker_repo }
1410 __nexus_username__: { get_param: nexus_username }
1411 __nexus_password__: { get_param: nexus_password }
1412 __dmaap_topic__: { get_param: dmaap_topic }
1413 __artifacts_version__: { get_param: artifacts_version }
1414 __dns_ip_addr__: { get_param: dns_ip_addr }
1415 __docker_version__: { get_param: docker_version }
1416 __gerrit_branch__: { get_param: gerrit_branch }
1421 echo 127.0.0.1 $hn >> /etc/hosts
1423 # Download dependencies
1424 add-apt-repository -y ppa:openjdk-r/ppa
1426 apt-get install -y apt-transport-https ca-certificates wget openjdk-7-jdk ntp ntpdate
1428 # Download scripts from Nexus
1429 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_vm_init.sh -o /opt/appc_vm_init.sh
1430 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_serv.sh -o /opt/appc_serv.sh
1431 chmod +x /opt/appc_vm_init.sh
1432 chmod +x /opt/appc_serv.sh
1433 mv /opt/appc_serv.sh /etc/init.d
1434 update-rc.d appc_serv.sh defaults
1436 # Download and install docker-engine and docker-compose
1437 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1438 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1440 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1441 apt-get install -y docker-engine
1442 service docker start
1445 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1446 chmod +x /opt/docker/docker-compose
1448 # Store credentials in files
1449 mkdir -p /opt/config
1450 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1451 echo "__nexus_username__" > /opt/config/nexus_username.txt
1452 echo "__nexus_password__" > /opt/config/nexus_password.txt
1453 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1454 echo "__docker_version__" > /opt/config/docker_version.txt
1456 # Clone Gerrit repository
1458 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/appc/deployment.git appc
1460 # DNS/GW IP address configuration
1461 echo "nameserver __dns_ip_addr__" >> /etc/resolvconf/resolv.conf.d/head
1464 # Reboot the VM to pick up configuration changes