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
45 label: Gitlab Repository Username
46 description: Gitlab Repository username
50 label: Gitlab Repository Password
51 description: Gitlab Repository Password
56 description: DmaaP Topic that MSO and A&AI listen to
60 label: Artifacts Version
61 description: Artifacts version of ONAP components
66 description: Docker version of ONAP docker images
70 label: Gerrit code branch
71 description: Gerrit branch where to download the code from
73 # Parameters for DCAE instantiation
77 description: DCAE Zone to use in VM names created by DCAE controller
82 description: DCAE State to use in VM names created by DCAE controller
86 label: Rackspace tenant ID
87 description: Rackspace tenant ID
91 label: Rackspace username
92 description: Rackspace username
96 label: Rackspace API Key
97 description: Rackspace API Key
101 label: Rackspace Password
102 description: Rackspace Password
106 label: Root URL of nexus repository
107 description: Root URL of nexus repository
111 label: Snapshot of Maven repository for DCAE deployment
112 description: Snapshot of Maven repository
116 label: Rackspace Region
117 description: Rackspace region where the DCAE controller will spin the VMs
121 label: Branch of the Gitlab repository
122 description: Branch of the Gitlab repository
127 type: OS::Heat::RandomString
131 # Public key used to access ONAP components
133 type: OS::Nova::KeyPair
139 base: { get_param: key_name }
140 rand: { get_resource: random-str }
141 public_key: { get_param: pub_key }
142 save_private_key: false
145 # ONAP management private network
147 type: OS::Neutron::Net
151 template: oam_ecomp_rand
153 rand: { get_resource: random-str }
156 type: OS::Neutron::Subnet
160 template: oam_ecomp_rand
162 rand: { get_resource: random-str }
163 network_id: { get_resource: oam_ecomp }
167 # DNS Server instantiation
169 type: OS::Neutron::Port
171 network: { get_resource: oam_ecomp }
172 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.0.1}]
175 type: OS::Nova::Server
177 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
178 flavor: 4 GB General Purpose v1
180 key_name: { get_resource: vm_key }
182 - network: { get_param: public_net_id }
183 - port: { get_resource: dns_private_port }
184 user_data_format: RAW
188 __nexus_repo__: { get_param: nexus_repo }
189 __artifacts_version__: { get_param: artifacts_version }
193 # Download dependencies
194 add-apt-repository -y ppa:openjdk-r/ppa
196 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk bind9 bind9utils bind9-doc ntp ntpdate
199 mkdir /etc/bind/zones
201 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/db_simpledemo_openecomp_org -o /etc/bind/zones/db.simpledemo.openecomp.org
202 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/named.conf.options -o /etc/bind/named.conf.options
203 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/named.conf.local -o /etc/bind/named.conf.local
207 sed -i "s/OPTIONS=.*/OPTIONS=\"-4 -u bind\"/g" /etc/default/bind9
208 service bind9 restart
213 type: OS::Neutron::Port
215 network: { get_resource: oam_ecomp }
216 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.1.1}]
219 type: OS::Cinder::Volume
224 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
227 type: OS::Nova::Server
230 flavor: 15 GB Compute v1
232 key_name: { get_resource: vm_key }
233 block_device_mapping:
234 - volume_id: { get_resource: aai_volume }
237 - network: { get_param: public_net_id }
238 - port: { get_resource: aai_private_port }
239 user_data_format: RAW
243 __nexus_repo__: { get_param: nexus_repo }
244 __nexus_docker_repo__: { get_param: nexus_docker_repo }
245 __nexus_username__: { get_param: nexus_username }
246 __nexus_password__: { get_param: nexus_password }
247 __gitlab_username__: { get_param: gitlab_username }
248 __gitlab_password__: { get_param: gitlab_password }
249 __dmaap_topic__: { get_param: dmaap_topic }
250 __artifacts_version__: { get_param: artifacts_version }
251 __docker_version__: { get_param: docker_version }
255 # DNS/GW IP address configuration
256 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
259 # Download dependencies
260 add-apt-repository -y ppa:openjdk-r/ppa
262 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
264 # Download scripts from Nexus
265 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/aai_vm_init.sh -o /opt/aai_vm_init.sh
266 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/aai_serv.sh -o /opt/aai_serv.sh
267 chmod +x /opt/aai_vm_init.sh
268 chmod +x /opt/aai_serv.sh
269 mv /opt/aai_serv.sh /etc/init.d
270 update-rc.d aai_serv.sh defaults
272 # Download and install docker-engine and docker-compose
273 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
274 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
276 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
277 apt-get install -y docker-engine
280 mkdir -p /opt/openecomp/aai/logs
281 mkdir -p /opt/openecomp/aai/data
283 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
284 chmod +x /opt/docker/docker-compose
286 # Store credentials in files
288 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
289 echo "__nexus_username__" > /opt/config/nexus_username.txt
290 echo "__nexus_password__" > /opt/config/nexus_password.txt
291 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
292 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
293 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
294 echo "gerrit.onap.org" > /opt/config/gitlab_certname.txt
295 echo "__docker_version__" > /opt/config/docker_version.txt
297 # Execute docker instructions
304 type: OS::Neutron::Port
306 network: { get_resource: oam_ecomp }
307 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.5.1}]
310 type: OS::Nova::Server
312 image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
313 flavor: 4 GB General Purpose v1
315 key_name: { get_resource: vm_key }
317 - network: { get_param: public_net_id }
318 - port: { get_resource: mso_private_port }
319 user_data_format: RAW
323 __nexus_repo__: { get_param: nexus_repo }
324 __nexus_docker_repo__: { get_param: nexus_docker_repo }
325 __nexus_username__: { get_param: nexus_username }
326 __nexus_password__: { get_param: nexus_password }
327 __openstack_username__: { get_param: openstack_username }
328 __openstack_tenant_id__: { get_param: openstack_tenant_id }
329 __openstack_api_key__: { get_param: openstack_api_key }
330 __dmaap_topic__: { get_param: dmaap_topic }
331 __artifacts_version__: { get_param: artifacts_version }
332 __docker_version__: { get_param: docker_version }
333 __gerrit_branch__: { get_param: gerrit_branch }
337 # DNS/GW IP address configuration
338 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
341 # Download dependencies
342 add-apt-repository -y ppa:openjdk-r/ppa
344 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
346 # Download scripts from Nexus
347 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_vm_init.sh -o /opt/mso_vm_init.sh
348 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_serv.sh -o /opt/mso_serv.sh
349 chmod +x /opt/mso_vm_init.sh
350 chmod +x /opt/mso_serv.sh
351 mv /opt/mso_serv.sh /etc/init.d
352 update-rc.d mso_serv.sh defaults
354 # Download and install docker-engine and docker-compose
355 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
356 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
358 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
359 apt-get install -y docker-engine
363 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
364 chmod +x /opt/docker/docker-compose
366 # Store credentials in files
368 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
369 echo "__nexus_username__" > /opt/config/nexus_username.txt
370 echo "__nexus_password__" > /opt/config/nexus_password.txt
371 echo "__openstack_username__" > /opt/config/openstack_username.txt
372 echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
373 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
374 echo "__docker_version__" > /opt/config/docker_version.txt
376 # Run docker-compose to spin up containers
378 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/mso/docker-config.git test_lab
379 MSO_ENCRYPTION_KEY=$(cat /opt/test_lab/encryption.key)
380 echo -n "__openstack_api_key__" | openssl aes-128-ecb -e -K $MSO_ENCRYPTION_KEY -nosalt | xxd -c 256 -p > /opt/config/api_key.txt
384 # Message Router instantiation
385 mrouter_private_port:
386 type: OS::Neutron::Port
388 network: { get_resource: oam_ecomp }
389 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.11.1}]
392 type: OS::Nova::Server
394 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
396 name: vm1-message-router
397 key_name: { get_resource: vm_key }
399 - network: { get_param: public_net_id }
400 - port: { get_resource: mrouter_private_port }
401 user_data_format: RAW
405 __nexus_repo__: { get_param: nexus_repo }
406 __nexus_docker_repo__: { get_param: nexus_docker_repo }
407 __nexus_username__: { get_param: nexus_username }
408 __nexus_password__: { get_param: nexus_password }
409 __artifacts_version__: { get_param: artifacts_version }
410 __gerrit_branch__: { get_param: gerrit_branch }
414 # DNS/GW IP address configuration
415 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
418 # Download dependencies
419 add-apt-repository -y ppa:openjdk-r/ppa
421 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
423 # Download scripts from Nexus
424 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_vm_init.sh -o /opt/mr_vm_init.sh
425 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_serv.sh -o /opt/mr_serv.sh
426 chmod +x /opt/mr_vm_init.sh
427 chmod +x /opt/mr_serv.sh
428 mv /opt/mr_serv.sh /etc/init.d
429 update-rc.d mr_serv.sh defaults
431 # Download and install docker-engine and docker-compose
432 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
433 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
435 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
436 apt-get install -y docker-engine
440 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
441 chmod +x /opt/docker/docker-compose
443 # Store credentials in files
445 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
446 echo "__nexus_username__" > /opt/config/nexus_username.txt
447 echo "__nexus_password__" > /opt/config/nexus_password.txt
449 # Run docker-compose to spin up containers
451 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/dcae/demo/startup/message-router.git dcae-startup-vm-message-router
455 # RobotE2E instantiation
457 type: OS::Neutron::Port
459 network: { get_resource: oam_ecomp }
460 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.10.1}]
463 type: OS::Nova::Server
465 image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
466 flavor: 2 GB General Purpose v1
468 key_name: { get_resource: vm_key }
470 - network: { get_param: public_net_id }
471 - port: { get_resource: robot_private_port }
472 user_data_format: RAW
476 __nexus_repo__: { get_param: nexus_repo }
477 __nexus_docker_repo__: { get_param: nexus_docker_repo }
478 __nexus_username__: { get_param: nexus_username }
479 __nexus_password__: { get_param: nexus_password }
480 __network_name__: { get_attr: [oam_ecomp, name] }
481 __openstack_username__: { get_param: openstack_username }
482 __openstack_api_key__: { get_param : openstack_api_key }
483 __openstack_password__: { get_param: openstack_password }
484 __artifacts_version__: { get_param: artifacts_version }
485 __openstack_region__: { get_param: openstack_region }
486 __docker_version__: { get_param: docker_version }
487 __gerrit_branch__: { get_param: gerrit_branch }
491 # DNS/GW IP address configuration
492 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
495 # Download dependencies
496 add-apt-repository -y ppa:openjdk-r/ppa
498 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
499 echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic
501 # Download scripts from Nexus
502 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_vm_init.sh -o /opt/robot_vm_init.sh
503 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_serv.sh -o /opt/robot_serv.sh
504 chmod +x /opt/robot_vm_init.sh
505 chmod +x /opt/robot_serv.sh
506 mv /opt/robot_serv.sh /etc/init.d
507 update-rc.d robot_serv.sh defaults
509 # Download and install docker-engine and docker-compose
510 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
511 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
513 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
514 apt-get install -y docker-engine
518 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
519 chmod +x /opt/docker/docker-compose
521 # Store credentials in files
523 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
524 echo "__nexus_repo__" > /opt/config/nexus_repo.txt
525 echo "__nexus_username__" > /opt/config/nexus_username.txt
526 echo "__nexus_password__" > /opt/config/nexus_password.txt
527 echo "__network_name__" > /opt/config/network.txt
528 echo "__openstack_username__" > /opt/config/openstack_username.txt
529 echo "__openstack_password__" > /opt/config/openstack_password.txt
530 echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
531 echo "__openstack_region__" > /opt/config/region.txt
532 echo "__artifacts_version__" > /opt/config/artifacts_version.txt
533 echo "__docker_version__" > /opt/config/docker_version.txt
535 # Execute RobotETE-specific instructions: create share folder to run as a docker volume
536 mkdir -p /opt/eteshare/logs
537 mkdir -p /opt/eteshare/config
539 # Run docker-compose to spin up containers
541 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/testsuite/properties.git testsuite/properties
547 type: OS::Neutron::Port
549 network: { get_resource: oam_ecomp }
550 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.8.1}]
553 type: OS::Nova::Server
555 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
556 flavor: 2 GB General Purpose v1
558 key_name: { get_resource: vm_key }
560 - network: { get_param: public_net_id }
561 - port: { get_resource: vid_private_port }
562 user_data_format: RAW
566 __nexus_repo__: { get_param: nexus_repo }
567 __nexus_docker_repo__: { get_param: nexus_docker_repo }
568 __nexus_username__: { get_param: nexus_username }
569 __nexus_password__: { get_param: nexus_password }
570 __artifacts_version__: { get_param: artifacts_version }
571 __docker_version__: { get_param: docker_version }
572 __gerrit_branch__: { get_param: gerrit_branch }
576 # DNS/GW IP address configuration
577 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
580 # Download dependencies
581 add-apt-repository -y ppa:openjdk-r/ppa
583 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk make git ntp ntpdate
585 # Download scripts from Nexus
586 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_vm_init.sh -o /opt/vid_vm_init.sh
587 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_serv.sh -o /opt/vid_serv.sh
588 chmod +x /opt/vid_vm_init.sh
589 chmod +x /opt/vid_serv.sh
590 mv /opt/vid_serv.sh /etc/init.d
591 update-rc.d vid_serv.sh defaults
593 # Download and install docker-engine and docker-compose
594 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
595 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
597 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
598 apt-get install -y docker-engine
602 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
603 chmod +x /opt/docker/docker-compose
605 # Store credentials in files
607 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
608 echo "__nexus_username__" > /opt/config/nexus_username.txt
609 echo "__nexus_password__" > /opt/config/nexus_password.txt
610 echo "__docker_version__" > /opt/config/docker_version.txt
612 # Run script to spin up containers
614 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/vid.git
618 # SDN-C instantiation
620 type: OS::Neutron::Port
622 network: { get_resource: oam_ecomp }
623 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.7.1}]
626 type: OS::Nova::Server
628 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
629 flavor: 4 GB General Purpose v1
631 key_name: { get_resource: vm_key }
633 - network: { get_param: public_net_id }
634 - port: { get_resource: sdnc_private_port }
635 user_data_format: RAW
639 __nexus_repo__: { get_param: nexus_repo }
640 __nexus_docker_repo__: { get_param: nexus_docker_repo }
641 __nexus_username__: { get_param: nexus_username }
642 __nexus_password__: { get_param: nexus_password }
643 __artifacts_version__: { get_param: artifacts_version }
644 __docker_version__: { get_param: docker_version }
645 __gerrit_branch__: { get_param: gerrit_branch }
649 # DNS/GW IP address configuration
651 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
652 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
655 # Download dependencies
656 add-apt-repository -y ppa:openjdk-r/ppa
658 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
660 # Download scripts from Nexus
661 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_vm_init.sh -o /opt/sdnc_vm_init.sh
662 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_serv.sh -o /opt/sdnc_serv.sh
663 chmod +x /opt/sdnc_vm_init.sh
664 chmod +x /opt/sdnc_serv.sh
665 mv /opt/sdnc_serv.sh /etc/init.d
666 update-rc.d sdnc_serv.sh defaults
668 # Download and install docker-engine and docker-compose
669 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
670 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
672 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
673 apt-get install -y docker-engine
677 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
678 chmod +x /opt/docker/docker-compose
680 # Store credentials in files
682 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
683 echo "__nexus_username__" > /opt/config/nexus_username.txt
684 echo "__nexus_password__" > /opt/config/nexus_password.txt
685 echo "__docker_version__" > /opt/config/docker_version.txt
687 # Run docker-compose to spin up containers
689 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/sdnc/oam.git sdnc
695 type: OS::Neutron::Port
697 network: { get_resource: oam_ecomp }
698 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.3.1}]
701 type: OS::Cinder::Volume
706 image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
709 type: OS::Cinder::Volume
715 sdc_volume_attachment:
716 type: OS::Cinder::VolumeAttachment
718 volume_id: { get_resource: sdc_volume_data }
719 instance_uuid: { get_resource: sdc_vm }
720 mountpoint: /dev/xvdb
723 type: OS::Nova::Server
725 flavor: 15 GB Compute v1
727 key_name: { get_resource: vm_key }
728 block_device_mapping:
729 - volume_id: { get_resource: sdc_volume_local }
732 - network: { get_param: public_net_id }
733 - port: { get_resource: sdc_private_port }
734 user_data_format: RAW
738 __nexus_repo__: { get_param: nexus_repo }
739 __nexus_docker_repo__: { get_param: nexus_docker_repo }
740 __nexus_username__: { get_param: nexus_username }
741 __nexus_password__: { get_param: nexus_password }
742 __env_name__: { get_param: dmaap_topic }
743 __artifacts_version__: { get_param: artifacts_version }
744 __docker_version__: { get_param: docker_version }
745 __gerrit_branch__: { get_param: gerrit_branch }
749 # DNS/GW IP address configuration
751 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
752 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
755 # Download dependencies
756 add-apt-repository -y ppa:openjdk-r/ppa
758 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
760 # Download scripts from Nexus
761 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_vm_init.sh -o /opt/asdc_vm_init.sh
762 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_serv.sh -o /opt/asdc_serv.sh
763 chmod +x /opt/asdc_vm_init.sh
764 chmod +x /opt/asdc_serv.sh
765 mv /opt/asdc_serv.sh /etc/init.d
766 update-rc.d asdc_serv.sh defaults
768 # Download and install docker-engine and docker-compose
769 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
770 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
772 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
773 apt-get install -y docker-engine
776 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
777 chmod +x /opt/docker/docker-compose
779 # Create partition and mount the external volume
780 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_ext_volume_partitions.txt -o /opt/asdc_ext_volume_partitions.txt
781 sfdisk /dev/xvdb < /opt/asdc_ext_volume_partitions.txt
782 mkfs -t ext4 /dev/xvdb1
784 mount /dev/xvdb1 /data
785 echo "/dev/xvdb1 /data ext4 errors=remount-ro,noatime,barrier=0 0 1" >> /etc/fstab
787 # Store credentials in files
789 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
790 echo "__nexus_username__" > /opt/config/nexus_username.txt
791 echo "__nexus_password__" > /opt/config/nexus_password.txt
792 echo "__env_name__" > /opt/config/env_name.txt
793 echo "10.0.11.1" > /opt/config/mr_ip_addr.txt
794 echo "__docker_version__" > /opt/config/docker_version.txt
796 # Run SDC-specific instructions
798 mkdir -p /data/environments
799 mkdir -p /data/scripts
800 mkdir -p /data/logs/BE
801 mkdir -p /data/logs/FE
803 chmod 777 /data/logs/BE
804 chmod 777 /data/logs/FE
806 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/sdc.git
808 cat > /root/.bash_aliases << EOF
809 alias dcls='/data/scripts/docker_clean.sh \$1'
810 alias dlog='/data/scripts/docker_login.sh \$1'
811 alias rund='/data/scripts/docker_run.sh'
812 alias health='/data/scripts/docker_health.sh'
815 # Run docker-compose to spin up containers
819 # PORTAL instantiation
821 type: OS::Neutron::Port
823 network: { get_resource: oam_ecomp }
824 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.9.1}]
827 type: OS::Cinder::Volume
832 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
835 type: OS::Nova::Server
837 flavor: 15 GB Memory v1
839 key_name: { get_resource: vm_key }
840 block_device_mapping:
841 - volume_id: { get_resource: portal_volume }
844 - network: { get_param: public_net_id }
845 - port: { get_resource: portal_private_port }
846 user_data_format: RAW
850 __nexus_repo__: { get_param: nexus_repo }
851 __nexus_docker_repo__: { get_param: nexus_docker_repo }
852 __nexus_username__: { get_param: nexus_username }
853 __nexus_password__: { get_param: nexus_password }
854 __artifacts_version__: { get_param: artifacts_version }
855 __docker_version__: { get_param: docker_version }
856 __gerrit_branch__: { get_param: gerrit_branch }
860 # DNS/GW IP address configuration
862 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
863 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
866 # Download dependencies
867 add-apt-repository -y ppa:openjdk-r/ppa
869 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git unzip mysql-client-core-5.6 ntp ntpdate
871 # Download scripts from Nexus
872 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_vm_init.sh -o /opt/portal_vm_init.sh
873 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_serv.sh -o /opt/portal_serv.sh
874 chmod +x /opt/portal_vm_init.sh
875 chmod +x /opt/portal_serv.sh
876 mv /opt/portal_serv.sh /etc/init.d
877 update-rc.d portal_serv.sh defaults
879 # Download and install docker-engine and docker-compose
880 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
881 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
883 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
884 apt-get install -y docker-engine
887 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
888 chmod +x /opt/docker/docker-compose
890 # Store credentials in files
892 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
893 echo "__nexus_username__" > /opt/config/nexus_username.txt
894 echo "__nexus_password__" > /opt/config/nexus_password.txt
895 echo "__docker_version__" > /opt/config/docker_version.txt
897 # Run Portal-specific instructions
898 mkdir -p /PROJECT/OpenSource/UbuntuEP/logs
900 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/portal.git
902 # Run docker-compose to spin up containers
906 # DCAE Controller instantiation
908 type: OS::Neutron::Port
910 network: { get_resource: oam_ecomp }
911 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.4.1}]
913 type: OS::Nova::Server
915 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
916 flavor: 8 GB General Purpose v1
917 name: vm1-dcae-controller
918 key_name: { get_resource: vm_key }
920 - network: { get_param: public_net_id }
921 - port: { get_resource: dcae_c_private_port }
922 user_data_format: RAW
926 __nexus_repo__: { get_param: nexus_repo }
927 __nexus_docker_repo__: { get_param: nexus_docker_repo }
928 __nexus_username__: { get_param: nexus_username }
929 __nexus_password__: { get_param: nexus_password }
930 __nexus_url_snapshots__: { get_param: nexus_url_snapshot }
931 __gitlab_branch__: { get_param: gitlab_branch }
932 __dcae_zone__: { get_param: dcae_zone }
933 __dcae_state__: { get_param: dcae_state }
934 __artifacts_version__: { get_param: artifacts_version }
935 __tenant_id__: { get_param: openstack_tenant_id }
936 __openstack_private_network_name__: { get_attr: [oam_ecomp, name] }
937 __openstack_user__: { get_param: openstack_username }
938 __openstack_password__: { get_param: openstack_api_key }
939 __key_name__: { get_param: key_name }
940 __rand_str__: { get_resource: random-str }
941 __pub_key__: { get_param: pub_key }
942 __nexus_repo_root__: { get_param: nexus_repo_root }
943 __openstack_region__: { get_param: openstack_region }
944 __docker_version__: { get_param: docker_version }
945 __gerrit_branch__: { get_param: gerrit_branch }
949 # DNS/GW IP address configuration
950 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
953 # Download dependencies
954 add-apt-repository -y ppa:openjdk-r/ppa
956 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk make git ntp ntpdate
958 # Download scripts from Nexus
959 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_vm_init.sh -o /opt/dcae_vm_init.sh
960 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_serv.sh -o /opt/dcae_serv.sh
961 chmod +x /opt/dcae_vm_init.sh
962 chmod +x /opt/dcae_serv.sh
963 mv /opt/dcae_serv.sh /etc/init.d
964 update-rc.d dcae_serv.sh defaults
966 # Download and install docker-engine and docker-compose
967 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
968 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
970 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
971 apt-get install -y docker-engine
974 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
975 chmod +x /opt/docker/docker-compose
977 # DCAE Controller specific deployment
979 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/dcae/demo/startup/controller.git dcae-startup-vm-controller
981 cd dcae-startup-vm-controller
982 mkdir -p /opt/app/dcae-controller
983 cat > /opt/app/dcae-controller/config.yaml << EOF_CONFIG
985 STATE: __dcae_state__
986 DCAE-VERSION: __artifacts_version__
987 HORIZON-URL: https://mycloud.rackspace.com/cloud/__tenant_id__
988 KEYSTONE-URL: https://identity.api.rackspacecloud.com/v2.0
989 OPENSTACK-TENANT-ID: __tenant_id__
990 OPENSTACK-TENANT-NAME: OPEN-ECOMP
991 OPENSTACK-REGION: __openstack_region__
992 OPENSTACK-PRIVATE-NETWORK: __openstack_private_network_name__
993 OPENSTACK-USER: __openstack_user__
994 OPENSTACK-PASSWORD: __openstack_password__
995 OPENSTACK-KEYNAME: __key_name_____rand_str___dcae
996 OPENSTACK-PUBKEY: __pub_key__
998 NEXUS-URL-ROOT: __nexus_repo_root__
999 NEXUS-USER: __nexus_username__
1000 NEXUS-PASSWORD: __nexus_password__
1001 NEXUS-URL-SNAPSHOTS: __nexus_url_snapshots__
1002 NEXUS-RAWURL: __nexus_repo__
1004 DOCKER-REGISTRY: __nexus_docker_repo__
1006 GIT-MR-REPO: http://gerrit.onap.org/r/dcae/demo/startup/message-router.git
1009 # Store credentials in files
1010 mkdir -p /opt/config
1011 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1012 echo "__nexus_username__" > /opt/config/nexus_username.txt
1013 echo "__nexus_password__" > /opt/config/nexus_password.txt
1014 echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
1015 echo "__docker_version__" > /opt/config/docker_version.txt
1021 # Policy engine instantiation
1022 policy_private_port:
1023 type: OS::Neutron::Port
1025 network: { get_resource: oam_ecomp }
1026 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.6.1}]
1029 type: OS::Cinder::Volume
1034 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
1037 type: OS::Nova::Server
1039 flavor: 15 GB Compute v1
1041 key_name: { get_resource: vm_key }
1042 block_device_mapping:
1043 - volume_id: { get_resource: policy_volume }
1046 - network: { get_param: public_net_id }
1047 - port: { get_resource: policy_private_port }
1048 user_data_format: RAW
1052 __nexus_repo__: { get_param: nexus_repo }
1053 __nexus_docker_repo__: { get_param: nexus_docker_repo }
1054 __nexus_username__: { get_param: nexus_username }
1055 __nexus_password__: { get_param: nexus_password }
1056 __artifacts_version__: { get_param: artifacts_version }
1057 __docker_version__: { get_param: docker_version }
1058 __gerrit_branch__: { get_param: gerrit_branch }
1062 # DNS/GW IP address configuration
1064 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
1065 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
1068 # Download dependencies
1069 add-apt-repository -y ppa:openjdk-r/ppa
1071 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
1073 # Download scripts from Nexus
1074 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_vm_init.sh -o /opt/policy_vm_init.sh
1075 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_serv.sh -o /opt/policy_serv.sh
1076 chmod +x /opt/policy_vm_init.sh
1077 chmod +x /opt/policy_serv.sh
1078 mv /opt/policy_serv.sh /etc/init.d
1079 update-rc.d policy_serv.sh defaults
1081 # Download and install docker-engine and docker-compose
1082 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1083 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1085 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1086 apt-get install -y docker-engine
1087 service docker start
1089 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1090 chmod +x /opt/docker/docker-compose
1092 # Store credentials in files
1093 mkdir -p /opt/config
1094 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1095 echo "__nexus_username__" > /opt/config/nexus_username.txt
1096 echo "__nexus_password__" > /opt/config/nexus_password.txt
1097 echo "__docker_version__" > /opt/config/docker_version.txt
1099 # Run docker-compose to spin up containers
1101 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/policy/docker.git policy
1106 # APP-C instantiation
1108 type: OS::Neutron::Port
1110 network: { get_resource: oam_ecomp }
1111 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.2.1}]
1114 type: OS::Nova::Server
1116 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
1117 flavor: 4 GB General Purpose v1
1119 key_name: { get_resource: vm_key }
1121 - network: { get_param: public_net_id }
1122 - port: { get_resource: appc_private_port }
1123 user_data_format: RAW
1127 __nexus_repo__: { get_param: nexus_repo }
1128 __nexus_docker_repo__: { get_param: nexus_docker_repo }
1129 __nexus_username__: { get_param: nexus_username }
1130 __nexus_password__: { get_param: nexus_password }
1131 __dmaap_topic__: { get_param: dmaap_topic }
1132 __artifacts_version__: { get_param: artifacts_version }
1133 __docker_version__: { get_param: docker_version }
1134 __gerrit_branch__: { get_param: gerrit_branch }
1138 # DNS/GW IP address configuration
1140 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
1141 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
1144 # Download dependencies
1145 add-apt-repository -y ppa:openjdk-r/ppa
1147 apt-get install -y apt-transport-https ca-certificates wget openjdk-7-jdk git ntp ntpdate
1149 # Download scripts from Nexus
1150 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_vm_init.sh -o /opt/appc_vm_init.sh
1151 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_serv.sh -o /opt/appc_serv.sh
1152 chmod +x /opt/appc_vm_init.sh
1153 chmod +x /opt/appc_serv.sh
1154 mv /opt/appc_serv.sh /etc/init.d
1155 update-rc.d appc_serv.sh defaults
1157 # Download and install docker-engine and docker-compose
1158 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1159 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1161 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1162 apt-get install -y docker-engine
1163 service docker start
1166 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1167 chmod +x /opt/docker/docker-compose
1169 # Store credentials in files
1170 mkdir -p /opt/config
1171 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1172 echo "__nexus_username__" > /opt/config/nexus_username.txt
1173 echo "__nexus_password__" > /opt/config/nexus_password.txt
1174 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1175 echo "__docker_version__" > /opt/config/docker_version.txt
1177 # Run docker-compose to spin up containers
1179 git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/appc/deployment.git appc