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 }
165 #value: { get_attr: [oam_ecomp, name] }
168 # DNS Server instantiation
170 type: OS::Neutron::Port
172 network: { get_resource: oam_ecomp }
173 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.0.1}]
176 type: OS::Nova::Server
178 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
179 flavor: 4 GB General Purpose v1
181 key_name: { get_resource: vm_key }
183 - network: { get_param: public_net_id }
184 - port: { get_resource: dns_private_port }
185 user_data_format: RAW
189 __nexus_repo__: { get_param: nexus_repo }
190 __artifacts_version__: { get_param: artifacts_version }
194 # Download dependencies
195 add-apt-repository -y ppa:openjdk-r/ppa
197 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk bind9 bind9utils bind9-doc ntp ntpdate
200 mkdir /etc/bind/zones
202 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/db_simpledemo_openecomp_org -o /etc/bind/zones/db.simpledemo.openecomp.org
203 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/named.conf.options -o /etc/bind/named.conf.options
204 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/named.conf.local -o /etc/bind/named.conf.local
208 sed -i "s/OPTIONS=.*/OPTIONS=\"-4 -u bind\"/g" /etc/default/bind9
209 service bind9 restart
214 type: OS::Neutron::Port
216 network: { get_resource: oam_ecomp }
217 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.1.1}]
220 type: OS::Cinder::Volume
225 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
228 type: OS::Nova::Server
231 flavor: 15 GB Compute v1
233 key_name: { get_resource: vm_key }
234 block_device_mapping:
235 - volume_id: { get_resource: aai_volume }
238 - network: { get_param: public_net_id }
239 - port: { get_resource: aai_private_port }
240 user_data_format: RAW
244 __nexus_repo__: { get_param: nexus_repo }
245 __nexus_docker_repo__: { get_param: nexus_docker_repo }
246 __nexus_username__: { get_param: nexus_username }
247 __nexus_password__: { get_param: nexus_password }
248 __gitlab_username__: { get_param: gitlab_username }
249 __gitlab_password__: { get_param: gitlab_password }
250 __dmaap_topic__: { get_param: dmaap_topic }
251 __artifacts_version__: { get_param: artifacts_version }
252 __docker_version__: { get_param: docker_version }
256 # DNS/GW IP address configuration
257 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
260 # Download dependencies
261 add-apt-repository -y ppa:openjdk-r/ppa
263 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
265 # Download scripts from Nexus
266 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/aai_vm_init.sh -o /opt/aai_vm_init.sh
267 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/aai_serv.sh -o /opt/aai_serv.sh
268 chmod +x /opt/aai_vm_init.sh
269 chmod +x /opt/aai_serv.sh
270 mv /opt/aai_serv.sh /etc/init.d
271 update-rc.d aai_serv.sh defaults
273 # Download and install docker-engine and docker-compose
274 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
275 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
277 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
278 apt-get install -y docker-engine
281 mkdir -p /opt/openecomp/aai/logs
282 mkdir -p /opt/openecomp/aai/data
284 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
285 chmod +x /opt/docker/docker-compose
287 # Store credentials in files
289 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
290 echo "__nexus_username__" > /opt/config/nexus_username.txt
291 echo "__nexus_password__" > /opt/config/nexus_password.txt
292 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
293 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
294 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
295 echo "gerrit.openecomp.org" > /opt/config/gitlab_certname.txt
296 echo "__docker_version__" > /opt/config/docker_version.txt
298 # Execute docker instructions
305 type: OS::Neutron::Port
307 network: { get_resource: oam_ecomp }
308 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.5.1}]
311 type: OS::Nova::Server
313 image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
314 flavor: 4 GB General Purpose v1
316 key_name: { get_resource: vm_key }
318 - network: { get_param: public_net_id }
319 - port: { get_resource: mso_private_port }
320 user_data_format: RAW
324 __nexus_repo__: { get_param: nexus_repo }
325 __nexus_docker_repo__: { get_param: nexus_docker_repo }
326 __nexus_username__: { get_param: nexus_username }
327 __nexus_password__: { get_param: nexus_password }
328 __gitlab_username__: { get_param: gitlab_username }
329 __gitlab_password__: { get_param: gitlab_password }
330 __openstack_username__: { get_param: openstack_username }
331 __openstack_tenant_id__: { get_param: openstack_tenant_id }
332 __openstack_api_key__: { get_param: openstack_api_key }
333 __dmaap_topic__: { get_param: dmaap_topic }
334 __artifacts_version__: { get_param: artifacts_version }
335 __docker_version__: { get_param: docker_version }
336 __gerrit_branch__: { get_param: gerrit_branch }
340 # DNS/GW IP address configuration
341 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
344 # Download dependencies
345 add-apt-repository -y ppa:openjdk-r/ppa
347 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
349 # Download scripts from Nexus
350 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_vm_init.sh -o /opt/mso_vm_init.sh
351 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_serv.sh -o /opt/mso_serv.sh
352 chmod +x /opt/mso_vm_init.sh
353 chmod +x /opt/mso_serv.sh
354 mv /opt/mso_serv.sh /etc/init.d
355 update-rc.d mso_serv.sh defaults
357 # Download and install docker-engine and docker-compose
358 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
359 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
361 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
362 apt-get install -y docker-engine
366 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
367 chmod +x /opt/docker/docker-compose
369 # Store credentials in files
371 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
372 echo "__nexus_username__" > /opt/config/nexus_username.txt
373 echo "__nexus_password__" > /opt/config/nexus_password.txt
374 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
375 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
376 echo "__openstack_username__" > /opt/config/openstack_username.txt
377 echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
378 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
379 echo "__docker_version__" > /opt/config/docker_version.txt
381 # Run docker-compose to spin up containers
383 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/mso/docker-config.git test_lab
384 MSO_ENCRYPTION_KEY=$(cat /opt/test_lab/encryption.key)
385 echo -n "__openstack_api_key__" | openssl aes-128-ecb -e -K $MSO_ENCRYPTION_KEY -nosalt | xxd -c 256 -p > /opt/config/api_key.txt
389 # Message Router instantiation
390 mrouter_private_port:
391 type: OS::Neutron::Port
393 network: { get_resource: oam_ecomp }
394 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.11.1}]
397 type: OS::Nova::Server
399 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
401 name: vm1-message-router
402 key_name: { get_resource: vm_key }
404 - network: { get_param: public_net_id }
405 - port: { get_resource: mrouter_private_port }
406 user_data_format: RAW
410 __nexus_repo__: { get_param: nexus_repo }
411 __nexus_docker_repo__: { get_param: nexus_docker_repo }
412 __nexus_username__: { get_param: nexus_username }
413 __nexus_password__: { get_param: nexus_password }
414 __gitlab_username__: { get_param: gitlab_username }
415 __gitlab_password__: { get_param: gitlab_password }
416 __artifacts_version__: { get_param: artifacts_version }
417 __gerrit_branch__: { get_param: gerrit_branch }
421 # DNS/GW IP address configuration
422 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
425 # Download dependencies
426 add-apt-repository -y ppa:openjdk-r/ppa
428 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
430 # Download scripts from Nexus
431 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_vm_init.sh -o /opt/mr_vm_init.sh
432 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_serv.sh -o /opt/mr_serv.sh
433 chmod +x /opt/mr_vm_init.sh
434 chmod +x /opt/mr_serv.sh
435 mv /opt/mr_serv.sh /etc/init.d
436 update-rc.d mr_serv.sh defaults
438 # Download and install docker-engine and docker-compose
439 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
440 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
442 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
443 apt-get install -y docker-engine
447 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
448 chmod +x /opt/docker/docker-compose
450 # Store credentials in files
452 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
453 echo "__nexus_username__" > /opt/config/nexus_username.txt
454 echo "__nexus_password__" > /opt/config/nexus_password.txt
455 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
456 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
458 # Run docker-compose to spin up containers
460 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/dcae/demo/startup/message-router.git dcae-startup-vm-message-router
464 # RobotE2E instantiation
466 type: OS::Neutron::Port
468 network: { get_resource: oam_ecomp }
469 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.10.1}]
472 type: OS::Nova::Server
474 image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
475 flavor: 2 GB General Purpose v1
477 key_name: { get_resource: vm_key }
479 - network: { get_param: public_net_id }
480 - port: { get_resource: robot_private_port }
481 user_data_format: RAW
485 __nexus_repo__: { get_param: nexus_repo }
486 __nexus_docker_repo__: { get_param: nexus_docker_repo }
487 __nexus_username__: { get_param: nexus_username }
488 __nexus_password__: { get_param: nexus_password }
489 __gitlab_username__: { get_param: gitlab_username }
490 __gitlab_password__: { get_param: gitlab_password }
491 __network_name__: { get_attr: [oam_ecomp, name] }
492 __openstack_username__: { get_param: openstack_username }
493 __openstack_api_key__: { get_param : openstack_api_key }
494 __openstack_password__: { get_param: openstack_password }
495 __artifacts_version__: { get_param: artifacts_version }
496 __openstack_region__: { get_param: openstack_region }
497 __docker_version__: { get_param: docker_version }
498 __gerrit_branch__: { get_param: gerrit_branch }
502 # DNS/GW IP address configuration
503 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
506 # Download dependencies
507 add-apt-repository -y ppa:openjdk-r/ppa
509 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
510 echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic
512 # Download scripts from Nexus
513 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_vm_init.sh -o /opt/robot_vm_init.sh
514 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_serv.sh -o /opt/robot_serv.sh
515 chmod +x /opt/robot_vm_init.sh
516 chmod +x /opt/robot_serv.sh
517 mv /opt/robot_serv.sh /etc/init.d
518 update-rc.d robot_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_repo__" > /opt/config/nexus_repo.txt
536 echo "__nexus_username__" > /opt/config/nexus_username.txt
537 echo "__nexus_password__" > /opt/config/nexus_password.txt
538 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
539 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
540 echo "__network_name__" > /opt/config/network.txt
541 echo "__openstack_username__" > /opt/config/openstack_username.txt
542 echo "__openstack_password__" > /opt/config/openstack_password.txt
543 echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
544 echo "__openstack_region__" > /opt/config/region.txt
545 echo "__artifacts_version__" > /opt/config/artifacts_version.txt
546 echo "__docker_version__" > /opt/config/docker_version.txt
548 # Execute RobotETE-specific instructions: create share folder to run as a docker volume
549 mkdir -p /opt/eteshare/logs
550 mkdir -p /opt/eteshare/config
552 # Run docker-compose to spin up containers
554 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/testsuite/properties.git testsuite/properties
560 type: OS::Neutron::Port
562 network: { get_resource: oam_ecomp }
563 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.8.1}]
566 type: OS::Nova::Server
568 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
569 flavor: 2 GB General Purpose v1
571 key_name: { get_resource: vm_key }
573 - network: { get_param: public_net_id }
574 - port: { get_resource: vid_private_port }
575 user_data_format: RAW
579 __nexus_repo__: { get_param: nexus_repo }
580 __nexus_docker_repo__: { get_param: nexus_docker_repo }
581 __nexus_username__: { get_param: nexus_username }
582 __nexus_password__: { get_param: nexus_password }
583 __gitlab_username__: { get_param: gitlab_username }
584 __gitlab_password__: { get_param: gitlab_password }
585 __artifacts_version__: { get_param: artifacts_version }
586 __docker_version__: { get_param: docker_version }
587 __gerrit_branch__: { get_param: gerrit_branch }
591 # DNS/GW IP address configuration
592 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
595 # Download dependencies
596 add-apt-repository -y ppa:openjdk-r/ppa
598 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk make git ntp ntpdate
600 # Download scripts from Nexus
601 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_vm_init.sh -o /opt/vid_vm_init.sh
602 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_serv.sh -o /opt/vid_serv.sh
603 chmod +x /opt/vid_vm_init.sh
604 chmod +x /opt/vid_serv.sh
605 mv /opt/vid_serv.sh /etc/init.d
606 update-rc.d vid_serv.sh defaults
608 # Download and install docker-engine and docker-compose
609 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
610 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
612 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
613 apt-get install -y docker-engine
617 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
618 chmod +x /opt/docker/docker-compose
620 # Store credentials in files
622 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
623 echo "__nexus_username__" > /opt/config/nexus_username.txt
624 echo "__nexus_password__" > /opt/config/nexus_password.txt
625 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
626 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
627 echo "__docker_version__" > /opt/config/docker_version.txt
629 # Run script to spin up containers
631 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/vid.git
635 # SDN-C instantiation
637 type: OS::Neutron::Port
639 network: { get_resource: oam_ecomp }
640 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.7.1}]
643 type: OS::Nova::Server
645 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
646 flavor: 4 GB General Purpose v1
648 key_name: { get_resource: vm_key }
650 - network: { get_param: public_net_id }
651 - port: { get_resource: sdnc_private_port }
652 user_data_format: RAW
656 __nexus_repo__: { get_param: nexus_repo }
657 __nexus_docker_repo__: { get_param: nexus_docker_repo }
658 __nexus_username__: { get_param: nexus_username }
659 __nexus_password__: { get_param: nexus_password }
660 __gitlab_username__: { get_param: gitlab_username }
661 __gitlab_password__: { get_param: gitlab_password }
662 __artifacts_version__: { get_param: artifacts_version }
663 __docker_version__: { get_param: docker_version }
664 __gerrit_branch__: { get_param: gerrit_branch }
668 # DNS/GW IP address configuration
670 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
671 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
674 # Download dependencies
675 add-apt-repository -y ppa:openjdk-r/ppa
677 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
679 # Download scripts from Nexus
680 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_vm_init.sh -o /opt/sdnc_vm_init.sh
681 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_serv.sh -o /opt/sdnc_serv.sh
682 chmod +x /opt/sdnc_vm_init.sh
683 chmod +x /opt/sdnc_serv.sh
684 mv /opt/sdnc_serv.sh /etc/init.d
685 update-rc.d sdnc_serv.sh defaults
687 # Download and install docker-engine and docker-compose
688 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
689 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
691 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
692 apt-get install -y docker-engine
696 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
697 chmod +x /opt/docker/docker-compose
699 # Store credentials in files
701 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
702 echo "__nexus_username__" > /opt/config/nexus_username.txt
703 echo "__nexus_password__" > /opt/config/nexus_password.txt
704 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
705 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
706 echo "__docker_version__" > /opt/config/docker_version.txt
708 # Run docker-compose to spin up containers
710 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/sdnc/oam.git sdnc
716 type: OS::Neutron::Port
718 network: { get_resource: oam_ecomp }
719 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.3.1}]
722 type: OS::Cinder::Volume
727 image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
730 type: OS::Cinder::Volume
736 sdc_volume_attachment:
737 type: OS::Cinder::VolumeAttachment
739 volume_id: { get_resource: sdc_volume_data }
740 instance_uuid: { get_resource: sdc_vm }
741 mountpoint: /dev/xvdb
744 type: OS::Nova::Server
746 flavor: 15 GB Compute v1
748 key_name: { get_resource: vm_key }
749 block_device_mapping:
750 - volume_id: { get_resource: sdc_volume_local }
753 - network: { get_param: public_net_id }
754 - port: { get_resource: sdc_private_port }
755 user_data_format: RAW
759 __nexus_repo__: { get_param: nexus_repo }
760 __nexus_docker_repo__: { get_param: nexus_docker_repo }
761 __nexus_username__: { get_param: nexus_username }
762 __nexus_password__: { get_param: nexus_password }
763 __gitlab_username__: { get_param: gitlab_username }
764 __gitlab_password__: { get_param: gitlab_password }
765 __env_name__: { get_param: dmaap_topic }
766 __artifacts_version__: { get_param: artifacts_version }
767 __docker_version__: { get_param: docker_version }
768 __gerrit_branch__: { get_param: gerrit_branch }
772 # DNS/GW IP address configuration
774 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
775 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
778 # Download dependencies
779 add-apt-repository -y ppa:openjdk-r/ppa
781 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
783 # Download scripts from Nexus
784 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_vm_init.sh -o /opt/asdc_vm_init.sh
785 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_serv.sh -o /opt/asdc_serv.sh
786 chmod +x /opt/asdc_vm_init.sh
787 chmod +x /opt/asdc_serv.sh
788 mv /opt/asdc_serv.sh /etc/init.d
789 update-rc.d asdc_serv.sh defaults
791 # Download and install docker-engine and docker-compose
792 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
793 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
795 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
796 apt-get install -y docker-engine
799 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
800 chmod +x /opt/docker/docker-compose
802 # Create partition and mount the external volume
803 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_ext_volume_partitions.txt -o /opt/asdc_ext_volume_partitions.txt
804 sfdisk /dev/xvdb < /opt/asdc_ext_volume_partitions.txt
805 mkfs -t ext4 /dev/xvdb1
807 mount /dev/xvdb1 /data
808 echo "/dev/xvdb1 /data ext4 errors=remount-ro,noatime,barrier=0 0 1" >> /etc/fstab
810 # Store credentials in files
812 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
813 echo "__nexus_username__" > /opt/config/nexus_username.txt
814 echo "__nexus_password__" > /opt/config/nexus_password.txt
815 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
816 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
817 echo "__env_name__" > /opt/config/env_name.txt
818 echo "10.0.11.1" > /opt/config/mr_ip_addr.txt
819 echo "__docker_version__" > /opt/config/docker_version.txt
821 # Run SDC-specific instructions
823 mkdir -p /data/environments
824 mkdir -p /data/scripts
825 mkdir -p /data/logs/BE
826 mkdir -p /data/logs/FE
828 chmod 777 /data/logs/BE
829 chmod 777 /data/logs/FE
831 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/sdc.git
833 cat > /root/.bash_aliases << EOF
834 alias dcls='/data/scripts/docker_clean.sh \$1'
835 alias dlog='/data/scripts/docker_login.sh \$1'
836 alias rund='/data/scripts/docker_run.sh'
837 alias health='/data/scripts/docker_health.sh'
840 # Run docker-compose to spin up containers
844 # PORTAL instantiation
846 type: OS::Neutron::Port
848 network: { get_resource: oam_ecomp }
849 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.9.1}]
852 type: OS::Cinder::Volume
857 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
860 type: OS::Nova::Server
862 flavor: 15 GB Memory v1
864 key_name: { get_resource: vm_key }
865 block_device_mapping:
866 - volume_id: { get_resource: portal_volume }
869 - network: { get_param: public_net_id }
870 - port: { get_resource: portal_private_port }
871 user_data_format: RAW
875 __nexus_repo__: { get_param: nexus_repo }
876 __nexus_docker_repo__: { get_param: nexus_docker_repo }
877 __nexus_username__: { get_param: nexus_username }
878 __nexus_password__: { get_param: nexus_password }
879 __gitlab_username__: { get_param: gitlab_username }
880 __gitlab_password__: { get_param: gitlab_password }
881 __artifacts_version__: { get_param: artifacts_version }
882 __docker_version__: { get_param: docker_version }
883 __gerrit_branch__: { get_param: gerrit_branch }
887 # DNS/GW IP address configuration
889 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
890 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
893 # Download dependencies
894 add-apt-repository -y ppa:openjdk-r/ppa
896 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk unzip mysql-client-core-5.6 ntp ntpdate
898 # Download scripts from Nexus
899 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_vm_init.sh -o /opt/portal_vm_init.sh
900 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_serv.sh -o /opt/portal_serv.sh
901 chmod +x /opt/portal_vm_init.sh
902 chmod +x /opt/portal_serv.sh
903 mv /opt/portal_serv.sh /etc/init.d
904 update-rc.d portal_serv.sh defaults
906 # Download and install docker-engine and docker-compose
907 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
908 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
910 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
911 apt-get install -y docker-engine
914 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
915 chmod +x /opt/docker/docker-compose
917 # Store credentials in files
919 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
920 echo "__nexus_username__" > /opt/config/nexus_username.txt
921 echo "__nexus_password__" > /opt/config/nexus_password.txt
922 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
923 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
924 echo "__docker_version__" > /opt/config/docker_version.txt
926 # Run Portal-specific instructions
927 mkdir -p /PROJECT/OpenSource/UbuntuEP/logs
929 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/portal.git
931 # Run docker-compose to spin up containers
935 # DCAE Controller instantiation
937 type: OS::Neutron::Port
939 network: { get_resource: oam_ecomp }
940 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.4.1}]
942 type: OS::Nova::Server
944 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
945 flavor: 8 GB General Purpose v1
946 name: vm1-dcae-controller
947 key_name: { get_resource: vm_key }
949 - network: { get_param: public_net_id }
950 - port: { get_resource: dcae_c_private_port }
951 user_data_format: RAW
955 __nexus_repo__: { get_param: nexus_repo }
956 __nexus_docker_repo__: { get_param: nexus_docker_repo }
957 __nexus_username__: { get_param: nexus_username }
958 __nexus_password__: { get_param: nexus_password }
959 __nexus_url_snapshots__: { get_param: nexus_url_snapshot }
960 __gitlab_username__: { get_param: gitlab_username }
961 __gitlab_password__: { get_param: gitlab_password }
962 __gitlab_branch__: { get_param: gitlab_branch }
963 __dcae_zone__: { get_param: dcae_zone }
964 __dcae_state__: { get_param: dcae_state }
965 __artifacts_version__: { get_param: artifacts_version }
966 __tenant_id__: { get_param: openstack_tenant_id }
967 __openstack_private_network_name__: { get_attr: [oam_ecomp, name] }
968 __openstack_user__: { get_param: openstack_username }
969 __openstack_password__: { get_param: openstack_api_key }
970 __key_name__: { get_param: key_name }
971 __rand_str__: { get_resource: random-str }
972 __pub_key__: { get_param: pub_key }
973 __nexus_repo_root__: { get_param: nexus_repo_root }
974 __openstack_region__: { get_param: openstack_region }
975 __docker_version__: { get_param: docker_version }
976 __gerrit_branch__: { get_param: gerrit_branch }
980 # DNS/GW IP address configuration
981 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
984 # Download dependencies
985 add-apt-repository -y ppa:openjdk-r/ppa
987 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk make git ntp ntpdate
989 # Download scripts from Nexus
990 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_vm_init.sh -o /opt/dcae_vm_init.sh
991 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_serv.sh -o /opt/dcae_serv.sh
992 chmod +x /opt/dcae_vm_init.sh
993 chmod +x /opt/dcae_serv.sh
994 mv /opt/dcae_serv.sh /etc/init.d
995 update-rc.d dcae_serv.sh defaults
997 # Download and install docker-engine and docker-compose
998 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
999 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1001 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1002 apt-get install -y docker-engine
1003 service docker start
1005 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1006 chmod +x /opt/docker/docker-compose
1008 # DCAE Controller specific deployment
1010 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/dcae/demo/startup/controller.git dcae-startup-vm-controller
1012 cd dcae-startup-vm-controller
1013 mkdir -p /opt/app/dcae-controller
1014 cat > /opt/app/dcae-controller/config.yaml << EOF_CONFIG
1016 STATE: __dcae_state__
1017 DCAE-VERSION: __artifacts_version__
1018 HORIZON-URL: https://mycloud.rackspace.com/cloud/__tenant_id__
1019 KEYSTONE-URL: https://identity.api.rackspacecloud.com/v2.0
1020 OPENSTACK-TENANT-ID: __tenant_id__
1021 OPENSTACK-TENANT-NAME: OPEN-ECOMP
1022 OPENSTACK-REGION: __openstack_region__
1023 OPENSTACK-PRIVATE-NETWORK: __openstack_private_network_name__
1024 OPENSTACK-USER: __openstack_user__
1025 OPENSTACK-PASSWORD: __openstack_password__
1026 OPENSTACK-KEYNAME: __key_name_____rand_str___dcae
1027 OPENSTACK-PUBKEY: __pub_key__
1029 NEXUS-URL-ROOT: __nexus_repo_root__
1030 NEXUS-USER: __nexus_username__
1031 NEXUS-PASSWORD: __nexus_password__
1032 NEXUS-URL-SNAPSHOTS: __nexus_url_snapshots__
1033 NEXUS-RAWURL: __nexus_repo__
1035 DOCKER-REGISTRY: __nexus_docker_repo__
1037 GIT-MR-REPO: https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/dcae/demo/startup/message-router.git
1040 # Store credentials in files
1041 mkdir -p /opt/config
1042 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1043 echo "__nexus_username__" > /opt/config/nexus_username.txt
1044 echo "__nexus_password__" > /opt/config/nexus_password.txt
1045 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
1046 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
1047 echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
1048 echo "__docker_version__" > /opt/config/docker_version.txt
1054 # Policy engine instantiation
1055 policy_private_port:
1056 type: OS::Neutron::Port
1058 network: { get_resource: oam_ecomp }
1059 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.6.1}]
1062 type: OS::Cinder::Volume
1067 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
1070 type: OS::Nova::Server
1072 flavor: 15 GB Compute v1
1074 key_name: { get_resource: vm_key }
1075 block_device_mapping:
1076 - volume_id: { get_resource: policy_volume }
1079 - network: { get_param: public_net_id }
1080 - port: { get_resource: policy_private_port }
1081 user_data_format: RAW
1085 __nexus_repo__: { get_param: nexus_repo }
1086 __nexus_docker_repo__: { get_param: nexus_docker_repo }
1087 __nexus_username__: { get_param: nexus_username }
1088 __nexus_password__: { get_param: nexus_password }
1089 __gitlab_username__: { get_param: gitlab_username }
1090 __gitlab_password__: { get_param: gitlab_password }
1091 __artifacts_version__: { get_param: artifacts_version }
1092 __docker_version__: { get_param: docker_version }
1093 __gerrit_branch__: { get_param: gerrit_branch }
1097 # DNS/GW IP address configuration
1099 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
1100 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
1103 # Download dependencies
1104 add-apt-repository -y ppa:openjdk-r/ppa
1106 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
1108 # Download scripts from Nexus
1109 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_vm_init.sh -o /opt/policy_vm_init.sh
1110 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_serv.sh -o /opt/policy_serv.sh
1111 chmod +x /opt/policy_vm_init.sh
1112 chmod +x /opt/policy_serv.sh
1113 mv /opt/policy_serv.sh /etc/init.d
1114 update-rc.d policy_serv.sh defaults
1116 # Download and install docker-engine and docker-compose
1117 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1118 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1120 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1121 apt-get install -y docker-engine
1122 service docker start
1124 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1125 chmod +x /opt/docker/docker-compose
1127 # Store credentials in files
1128 mkdir -p /opt/config
1129 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1130 echo "__nexus_username__" > /opt/config/nexus_username.txt
1131 echo "__nexus_password__" > /opt/config/nexus_password.txt
1132 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
1133 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
1134 echo "__docker_version__" > /opt/config/docker_version.txt
1136 # Run docker-compose to spin up containers
1138 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/policy/docker.git policy
1143 # APP-C instantiation
1145 type: OS::Neutron::Port
1147 network: { get_resource: oam_ecomp }
1148 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.2.1}]
1151 type: OS::Nova::Server
1153 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
1154 flavor: 4 GB General Purpose v1
1156 key_name: { get_resource: vm_key }
1158 - network: { get_param: public_net_id }
1159 - port: { get_resource: appc_private_port }
1160 user_data_format: RAW
1164 __nexus_repo__: { get_param: nexus_repo }
1165 __nexus_docker_repo__: { get_param: nexus_docker_repo }
1166 __nexus_username__: { get_param: nexus_username }
1167 __nexus_password__: { get_param: nexus_password }
1168 __gitlab_username__: { get_param: gitlab_username }
1169 __gitlab_password__: { get_param: gitlab_password }
1170 __dmaap_topic__: { get_param: dmaap_topic }
1171 __artifacts_version__: { get_param: artifacts_version }
1172 __docker_version__: { get_param: docker_version }
1173 __gerrit_branch__: { get_param: gerrit_branch }
1177 # DNS/GW IP address configuration
1179 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
1180 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
1183 # Download dependencies
1184 add-apt-repository -y ppa:openjdk-r/ppa
1186 apt-get install -y apt-transport-https ca-certificates wget openjdk-7-jdk ntp ntpdate
1188 # Download scripts from Nexus
1189 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_vm_init.sh -o /opt/appc_vm_init.sh
1190 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_serv.sh -o /opt/appc_serv.sh
1191 chmod +x /opt/appc_vm_init.sh
1192 chmod +x /opt/appc_serv.sh
1193 mv /opt/appc_serv.sh /etc/init.d
1194 update-rc.d appc_serv.sh defaults
1196 # Download and install docker-engine and docker-compose
1197 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1198 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1200 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1201 apt-get install -y docker-engine
1202 service docker start
1205 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1206 chmod +x /opt/docker/docker-compose
1208 # Store credentials in files
1209 mkdir -p /opt/config
1210 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1211 echo "__nexus_username__" > /opt/config/nexus_username.txt
1212 echo "__nexus_password__" > /opt/config/nexus_password.txt
1213 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
1214 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
1215 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1216 echo "__docker_version__" > /opt/config/docker_version.txt
1218 # Run docker-compose to spin up containers
1220 git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/appc/deployment.git appc