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 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 __gitlab_username__: { get_param: gitlab_username }
328 __gitlab_password__: { get_param: gitlab_password }
329 __openstack_username__: { get_param: openstack_username }
330 __openstack_tenant_id__: { get_param: openstack_tenant_id }
331 __openstack_api_key__: { get_param: openstack_api_key }
332 __dmaap_topic__: { get_param: dmaap_topic }
333 __artifacts_version__: { get_param: artifacts_version }
334 __docker_version__: { get_param: docker_version }
335 __gerrit_branch__: { get_param: gerrit_branch }
339 # DNS/GW IP address configuration
340 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
343 # Download dependencies
344 add-apt-repository -y ppa:openjdk-r/ppa
346 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
348 # Download scripts from Nexus
349 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_vm_init.sh -o /opt/mso_vm_init.sh
350 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_serv.sh -o /opt/mso_serv.sh
351 chmod +x /opt/mso_vm_init.sh
352 chmod +x /opt/mso_serv.sh
353 mv /opt/mso_serv.sh /etc/init.d
354 update-rc.d mso_serv.sh defaults
356 # Download and install docker-engine and docker-compose
357 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
358 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
360 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
361 apt-get install -y docker-engine
365 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
366 chmod +x /opt/docker/docker-compose
368 # Store credentials in files
370 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
371 echo "__nexus_username__" > /opt/config/nexus_username.txt
372 echo "__nexus_password__" > /opt/config/nexus_password.txt
373 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
374 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
375 echo "__openstack_username__" > /opt/config/openstack_username.txt
376 echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
377 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
378 echo "__docker_version__" > /opt/config/docker_version.txt
380 # Run docker-compose to spin up containers
382 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.onap.org/r/a/mso/docker-config.git test_lab
383 MSO_ENCRYPTION_KEY=$(cat /opt/test_lab/encryption.key)
384 echo -n "__openstack_api_key__" | openssl aes-128-ecb -e -K $MSO_ENCRYPTION_KEY -nosalt | xxd -c 256 -p > /opt/config/api_key.txt
388 # Message Router instantiation
389 mrouter_private_port:
390 type: OS::Neutron::Port
392 network: { get_resource: oam_ecomp }
393 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.11.1}]
396 type: OS::Nova::Server
398 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
400 name: vm1-message-router
401 key_name: { get_resource: vm_key }
403 - network: { get_param: public_net_id }
404 - port: { get_resource: mrouter_private_port }
405 user_data_format: RAW
409 __nexus_repo__: { get_param: nexus_repo }
410 __nexus_docker_repo__: { get_param: nexus_docker_repo }
411 __nexus_username__: { get_param: nexus_username }
412 __nexus_password__: { get_param: nexus_password }
413 __gitlab_username__: { get_param: gitlab_username }
414 __gitlab_password__: { get_param: gitlab_password }
415 __artifacts_version__: { get_param: artifacts_version }
416 __gerrit_branch__: { get_param: gerrit_branch }
420 # DNS/GW IP address configuration
421 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
424 # Download dependencies
425 add-apt-repository -y ppa:openjdk-r/ppa
427 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
429 # Download scripts from Nexus
430 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_vm_init.sh -o /opt/mr_vm_init.sh
431 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_serv.sh -o /opt/mr_serv.sh
432 chmod +x /opt/mr_vm_init.sh
433 chmod +x /opt/mr_serv.sh
434 mv /opt/mr_serv.sh /etc/init.d
435 update-rc.d mr_serv.sh defaults
437 # Download and install docker-engine and docker-compose
438 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
439 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
441 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
442 apt-get install -y docker-engine
446 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
447 chmod +x /opt/docker/docker-compose
449 # Store credentials in files
451 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
452 echo "__nexus_username__" > /opt/config/nexus_username.txt
453 echo "__nexus_password__" > /opt/config/nexus_password.txt
454 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
455 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
457 # Run docker-compose to spin up containers
459 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.onap.org/r/a/dcae/demo/startup/message-router.git dcae-startup-vm-message-router
463 # RobotE2E instantiation
465 type: OS::Neutron::Port
467 network: { get_resource: oam_ecomp }
468 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.10.1}]
471 type: OS::Nova::Server
473 image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
474 flavor: 2 GB General Purpose v1
476 key_name: { get_resource: vm_key }
478 - network: { get_param: public_net_id }
479 - port: { get_resource: robot_private_port }
480 user_data_format: RAW
484 __nexus_repo__: { get_param: nexus_repo }
485 __nexus_docker_repo__: { get_param: nexus_docker_repo }
486 __nexus_username__: { get_param: nexus_username }
487 __nexus_password__: { get_param: nexus_password }
488 __gitlab_username__: { get_param: gitlab_username }
489 __gitlab_password__: { get_param: gitlab_password }
490 __network_name__: { get_attr: [oam_ecomp, name] }
491 __openstack_username__: { get_param: openstack_username }
492 __openstack_api_key__: { get_param : openstack_api_key }
493 __openstack_password__: { get_param: openstack_password }
494 __artifacts_version__: { get_param: artifacts_version }
495 __openstack_region__: { get_param: openstack_region }
496 __docker_version__: { get_param: docker_version }
497 __gerrit_branch__: { get_param: gerrit_branch }
501 # DNS/GW IP address configuration
502 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
505 # Download dependencies
506 add-apt-repository -y ppa:openjdk-r/ppa
508 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
509 echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic
511 # Download scripts from Nexus
512 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_vm_init.sh -o /opt/robot_vm_init.sh
513 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_serv.sh -o /opt/robot_serv.sh
514 chmod +x /opt/robot_vm_init.sh
515 chmod +x /opt/robot_serv.sh
516 mv /opt/robot_serv.sh /etc/init.d
517 update-rc.d robot_serv.sh defaults
519 # Download and install docker-engine and docker-compose
520 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
521 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
523 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
524 apt-get install -y docker-engine
528 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
529 chmod +x /opt/docker/docker-compose
531 # Store credentials in files
533 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
534 echo "__nexus_repo__" > /opt/config/nexus_repo.txt
535 echo "__nexus_username__" > /opt/config/nexus_username.txt
536 echo "__nexus_password__" > /opt/config/nexus_password.txt
537 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
538 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
539 echo "__network_name__" > /opt/config/network.txt
540 echo "__openstack_username__" > /opt/config/openstack_username.txt
541 echo "__openstack_password__" > /opt/config/openstack_password.txt
542 echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
543 echo "__openstack_region__" > /opt/config/region.txt
544 echo "__artifacts_version__" > /opt/config/artifacts_version.txt
545 echo "__docker_version__" > /opt/config/docker_version.txt
547 # Execute RobotETE-specific instructions: create share folder to run as a docker volume
548 mkdir -p /opt/eteshare/logs
549 mkdir -p /opt/eteshare/config
551 # Run docker-compose to spin up containers
553 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.onap.org/r/a/testsuite/properties.git testsuite/properties
559 type: OS::Neutron::Port
561 network: { get_resource: oam_ecomp }
562 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.8.1}]
565 type: OS::Nova::Server
567 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
568 flavor: 2 GB General Purpose v1
570 key_name: { get_resource: vm_key }
572 - network: { get_param: public_net_id }
573 - port: { get_resource: vid_private_port }
574 user_data_format: RAW
578 __nexus_repo__: { get_param: nexus_repo }
579 __nexus_docker_repo__: { get_param: nexus_docker_repo }
580 __nexus_username__: { get_param: nexus_username }
581 __nexus_password__: { get_param: nexus_password }
582 __gitlab_username__: { get_param: gitlab_username }
583 __gitlab_password__: { get_param: gitlab_password }
584 __artifacts_version__: { get_param: artifacts_version }
585 __docker_version__: { get_param: docker_version }
586 __gerrit_branch__: { get_param: gerrit_branch }
590 # DNS/GW IP address configuration
591 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
594 # Download dependencies
595 add-apt-repository -y ppa:openjdk-r/ppa
597 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk make git ntp ntpdate
599 # Download scripts from Nexus
600 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_vm_init.sh -o /opt/vid_vm_init.sh
601 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_serv.sh -o /opt/vid_serv.sh
602 chmod +x /opt/vid_vm_init.sh
603 chmod +x /opt/vid_serv.sh
604 mv /opt/vid_serv.sh /etc/init.d
605 update-rc.d vid_serv.sh defaults
607 # Download and install docker-engine and docker-compose
608 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
609 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
611 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
612 apt-get install -y docker-engine
616 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
617 chmod +x /opt/docker/docker-compose
619 # Store credentials in files
621 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
622 echo "__nexus_username__" > /opt/config/nexus_username.txt
623 echo "__nexus_password__" > /opt/config/nexus_password.txt
624 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
625 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
626 echo "__docker_version__" > /opt/config/docker_version.txt
628 # Run script to spin up containers
630 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.onap.org/r/a/vid.git
634 # SDN-C instantiation
636 type: OS::Neutron::Port
638 network: { get_resource: oam_ecomp }
639 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.7.1}]
642 type: OS::Nova::Server
644 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
645 flavor: 4 GB General Purpose v1
647 key_name: { get_resource: vm_key }
649 - network: { get_param: public_net_id }
650 - port: { get_resource: sdnc_private_port }
651 user_data_format: RAW
655 __nexus_repo__: { get_param: nexus_repo }
656 __nexus_docker_repo__: { get_param: nexus_docker_repo }
657 __nexus_username__: { get_param: nexus_username }
658 __nexus_password__: { get_param: nexus_password }
659 __gitlab_username__: { get_param: gitlab_username }
660 __gitlab_password__: { get_param: gitlab_password }
661 __artifacts_version__: { get_param: artifacts_version }
662 __docker_version__: { get_param: docker_version }
663 __gerrit_branch__: { get_param: gerrit_branch }
667 # DNS/GW IP address configuration
669 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
670 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
673 # Download dependencies
674 add-apt-repository -y ppa:openjdk-r/ppa
676 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
678 # Download scripts from Nexus
679 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_vm_init.sh -o /opt/sdnc_vm_init.sh
680 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_serv.sh -o /opt/sdnc_serv.sh
681 chmod +x /opt/sdnc_vm_init.sh
682 chmod +x /opt/sdnc_serv.sh
683 mv /opt/sdnc_serv.sh /etc/init.d
684 update-rc.d sdnc_serv.sh defaults
686 # Download and install docker-engine and docker-compose
687 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
688 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
690 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
691 apt-get install -y docker-engine
695 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
696 chmod +x /opt/docker/docker-compose
698 # Store credentials in files
700 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
701 echo "__nexus_username__" > /opt/config/nexus_username.txt
702 echo "__nexus_password__" > /opt/config/nexus_password.txt
703 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
704 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
705 echo "__docker_version__" > /opt/config/docker_version.txt
707 # Run docker-compose to spin up containers
709 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.onap.org/r/a/sdnc/oam.git sdnc
715 type: OS::Neutron::Port
717 network: { get_resource: oam_ecomp }
718 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.3.1}]
721 type: OS::Cinder::Volume
726 image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
729 type: OS::Cinder::Volume
735 sdc_volume_attachment:
736 type: OS::Cinder::VolumeAttachment
738 volume_id: { get_resource: sdc_volume_data }
739 instance_uuid: { get_resource: sdc_vm }
740 mountpoint: /dev/xvdb
743 type: OS::Nova::Server
745 flavor: 15 GB Compute v1
747 key_name: { get_resource: vm_key }
748 block_device_mapping:
749 - volume_id: { get_resource: sdc_volume_local }
752 - network: { get_param: public_net_id }
753 - port: { get_resource: sdc_private_port }
754 user_data_format: RAW
758 __nexus_repo__: { get_param: nexus_repo }
759 __nexus_docker_repo__: { get_param: nexus_docker_repo }
760 __nexus_username__: { get_param: nexus_username }
761 __nexus_password__: { get_param: nexus_password }
762 __gitlab_username__: { get_param: gitlab_username }
763 __gitlab_password__: { get_param: gitlab_password }
764 __env_name__: { get_param: dmaap_topic }
765 __artifacts_version__: { get_param: artifacts_version }
766 __docker_version__: { get_param: docker_version }
767 __gerrit_branch__: { get_param: gerrit_branch }
771 # DNS/GW IP address configuration
773 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
774 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
777 # Download dependencies
778 add-apt-repository -y ppa:openjdk-r/ppa
780 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
782 # Download scripts from Nexus
783 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_vm_init.sh -o /opt/asdc_vm_init.sh
784 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_serv.sh -o /opt/asdc_serv.sh
785 chmod +x /opt/asdc_vm_init.sh
786 chmod +x /opt/asdc_serv.sh
787 mv /opt/asdc_serv.sh /etc/init.d
788 update-rc.d asdc_serv.sh defaults
790 # Download and install docker-engine and docker-compose
791 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
792 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
794 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
795 apt-get install -y docker-engine
798 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
799 chmod +x /opt/docker/docker-compose
801 # Create partition and mount the external volume
802 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_ext_volume_partitions.txt -o /opt/asdc_ext_volume_partitions.txt
803 sfdisk /dev/xvdb < /opt/asdc_ext_volume_partitions.txt
804 mkfs -t ext4 /dev/xvdb1
806 mount /dev/xvdb1 /data
807 echo "/dev/xvdb1 /data ext4 errors=remount-ro,noatime,barrier=0 0 1" >> /etc/fstab
809 # Store credentials in files
811 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
812 echo "__nexus_username__" > /opt/config/nexus_username.txt
813 echo "__nexus_password__" > /opt/config/nexus_password.txt
814 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
815 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
816 echo "__env_name__" > /opt/config/env_name.txt
817 echo "10.0.11.1" > /opt/config/mr_ip_addr.txt
818 echo "__docker_version__" > /opt/config/docker_version.txt
820 # Run SDC-specific instructions
822 mkdir -p /data/environments
823 mkdir -p /data/scripts
824 mkdir -p /data/logs/BE
825 mkdir -p /data/logs/FE
827 chmod 777 /data/logs/BE
828 chmod 777 /data/logs/FE
830 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.onap.org/r/a/sdc.git
832 cat > /root/.bash_aliases << EOF
833 alias dcls='/data/scripts/docker_clean.sh \$1'
834 alias dlog='/data/scripts/docker_login.sh \$1'
835 alias rund='/data/scripts/docker_run.sh'
836 alias health='/data/scripts/docker_health.sh'
839 # Run docker-compose to spin up containers
843 # PORTAL instantiation
845 type: OS::Neutron::Port
847 network: { get_resource: oam_ecomp }
848 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.9.1}]
851 type: OS::Cinder::Volume
856 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
859 type: OS::Nova::Server
861 flavor: 15 GB Memory v1
863 key_name: { get_resource: vm_key }
864 block_device_mapping:
865 - volume_id: { get_resource: portal_volume }
868 - network: { get_param: public_net_id }
869 - port: { get_resource: portal_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 __gitlab_username__: { get_param: gitlab_username }
879 __gitlab_password__: { get_param: gitlab_password }
880 __artifacts_version__: { get_param: artifacts_version }
881 __docker_version__: { get_param: docker_version }
882 __gerrit_branch__: { get_param: gerrit_branch }
886 # DNS/GW IP address configuration
888 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
889 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
892 # Download dependencies
893 add-apt-repository -y ppa:openjdk-r/ppa
895 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk unzip mysql-client-core-5.6 ntp ntpdate
897 # Download scripts from Nexus
898 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_vm_init.sh -o /opt/portal_vm_init.sh
899 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_serv.sh -o /opt/portal_serv.sh
900 chmod +x /opt/portal_vm_init.sh
901 chmod +x /opt/portal_serv.sh
902 mv /opt/portal_serv.sh /etc/init.d
903 update-rc.d portal_serv.sh defaults
905 # Download and install docker-engine and docker-compose
906 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
907 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
909 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
910 apt-get install -y docker-engine
913 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
914 chmod +x /opt/docker/docker-compose
916 # Store credentials in files
918 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
919 echo "__nexus_username__" > /opt/config/nexus_username.txt
920 echo "__nexus_password__" > /opt/config/nexus_password.txt
921 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
922 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
923 echo "__docker_version__" > /opt/config/docker_version.txt
925 # Run Portal-specific instructions
926 mkdir -p /PROJECT/OpenSource/UbuntuEP/logs
928 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.onap.org/r/a/portal.git
930 # Run docker-compose to spin up containers
934 # DCAE Controller instantiation
936 type: OS::Neutron::Port
938 network: { get_resource: oam_ecomp }
939 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.4.1}]
941 type: OS::Nova::Server
943 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
944 flavor: 8 GB General Purpose v1
945 name: vm1-dcae-controller
946 key_name: { get_resource: vm_key }
948 - network: { get_param: public_net_id }
949 - port: { get_resource: dcae_c_private_port }
950 user_data_format: RAW
954 __nexus_repo__: { get_param: nexus_repo }
955 __nexus_docker_repo__: { get_param: nexus_docker_repo }
956 __nexus_username__: { get_param: nexus_username }
957 __nexus_password__: { get_param: nexus_password }
958 __nexus_url_snapshots__: { get_param: nexus_url_snapshot }
959 __gitlab_username__: { get_param: gitlab_username }
960 __gitlab_password__: { get_param: gitlab_password }
961 __gitlab_branch__: { get_param: gitlab_branch }
962 __dcae_zone__: { get_param: dcae_zone }
963 __dcae_state__: { get_param: dcae_state }
964 __artifacts_version__: { get_param: artifacts_version }
965 __tenant_id__: { get_param: openstack_tenant_id }
966 __openstack_private_network_name__: { get_attr: [oam_ecomp, name] }
967 __openstack_user__: { get_param: openstack_username }
968 __openstack_password__: { get_param: openstack_api_key }
969 __key_name__: { get_param: key_name }
970 __rand_str__: { get_resource: random-str }
971 __pub_key__: { get_param: pub_key }
972 __nexus_repo_root__: { get_param: nexus_repo_root }
973 __openstack_region__: { get_param: openstack_region }
974 __docker_version__: { get_param: docker_version }
975 __gerrit_branch__: { get_param: gerrit_branch }
979 # DNS/GW IP address configuration
980 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
983 # Download dependencies
984 add-apt-repository -y ppa:openjdk-r/ppa
986 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk make git ntp ntpdate
988 # Download scripts from Nexus
989 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_vm_init.sh -o /opt/dcae_vm_init.sh
990 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_serv.sh -o /opt/dcae_serv.sh
991 chmod +x /opt/dcae_vm_init.sh
992 chmod +x /opt/dcae_serv.sh
993 mv /opt/dcae_serv.sh /etc/init.d
994 update-rc.d dcae_serv.sh defaults
996 # Download and install docker-engine and docker-compose
997 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
998 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1000 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1001 apt-get install -y docker-engine
1002 service docker start
1004 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1005 chmod +x /opt/docker/docker-compose
1007 # DCAE Controller specific deployment
1009 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.onap.org/r/a/dcae/demo/startup/controller.git dcae-startup-vm-controller
1011 cd dcae-startup-vm-controller
1012 mkdir -p /opt/app/dcae-controller
1013 cat > /opt/app/dcae-controller/config.yaml << EOF_CONFIG
1015 STATE: __dcae_state__
1016 DCAE-VERSION: __artifacts_version__
1017 HORIZON-URL: https://mycloud.rackspace.com/cloud/__tenant_id__
1018 KEYSTONE-URL: https://identity.api.rackspacecloud.com/v2.0
1019 OPENSTACK-TENANT-ID: __tenant_id__
1020 OPENSTACK-TENANT-NAME: OPEN-ECOMP
1021 OPENSTACK-REGION: __openstack_region__
1022 OPENSTACK-PRIVATE-NETWORK: __openstack_private_network_name__
1023 OPENSTACK-USER: __openstack_user__
1024 OPENSTACK-PASSWORD: __openstack_password__
1025 OPENSTACK-KEYNAME: __key_name_____rand_str___dcae
1026 OPENSTACK-PUBKEY: __pub_key__
1028 NEXUS-URL-ROOT: __nexus_repo_root__
1029 NEXUS-USER: __nexus_username__
1030 NEXUS-PASSWORD: __nexus_password__
1031 NEXUS-URL-SNAPSHOTS: __nexus_url_snapshots__
1032 NEXUS-RAWURL: __nexus_repo__
1034 DOCKER-REGISTRY: __nexus_docker_repo__
1036 GIT-MR-REPO: https://__gitlab_username__:__gitlab_password__@gerrit.onap.org/r/a/dcae/demo/startup/message-router.git
1039 # Store credentials in files
1040 mkdir -p /opt/config
1041 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1042 echo "__nexus_username__" > /opt/config/nexus_username.txt
1043 echo "__nexus_password__" > /opt/config/nexus_password.txt
1044 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
1045 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
1046 echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
1047 echo "__docker_version__" > /opt/config/docker_version.txt
1053 # Policy engine instantiation
1054 policy_private_port:
1055 type: OS::Neutron::Port
1057 network: { get_resource: oam_ecomp }
1058 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.6.1}]
1061 type: OS::Cinder::Volume
1066 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
1069 type: OS::Nova::Server
1071 flavor: 15 GB Compute v1
1073 key_name: { get_resource: vm_key }
1074 block_device_mapping:
1075 - volume_id: { get_resource: policy_volume }
1078 - network: { get_param: public_net_id }
1079 - port: { get_resource: policy_private_port }
1080 user_data_format: RAW
1084 __nexus_repo__: { get_param: nexus_repo }
1085 __nexus_docker_repo__: { get_param: nexus_docker_repo }
1086 __nexus_username__: { get_param: nexus_username }
1087 __nexus_password__: { get_param: nexus_password }
1088 __gitlab_username__: { get_param: gitlab_username }
1089 __gitlab_password__: { get_param: gitlab_password }
1090 __artifacts_version__: { get_param: artifacts_version }
1091 __docker_version__: { get_param: docker_version }
1092 __gerrit_branch__: { get_param: gerrit_branch }
1096 # DNS/GW IP address configuration
1098 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
1099 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
1102 # Download dependencies
1103 add-apt-repository -y ppa:openjdk-r/ppa
1105 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
1107 # Download scripts from Nexus
1108 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_vm_init.sh -o /opt/policy_vm_init.sh
1109 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_serv.sh -o /opt/policy_serv.sh
1110 chmod +x /opt/policy_vm_init.sh
1111 chmod +x /opt/policy_serv.sh
1112 mv /opt/policy_serv.sh /etc/init.d
1113 update-rc.d policy_serv.sh defaults
1115 # Download and install docker-engine and docker-compose
1116 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1117 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1119 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1120 apt-get install -y docker-engine
1121 service docker start
1123 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1124 chmod +x /opt/docker/docker-compose
1126 # Store credentials in files
1127 mkdir -p /opt/config
1128 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1129 echo "__nexus_username__" > /opt/config/nexus_username.txt
1130 echo "__nexus_password__" > /opt/config/nexus_password.txt
1131 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
1132 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
1133 echo "__docker_version__" > /opt/config/docker_version.txt
1135 # Run docker-compose to spin up containers
1137 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.onap.org/r/a/policy/docker.git policy
1142 # APP-C instantiation
1144 type: OS::Neutron::Port
1146 network: { get_resource: oam_ecomp }
1147 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.2.1}]
1150 type: OS::Nova::Server
1152 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
1153 flavor: 4 GB General Purpose v1
1155 key_name: { get_resource: vm_key }
1157 - network: { get_param: public_net_id }
1158 - port: { get_resource: appc_private_port }
1159 user_data_format: RAW
1163 __nexus_repo__: { get_param: nexus_repo }
1164 __nexus_docker_repo__: { get_param: nexus_docker_repo }
1165 __nexus_username__: { get_param: nexus_username }
1166 __nexus_password__: { get_param: nexus_password }
1167 __gitlab_username__: { get_param: gitlab_username }
1168 __gitlab_password__: { get_param: gitlab_password }
1169 __dmaap_topic__: { get_param: dmaap_topic }
1170 __artifacts_version__: { get_param: artifacts_version }
1171 __docker_version__: { get_param: docker_version }
1172 __gerrit_branch__: { get_param: gerrit_branch }
1176 # DNS/GW IP address configuration
1178 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
1179 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
1182 # Download dependencies
1183 add-apt-repository -y ppa:openjdk-r/ppa
1185 apt-get install -y apt-transport-https ca-certificates wget openjdk-7-jdk ntp ntpdate
1187 # Download scripts from Nexus
1188 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_vm_init.sh -o /opt/appc_vm_init.sh
1189 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_serv.sh -o /opt/appc_serv.sh
1190 chmod +x /opt/appc_vm_init.sh
1191 chmod +x /opt/appc_serv.sh
1192 mv /opt/appc_serv.sh /etc/init.d
1193 update-rc.d appc_serv.sh defaults
1195 # Download and install docker-engine and docker-compose
1196 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1197 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1199 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1200 apt-get install -y docker-engine
1201 service docker start
1204 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1205 chmod +x /opt/docker/docker-compose
1207 # Store credentials in files
1208 mkdir -p /opt/config
1209 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1210 echo "__nexus_username__" > /opt/config/nexus_username.txt
1211 echo "__nexus_password__" > /opt/config/nexus_password.txt
1212 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
1213 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
1214 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1215 echo "__docker_version__" > /opt/config/docker_version.txt
1217 # Run docker-compose to spin up containers
1219 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.onap.org/r/a/appc/deployment.git appc