1 heat_template_version: 2013-05-23
3 description: Heat template to deploy OpenECOMP components
7 # Generic parameters used across all OpenECOMP 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 OpenECOMP components
64 # Parameters for DCAE instantiation
68 description: DCAE Zone to use in VM names created by DCAE controller
73 description: DCAE State to use in VM names created by DCAE controller
77 label: Rackspace tenant ID
78 description: Rackspace tenant ID
82 label: Rackspace username
83 description: Rackspace username
87 label: Rackspace API Key
88 description: Rackspace API Key
92 label: Rackspace Password
93 description: Rackspace Password
97 label: Root URL of nexus repository
98 description: Root URL of nexus repository
102 label: Snapshot of Maven repository for DCAE deployment
103 description: Snapshot of Maven repository
107 label: Rackspace Region
108 description: Rackspace region where the DCAE controller will spin the VMs
112 label: Branch of the Gitlab repository
113 description: Branch of the Gitlab repository
118 type: OS::Heat::RandomString
122 # Public key used to access OpenECOMP components
124 type: OS::Nova::KeyPair
130 base: { get_param: key_name }
131 rand: { get_resource: random-str }
132 public_key: { get_param: pub_key }
133 save_private_key: false
136 # OpenECOMP management private network
138 type: OS::Neutron::Net
142 template: oam_ecomp_rand
144 rand: { get_resource: random-str }
147 type: OS::Neutron::Subnet
151 template: oam_ecomp_rand
153 rand: { get_resource: random-str }
154 network_id: { get_resource: oam_ecomp }
156 value: { get_attr: [oam_ecomp, name] }
159 # DNS Server instantiation
161 type: OS::Neutron::Port
163 network: { get_resource: oam_ecomp }
164 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.0.1}]
167 type: OS::Nova::Server
169 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
170 flavor: 4 GB General Purpose v1
172 key_name: { get_resource: vm_key }
174 - network: { get_param: public_net_id }
175 - port: { get_resource: dns_private_port }
176 user_data_format: RAW
180 __nexus_repo__: { get_param: nexus_repo }
181 __artifacts_version__: { get_param: artifacts_version }
185 # Download dependencies
186 add-apt-repository -y ppa:openjdk-r/ppa
188 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk bind9 bind9utils bind9-doc ntp ntpdate
191 mkdir /etc/bind/zones
193 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/db_simpledemo_openecomp_org -o /etc/bind/zones/db.simpledemo.openecomp.org
194 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/named.conf.options -o /etc/bind/named.conf.options
195 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/named.conf.local -o /etc/bind/named.conf.local
199 sed -i "s/OPTIONS=.*/OPTIONS=\"-4 -u bind\"/g" /etc/default/bind9
200 service bind9 restart
205 type: OS::Neutron::Port
207 network: { get_resource: oam_ecomp }
208 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.1.1}]
211 type: OS::Cinder::Volume
216 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
219 type: OS::Nova::Server
222 flavor: 15 GB Compute v1
224 key_name: { get_resource: vm_key }
225 block_device_mapping:
226 - volume_id: { get_resource: aai_volume }
229 - network: { get_param: public_net_id }
230 - port: { get_resource: aai_private_port }
231 user_data_format: RAW
235 __nexus_repo__: { get_param: nexus_repo }
236 __nexus_docker_repo__: { get_param: nexus_docker_repo }
237 __nexus_username__: { get_param: nexus_username }
238 __nexus_password__: { get_param: nexus_password }
239 __gitlab_username__: { get_param: gitlab_username }
240 __gitlab_password__: { get_param: gitlab_password }
241 __dmaap_topic__: { get_param: dmaap_topic }
242 __artifacts_version__: { get_param: artifacts_version }
246 # DNS/GW IP address configuration
247 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
250 # Download dependencies
251 add-apt-repository -y ppa:openjdk-r/ppa
253 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
255 # Download scripts from Nexus
256 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/aai_vm_init.sh -o /opt/aai_vm_init.sh
257 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/aai_serv.sh -o /opt/aai_serv.sh
258 chmod +x /opt/aai_vm_init.sh
259 chmod +x /opt/aai_serv.sh
260 mv /opt/aai_serv.sh /etc/init.d
261 update-rc.d aai_serv.sh defaults
263 # Download and install docker-engine and docker-compose
264 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
265 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
267 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
268 apt-get install -y docker-engine
271 mkdir -p /opt/openecomp/aai/logs
272 mkdir -p /opt/openecomp/aai/data
274 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
275 chmod +x /opt/docker/docker-compose
277 # Store credentials in files
279 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
280 echo "__nexus_username__" > /opt/config/nexus_username.txt
281 echo "__nexus_password__" > /opt/config/nexus_password.txt
282 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
283 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
284 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
285 echo "gerrit.openecomp.org" > /opt/config/gitlab_certname.txt
287 # Execute docker instructions
294 type: OS::Neutron::Port
296 network: { get_resource: oam_ecomp }
297 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.5.1}]
300 type: OS::Nova::Server
302 image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
303 flavor: 4 GB General Purpose v1
305 key_name: { get_resource: vm_key }
307 - network: { get_param: public_net_id }
308 - port: { get_resource: mso_private_port }
309 user_data_format: RAW
313 __nexus_repo__: { get_param: nexus_repo }
314 __nexus_docker_repo__: { get_param: nexus_docker_repo }
315 __nexus_username__: { get_param: nexus_username }
316 __nexus_password__: { get_param: nexus_password }
317 __gitlab_username__: { get_param: gitlab_username }
318 __gitlab_password__: { get_param: gitlab_password }
319 __openstack_username__: { get_param: openstack_username }
320 __openstack_tenant_id__: { get_param: openstack_tenant_id }
321 __openstack_api_key__: { get_param: openstack_api_key }
322 __dmaap_topic__: { get_param: dmaap_topic }
323 __artifacts_version__: { get_param: artifacts_version }
327 # DNS/GW IP address configuration
328 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
331 # Download dependencies
332 add-apt-repository -y ppa:openjdk-r/ppa
334 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
336 # Download scripts from Nexus
337 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_vm_init.sh -o /opt/mso_vm_init.sh
338 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_serv.sh -o /opt/mso_serv.sh
339 chmod +x /opt/mso_vm_init.sh
340 chmod +x /opt/mso_serv.sh
341 mv /opt/mso_serv.sh /etc/init.d
342 update-rc.d mso_serv.sh defaults
344 # Download and install docker-engine and docker-compose
345 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
346 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
348 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
349 apt-get install -y docker-engine
353 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
354 chmod +x /opt/docker/docker-compose
356 # Store credentials in files
358 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
359 echo "__nexus_username__" > /opt/config/nexus_username.txt
360 echo "__nexus_password__" > /opt/config/nexus_password.txt
361 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
362 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
363 echo "__openstack_username__" > /opt/config/openstack_username.txt
364 echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
365 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
368 # Run docker-compose to spin up containers
370 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/mso/docker-config.git test_lab
371 MSO_ENCRYPTION_KEY=$(cat /opt/test_lab/encryption.key)
372 echo -n "__openstack_api_key__" | openssl aes-128-ecb -e -K $MSO_ENCRYPTION_KEY -nosalt | xxd -c 256 -p > /opt/config/api_key.txt
376 # Message Router instantiation
377 mrouter_private_port:
378 type: OS::Neutron::Port
380 network: { get_resource: oam_ecomp }
381 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.11.1}]
384 type: OS::Nova::Server
386 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
388 name: vm1-message-router
389 key_name: { get_resource: vm_key }
391 - network: { get_param: public_net_id }
392 - port: { get_resource: mrouter_private_port }
393 user_data_format: RAW
397 __nexus_repo__: { get_param: nexus_repo }
398 __nexus_docker_repo__: { get_param: nexus_docker_repo }
399 __nexus_username__: { get_param: nexus_username }
400 __nexus_password__: { get_param: nexus_password }
401 __gitlab_username__: { get_param: gitlab_username }
402 __gitlab_password__: { get_param: gitlab_password }
403 __artifacts_version__: { get_param: artifacts_version }
407 # DNS/GW IP address configuration
408 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
411 # Download dependencies
412 add-apt-repository -y ppa:openjdk-r/ppa
414 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
416 # Download scripts from Nexus
417 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_vm_init.sh -o /opt/mr_vm_init.sh
418 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_serv.sh -o /opt/mr_serv.sh
419 chmod +x /opt/mr_vm_init.sh
420 chmod +x /opt/mr_serv.sh
421 mv /opt/mr_serv.sh /etc/init.d
422 update-rc.d mr_serv.sh defaults
424 # Download and install docker-engine and docker-compose
425 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
426 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
428 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
429 apt-get install -y docker-engine
433 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
434 chmod +x /opt/docker/docker-compose
436 # Store credentials in files
438 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
439 echo "__nexus_username__" > /opt/config/nexus_username.txt
440 echo "__nexus_password__" > /opt/config/nexus_password.txt
441 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
442 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
444 # Run docker-compose to spin up containers
446 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/dcae/demo/startup/message-router.git dcae-startup-vm-message-router
450 # RobotE2E instantiation
452 type: OS::Neutron::Port
454 network: { get_resource: oam_ecomp }
455 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.10.1}]
458 type: OS::Nova::Server
460 image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
461 flavor: 2 GB General Purpose v1
463 key_name: { get_resource: vm_key }
465 - network: { get_param: public_net_id }
466 - port: { get_resource: robot_private_port }
467 user_data_format: RAW
471 __nexus_repo__: { get_param: nexus_repo }
472 __nexus_docker_repo__: { get_param: nexus_docker_repo }
473 __nexus_username__: { get_param: nexus_username }
474 __nexus_password__: { get_param: nexus_password }
475 __gitlab_username__: { get_param: gitlab_username }
476 __gitlab_password__: { get_param: gitlab_password }
477 __network_name__: { get_attr: [oam_ecomp, name] }
478 __openstack_username__: { get_param: openstack_username }
479 __openstack_api_key__: { get_param : openstack_api_key }
480 __openstack_password__: { get_param: openstack_password }
481 __artifacts_version__: { get_param: artifacts_version }
482 __openstack_region__: { get_param: openstack_region }
486 # DNS/GW IP address configuration
487 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
490 # Download dependencies
491 add-apt-repository -y ppa:openjdk-r/ppa
493 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
495 # Download scripts from Nexus
496 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_vm_init.sh -o /opt/robot_vm_init.sh
497 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_serv.sh -o /opt/robot_serv.sh
498 chmod +x /opt/robot_vm_init.sh
499 chmod +x /opt/robot_serv.sh
500 mv /opt/robot_serv.sh /etc/init.d
501 update-rc.d robot_serv.sh defaults
503 # Download and install docker-engine and docker-compose
504 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
505 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
507 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
508 apt-get install -y docker-engine
509 #sed -i 's|^ExecStart=/usr/bin/dockerd \s*-H \s*fd://\s*$|ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375|' /lib/systemd/system/docker.service
513 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
514 chmod +x /opt/docker/docker-compose
516 # Store credentials in files
518 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
519 echo "__nexus_repo__" > /opt/config/nexus_repo.txt
520 echo "__nexus_username__" > /opt/config/nexus_username.txt
521 echo "__nexus_password__" > /opt/config/nexus_password.txt
522 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
523 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
524 echo "__network_name__" > /opt/config/network.txt
525 echo "__openstack_username__" > /opt/config/openstack_username.txt
526 echo "__openstack_password__" > /opt/config/openstack_password.txt
527 echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
528 echo "__openstack_region__" > /opt/config/region.txt
529 echo "__artifacts_version__" > /opt/config/artifacts_version.txt
531 # Execute RobotETE-specific instructions: create share folder to run as a docker volume
532 mkdir -p /opt/eteshare/logs
533 mkdir -p /opt/eteshare/config
535 # Run docker-compose to spin up containers
537 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/testsuite/properties.git testsuite/properties
543 type: OS::Neutron::Port
545 network: { get_resource: oam_ecomp }
546 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.8.1}]
549 type: OS::Nova::Server
551 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
552 flavor: 2 GB General Purpose v1
554 key_name: { get_resource: vm_key }
556 - network: { get_param: public_net_id }
557 - port: { get_resource: vid_private_port }
558 user_data_format: RAW
562 __nexus_repo__: { get_param: nexus_repo }
563 __nexus_docker_repo__: { get_param: nexus_docker_repo }
564 __nexus_username__: { get_param: nexus_username }
565 __nexus_password__: { get_param: nexus_password }
566 __gitlab_username__: { get_param: gitlab_username }
567 __gitlab_password__: { get_param: gitlab_password }
568 __artifacts_version__: { get_param: artifacts_version }
572 # DNS/GW IP address configuration
573 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
576 # Download dependencies
577 add-apt-repository -y ppa:openjdk-r/ppa
579 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk make git ntp ntpdate
581 # Download scripts from Nexus
582 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_vm_init.sh -o /opt/vid_vm_init.sh
583 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_serv.sh -o /opt/vid_serv.sh
584 chmod +x /opt/vid_vm_init.sh
585 chmod +x /opt/vid_serv.sh
586 mv /opt/vid_serv.sh /etc/init.d
587 update-rc.d vid_serv.sh defaults
589 # Download and install docker-engine and docker-compose
590 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
591 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
593 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
594 apt-get install -y docker-engine
598 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
599 chmod +x /opt/docker/docker-compose
601 # Store credentials in files
603 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
604 echo "__nexus_username__" > /opt/config/nexus_username.txt
605 echo "__nexus_password__" > /opt/config/nexus_password.txt
606 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
607 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
609 # Run script to spin up containers
611 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/vid.git
615 # SDN-C instantiation
617 type: OS::Neutron::Port
619 network: { get_resource: oam_ecomp }
620 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.7.1}]
623 type: OS::Nova::Server
625 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
626 flavor: 4 GB General Purpose v1
628 key_name: { get_resource: vm_key }
630 - network: { get_param: public_net_id }
631 - port: { get_resource: sdnc_private_port }
632 user_data_format: RAW
636 __nexus_repo__: { get_param: nexus_repo }
637 __nexus_docker_repo__: { get_param: nexus_docker_repo }
638 __nexus_username__: { get_param: nexus_username }
639 __nexus_password__: { get_param: nexus_password }
640 __gitlab_username__: { get_param: gitlab_username }
641 __gitlab_password__: { get_param: gitlab_password }
642 __artifacts_version__: { get_param: artifacts_version }
646 # DNS/GW IP address configuration
648 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
649 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
652 # Download dependencies
653 add-apt-repository -y ppa:openjdk-r/ppa
655 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
657 # Download scripts from Nexus
658 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_vm_init.sh -o /opt/sdnc_vm_init.sh
659 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_serv.sh -o /opt/sdnc_serv.sh
660 chmod +x /opt/sdnc_vm_init.sh
661 chmod +x /opt/sdnc_serv.sh
662 mv /opt/sdnc_serv.sh /etc/init.d
663 update-rc.d sdnc_serv.sh defaults
665 # Download and install docker-engine and docker-compose
666 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
667 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
669 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
670 apt-get install -y docker-engine
674 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
675 chmod +x /opt/docker/docker-compose
677 # Store credentials in files
679 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
680 echo "__nexus_username__" > /opt/config/nexus_username.txt
681 echo "__nexus_password__" > /opt/config/nexus_password.txt
682 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
683 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
685 # Run docker-compose to spin up containers
687 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/sdnc/oam.git sdnc
693 type: OS::Neutron::Port
695 network: { get_resource: oam_ecomp }
696 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.3.1}]
699 type: OS::Cinder::Volume
704 image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
707 type: OS::Cinder::Volume
713 sdc_volume_attachment:
714 type: OS::Cinder::VolumeAttachment
716 volume_id: { get_resource: sdc_volume_data }
717 instance_uuid: { get_resource: sdc_vm }
718 mountpoint: /dev/xvdb
721 type: OS::Nova::Server
723 flavor: 15 GB Compute v1
725 key_name: { get_resource: vm_key }
726 block_device_mapping:
727 - volume_id: { get_resource: sdc_volume_local }
730 - network: { get_param: public_net_id }
731 - port: { get_resource: sdc_private_port }
732 user_data_format: RAW
736 __nexus_repo__: { get_param: nexus_repo }
737 __nexus_docker_repo__: { get_param: nexus_docker_repo }
738 __nexus_username__: { get_param: nexus_username }
739 __nexus_password__: { get_param: nexus_password }
740 __gitlab_username__: { get_param: gitlab_username }
741 __gitlab_password__: { get_param: gitlab_password }
742 __env_name__: { get_param: dmaap_topic }
743 __artifacts_version__: { get_param: artifacts_version }
747 # DNS/GW IP address configuration
749 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
750 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
753 # Download dependencies
754 add-apt-repository -y ppa:openjdk-r/ppa
756 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
758 # Download scripts from Nexus
759 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_vm_init.sh -o /opt/asdc_vm_init.sh
760 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_serv.sh -o /opt/asdc_serv.sh
761 chmod +x /opt/asdc_vm_init.sh
762 chmod +x /opt/asdc_serv.sh
763 mv /opt/asdc_serv.sh /etc/init.d
764 update-rc.d asdc_serv.sh defaults
766 # Download and install docker-engine and docker-compose
767 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
768 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
770 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
771 apt-get install -y docker-engine
774 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
775 chmod +x /opt/docker/docker-compose
777 # Create partition and mount the external volume
778 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_ext_volume_partitions.txt -o /opt/asdc_ext_volume_partitions.txt
779 sfdisk /dev/xvdb < /opt/asdc_ext_volume_partitions.txt
780 mkfs -t ext4 /dev/xvdb1
782 mount /dev/xvdb1 /data
783 echo "/dev/xvdb1 /data ext4 errors=remount-ro,noatime,barrier=0 0 1" >> /etc/fstab
785 # Store credentials in files
787 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
788 echo "__nexus_username__" > /opt/config/nexus_username.txt
789 echo "__nexus_password__" > /opt/config/nexus_password.txt
790 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
791 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
792 echo "__env_name__" > /opt/config/env_name.txt
793 echo "10.0.11.1" > /opt/config/mr_ip_addr.txt
795 # Run SDC-specific instructions
797 mkdir -p /data/environments
798 mkdir -p /data/scripts
799 mkdir -p /data/logs/BE
800 mkdir -p /data/logs/FE
802 chmod 777 /data/logs/BE
803 chmod 777 /data/logs/FE
805 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/sdc.git
807 cat > /root/.bash_aliases << EOF
808 alias dcls='/data/scripts/docker_clean.sh \$1'
809 alias dlog='/data/scripts/docker_login.sh \$1'
810 alias rund='/data/scripts/docker_run.sh'
811 alias health='/data/scripts/docker_health.sh'
814 # Run docker-compose to spin up containers
818 # PORTAL instantiation
820 type: OS::Neutron::Port
822 network: { get_resource: oam_ecomp }
823 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.9.1}]
826 type: OS::Cinder::Volume
831 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
834 type: OS::Nova::Server
836 flavor: 15 GB Memory v1
838 key_name: { get_resource: vm_key }
839 block_device_mapping:
840 - volume_id: { get_resource: portal_volume }
843 - network: { get_param: public_net_id }
844 - port: { get_resource: portal_private_port }
845 user_data_format: RAW
849 __nexus_repo__: { get_param: nexus_repo }
850 __nexus_docker_repo__: { get_param: nexus_docker_repo }
851 __nexus_username__: { get_param: nexus_username }
852 __nexus_password__: { get_param: nexus_password }
853 __gitlab_username__: { get_param: gitlab_username }
854 __gitlab_password__: { get_param: gitlab_password }
855 __artifacts_version__: { get_param: artifacts_version }
859 # DNS/GW IP address configuration
861 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
862 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
865 # Download dependencies
866 add-apt-repository -y ppa:openjdk-r/ppa
868 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk unzip mysql-client-core-5.6 ntp ntpdate
870 # Download scripts from Nexus
871 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_vm_init.sh -o /opt/portal_vm_init.sh
872 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_serv.sh -o /opt/portal_serv.sh
873 chmod +x /opt/portal_vm_init.sh
874 chmod +x /opt/portal_serv.sh
875 mv /opt/portal_serv.sh /etc/init.d
876 update-rc.d portal_serv.sh defaults
878 # Download and install docker-engine and docker-compose
879 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
880 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
882 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
883 apt-get install -y docker-engine
886 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
887 chmod +x /opt/docker/docker-compose
889 # Store credentials in files
891 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
892 echo "__nexus_username__" > /opt/config/nexus_username.txt
893 echo "__nexus_password__" > /opt/config/nexus_password.txt
894 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
895 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
897 # Run Portal-specific instructions
898 mkdir -p /PROJECT/OpenSource/UbuntuEP/logs
900 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/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_username__: { get_param: gitlab_username }
932 __gitlab_password__: { get_param: gitlab_password }
933 __gitlab_branch__: { get_param: gitlab_branch }
934 __dcae_zone__: { get_param: dcae_zone }
935 __dcae_state__: { get_param: dcae_state }
936 __artifacts_version__: { get_param: artifacts_version }
937 __tenant_id__: { get_param: openstack_tenant_id }
938 __openstack_private_network_name__: { get_attr: [oam_ecomp, name] }
939 __openstack_user__: { get_param: openstack_username }
940 __openstack_password__: { get_param: openstack_api_key }
941 __key_name__: { get_param: key_name }
942 __rand_str__: { get_resource: random-str }
943 __pub_key__: { get_param: pub_key }
944 __nexus_repo_root__: { get_param: nexus_repo_root }
945 __openstack_region__: { get_param: openstack_region }
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 https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/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: 0.1.0-SNAPSHOT
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: https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/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_username__" > /opt/config/gitlab_username.txt
1015 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
1016 echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
1022 # Policy engine instantiation
1023 policy_private_port:
1024 type: OS::Neutron::Port
1026 network: { get_resource: oam_ecomp }
1027 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.6.1}]
1030 type: OS::Cinder::Volume
1035 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
1038 type: OS::Nova::Server
1040 flavor: 15 GB Compute v1
1042 key_name: { get_resource: vm_key }
1043 block_device_mapping:
1044 - volume_id: { get_resource: policy_volume }
1047 - network: { get_param: public_net_id }
1048 - port: { get_resource: policy_private_port }
1049 user_data_format: RAW
1053 __nexus_repo__: { get_param: nexus_repo }
1054 __nexus_docker_repo__: { get_param: nexus_docker_repo }
1055 __nexus_username__: { get_param: nexus_username }
1056 __nexus_password__: { get_param: nexus_password }
1057 __gitlab_username__: { get_param: gitlab_username }
1058 __gitlab_password__: { get_param: gitlab_password }
1059 __artifacts_version__: { get_param: artifacts_version }
1063 # DNS/GW IP address configuration
1065 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
1066 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
1069 # Download dependencies
1070 add-apt-repository -y ppa:openjdk-r/ppa
1072 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
1074 # Download scripts from Nexus
1075 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_vm_init.sh -o /opt/policy_vm_init.sh
1076 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_serv.sh -o /opt/policy_serv.sh
1077 chmod +x /opt/policy_vm_init.sh
1078 chmod +x /opt/policy_serv.sh
1079 mv /opt/policy_serv.sh /etc/init.d
1080 update-rc.d policy_serv.sh defaults
1082 # Download and install docker-engine and docker-compose
1083 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1084 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1086 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1087 apt-get install -y docker-engine
1088 service docker start
1090 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1091 chmod +x /opt/docker/docker-compose
1093 # Store credentials in files
1094 mkdir -p /opt/config
1095 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1096 echo "__nexus_username__" > /opt/config/nexus_username.txt
1097 echo "__nexus_password__" > /opt/config/nexus_password.txt
1098 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
1099 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
1101 # Run docker-compose to spin up containers
1103 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/policy/docker.git policy
1108 # APP-C instantiation
1110 type: OS::Neutron::Port
1112 network: { get_resource: oam_ecomp }
1113 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.2.1}]
1116 type: OS::Nova::Server
1118 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
1119 flavor: 4 GB General Purpose v1
1121 key_name: { get_resource: vm_key }
1123 - network: { get_param: public_net_id }
1124 - port: { get_resource: appc_private_port }
1125 user_data_format: RAW
1129 __nexus_repo__: { get_param: nexus_repo }
1130 __nexus_docker_repo__: { get_param: nexus_docker_repo }
1131 __nexus_username__: { get_param: nexus_username }
1132 __nexus_password__: { get_param: nexus_password }
1133 __gitlab_username__: { get_param: gitlab_username }
1134 __gitlab_password__: { get_param: gitlab_password }
1135 __dmaap_topic__: { get_param: dmaap_topic }
1136 __artifacts_version__: { get_param: artifacts_version }
1140 # DNS/GW IP address configuration
1142 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
1143 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
1146 # Download dependencies
1147 add-apt-repository -y ppa:openjdk-r/ppa
1149 apt-get install -y apt-transport-https ca-certificates wget openjdk-7-jdk ntp ntpdate
1151 # Download scripts from Nexus
1152 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_vm_init.sh -o /opt/appc_vm_init.sh
1153 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_serv.sh -o /opt/appc_serv.sh
1154 chmod +x /opt/appc_vm_init.sh
1155 chmod +x /opt/appc_serv.sh
1156 mv /opt/appc_serv.sh /etc/init.d
1157 update-rc.d appc_serv.sh defaults
1159 # Download and install docker-engine and docker-compose
1160 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1161 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1163 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1164 apt-get install -y docker-engine
1165 service docker start
1168 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1169 chmod +x /opt/docker/docker-compose
1171 # Store credentials in files
1172 mkdir -p /opt/config
1173 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1174 echo "__nexus_username__" > /opt/config/nexus_username.txt
1175 echo "__nexus_password__" > /opt/config/nexus_password.txt
1176 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
1177 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
1178 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1180 # Run docker-compose to spin up containers
1182 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/appc/deployment.git appc