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
66 description: Docker version of OpenECOMP docker images
69 # Parameters for DCAE instantiation
73 description: DCAE Zone to use in VM names created by DCAE controller
78 description: DCAE State to use in VM names created by DCAE controller
82 label: Rackspace tenant ID
83 description: Rackspace tenant ID
87 label: Rackspace username
88 description: Rackspace username
92 label: Rackspace API Key
93 description: Rackspace API Key
97 label: Rackspace Password
98 description: Rackspace Password
102 label: Root URL of nexus repository
103 description: Root URL of nexus repository
107 label: Snapshot of Maven repository for DCAE deployment
108 description: Snapshot of Maven repository
112 label: Rackspace Region
113 description: Rackspace region where the DCAE controller will spin the VMs
117 label: Branch of the Gitlab repository
118 description: Branch of the Gitlab repository
123 type: OS::Heat::RandomString
127 # Public key used to access OpenECOMP components
129 type: OS::Nova::KeyPair
135 base: { get_param: key_name }
136 rand: { get_resource: random-str }
137 public_key: { get_param: pub_key }
138 save_private_key: false
141 # OpenECOMP management private network
143 type: OS::Neutron::Net
147 template: oam_ecomp_rand
149 rand: { get_resource: random-str }
152 type: OS::Neutron::Subnet
156 template: oam_ecomp_rand
158 rand: { get_resource: random-str }
159 network_id: { get_resource: oam_ecomp }
161 value: { get_attr: [oam_ecomp, name] }
164 # DNS Server instantiation
166 type: OS::Neutron::Port
168 network: { get_resource: oam_ecomp }
169 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.0.1}]
172 type: OS::Nova::Server
174 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
175 flavor: 4 GB General Purpose v1
177 key_name: { get_resource: vm_key }
179 - network: { get_param: public_net_id }
180 - port: { get_resource: dns_private_port }
181 user_data_format: RAW
185 __nexus_repo__: { get_param: nexus_repo }
186 __artifacts_version__: { get_param: artifacts_version }
190 # Download dependencies
191 add-apt-repository -y ppa:openjdk-r/ppa
193 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk bind9 bind9utils bind9-doc ntp ntpdate
196 mkdir /etc/bind/zones
198 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/db_simpledemo_openecomp_org -o /etc/bind/zones/db.simpledemo.openecomp.org
199 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/named.conf.options -o /etc/bind/named.conf.options
200 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/named.conf.local -o /etc/bind/named.conf.local
204 sed -i "s/OPTIONS=.*/OPTIONS=\"-4 -u bind\"/g" /etc/default/bind9
205 service bind9 restart
210 type: OS::Neutron::Port
212 network: { get_resource: oam_ecomp }
213 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.1.1}]
216 type: OS::Cinder::Volume
221 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
224 type: OS::Nova::Server
227 flavor: 15 GB Compute v1
229 key_name: { get_resource: vm_key }
230 block_device_mapping:
231 - volume_id: { get_resource: aai_volume }
234 - network: { get_param: public_net_id }
235 - port: { get_resource: aai_private_port }
236 user_data_format: RAW
240 __nexus_repo__: { get_param: nexus_repo }
241 __nexus_docker_repo__: { get_param: nexus_docker_repo }
242 __nexus_username__: { get_param: nexus_username }
243 __nexus_password__: { get_param: nexus_password }
244 __gitlab_username__: { get_param: gitlab_username }
245 __gitlab_password__: { get_param: gitlab_password }
246 __dmaap_topic__: { get_param: dmaap_topic }
247 __artifacts_version__: { get_param: artifacts_version }
248 __docker_version__: { get_param: docker_version }
252 # DNS/GW IP address configuration
253 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
256 # Download dependencies
257 add-apt-repository -y ppa:openjdk-r/ppa
259 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
261 # Download scripts from Nexus
262 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/aai_vm_init.sh -o /opt/aai_vm_init.sh
263 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/aai_serv.sh -o /opt/aai_serv.sh
264 chmod +x /opt/aai_vm_init.sh
265 chmod +x /opt/aai_serv.sh
266 mv /opt/aai_serv.sh /etc/init.d
267 update-rc.d aai_serv.sh defaults
269 # Download and install docker-engine and docker-compose
270 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
271 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
273 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
274 apt-get install -y docker-engine
277 mkdir -p /opt/openecomp/aai/logs
278 mkdir -p /opt/openecomp/aai/data
280 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
281 chmod +x /opt/docker/docker-compose
283 # Store credentials in files
285 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
286 echo "__nexus_username__" > /opt/config/nexus_username.txt
287 echo "__nexus_password__" > /opt/config/nexus_password.txt
288 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
289 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
290 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
291 echo "gerrit.openecomp.org" > /opt/config/gitlab_certname.txt
292 echo "__docker_version__" > /opt/config/docker_version.txt
294 # Execute docker instructions
301 type: OS::Neutron::Port
303 network: { get_resource: oam_ecomp }
304 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.5.1}]
307 type: OS::Nova::Server
309 image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
310 flavor: 4 GB General Purpose v1
312 key_name: { get_resource: vm_key }
314 - network: { get_param: public_net_id }
315 - port: { get_resource: mso_private_port }
316 user_data_format: RAW
320 __nexus_repo__: { get_param: nexus_repo }
321 __nexus_docker_repo__: { get_param: nexus_docker_repo }
322 __nexus_username__: { get_param: nexus_username }
323 __nexus_password__: { get_param: nexus_password }
324 __gitlab_username__: { get_param: gitlab_username }
325 __gitlab_password__: { get_param: gitlab_password }
326 __openstack_username__: { get_param: openstack_username }
327 __openstack_tenant_id__: { get_param: openstack_tenant_id }
328 __openstack_api_key__: { get_param: openstack_api_key }
329 __dmaap_topic__: { get_param: dmaap_topic }
330 __artifacts_version__: { get_param: artifacts_version }
331 __docker_version__: { get_param: docker_version }
335 # DNS/GW IP address configuration
336 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
339 # Download dependencies
340 add-apt-repository -y ppa:openjdk-r/ppa
342 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
344 # Download scripts from Nexus
345 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_vm_init.sh -o /opt/mso_vm_init.sh
346 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_serv.sh -o /opt/mso_serv.sh
347 chmod +x /opt/mso_vm_init.sh
348 chmod +x /opt/mso_serv.sh
349 mv /opt/mso_serv.sh /etc/init.d
350 update-rc.d mso_serv.sh defaults
352 # Download and install docker-engine and docker-compose
353 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
354 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
356 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
357 apt-get install -y docker-engine
361 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
362 chmod +x /opt/docker/docker-compose
364 # Store credentials in files
366 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
367 echo "__nexus_username__" > /opt/config/nexus_username.txt
368 echo "__nexus_password__" > /opt/config/nexus_password.txt
369 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
370 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
371 echo "__openstack_username__" > /opt/config/openstack_username.txt
372 echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
373 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
374 echo "__docker_version__" > /opt/config/docker_version.txt
376 # Run docker-compose to spin up containers
378 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/mso/docker-config.git test_lab
379 MSO_ENCRYPTION_KEY=$(cat /opt/test_lab/encryption.key)
380 echo -n "__openstack_api_key__" | openssl aes-128-ecb -e -K $MSO_ENCRYPTION_KEY -nosalt | xxd -c 256 -p > /opt/config/api_key.txt
384 # Message Router instantiation
385 mrouter_private_port:
386 type: OS::Neutron::Port
388 network: { get_resource: oam_ecomp }
389 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.11.1}]
392 type: OS::Nova::Server
394 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
396 name: vm1-message-router
397 key_name: { get_resource: vm_key }
399 - network: { get_param: public_net_id }
400 - port: { get_resource: mrouter_private_port }
401 user_data_format: RAW
405 __nexus_repo__: { get_param: nexus_repo }
406 __nexus_docker_repo__: { get_param: nexus_docker_repo }
407 __nexus_username__: { get_param: nexus_username }
408 __nexus_password__: { get_param: nexus_password }
409 __gitlab_username__: { get_param: gitlab_username }
410 __gitlab_password__: { get_param: gitlab_password }
411 __artifacts_version__: { get_param: artifacts_version }
415 # DNS/GW IP address configuration
416 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
419 # Download dependencies
420 add-apt-repository -y ppa:openjdk-r/ppa
422 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
424 # Download scripts from Nexus
425 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_vm_init.sh -o /opt/mr_vm_init.sh
426 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_serv.sh -o /opt/mr_serv.sh
427 chmod +x /opt/mr_vm_init.sh
428 chmod +x /opt/mr_serv.sh
429 mv /opt/mr_serv.sh /etc/init.d
430 update-rc.d mr_serv.sh defaults
432 # Download and install docker-engine and docker-compose
433 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
434 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
436 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
437 apt-get install -y docker-engine
441 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
442 chmod +x /opt/docker/docker-compose
444 # Store credentials in files
446 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
447 echo "__nexus_username__" > /opt/config/nexus_username.txt
448 echo "__nexus_password__" > /opt/config/nexus_password.txt
449 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
450 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
452 # Run docker-compose to spin up containers
454 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/dcae/demo/startup/message-router.git dcae-startup-vm-message-router
458 # RobotE2E instantiation
460 type: OS::Neutron::Port
462 network: { get_resource: oam_ecomp }
463 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.10.1}]
466 type: OS::Nova::Server
468 image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
469 flavor: 2 GB General Purpose v1
471 key_name: { get_resource: vm_key }
473 - network: { get_param: public_net_id }
474 - port: { get_resource: robot_private_port }
475 user_data_format: RAW
479 __nexus_repo__: { get_param: nexus_repo }
480 __nexus_docker_repo__: { get_param: nexus_docker_repo }
481 __nexus_username__: { get_param: nexus_username }
482 __nexus_password__: { get_param: nexus_password }
483 __gitlab_username__: { get_param: gitlab_username }
484 __gitlab_password__: { get_param: gitlab_password }
485 __network_name__: { get_attr: [oam_ecomp, name] }
486 __openstack_username__: { get_param: openstack_username }
487 __openstack_api_key__: { get_param : openstack_api_key }
488 __openstack_password__: { get_param: openstack_password }
489 __artifacts_version__: { get_param: artifacts_version }
490 __openstack_region__: { get_param: openstack_region }
491 __docker_version__: { get_param: docker_version }
495 # DNS/GW IP address configuration
496 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
499 # Download dependencies
500 add-apt-repository -y ppa:openjdk-r/ppa
502 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
503 echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic
505 # Download scripts from Nexus
506 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_vm_init.sh -o /opt/robot_vm_init.sh
507 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_serv.sh -o /opt/robot_serv.sh
508 chmod +x /opt/robot_vm_init.sh
509 chmod +x /opt/robot_serv.sh
510 mv /opt/robot_serv.sh /etc/init.d
511 update-rc.d robot_serv.sh defaults
513 # Download and install docker-engine and docker-compose
514 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
515 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
517 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
518 apt-get install -y docker-engine
522 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
523 chmod +x /opt/docker/docker-compose
525 # Store credentials in files
527 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
528 echo "__nexus_repo__" > /opt/config/nexus_repo.txt
529 echo "__nexus_username__" > /opt/config/nexus_username.txt
530 echo "__nexus_password__" > /opt/config/nexus_password.txt
531 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
532 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
533 echo "__network_name__" > /opt/config/network.txt
534 echo "__openstack_username__" > /opt/config/openstack_username.txt
535 echo "__openstack_password__" > /opt/config/openstack_password.txt
536 echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
537 echo "__openstack_region__" > /opt/config/region.txt
538 echo "__artifacts_version__" > /opt/config/artifacts_version.txt
539 echo "__docker_version__" > /opt/config/docker_version.txt
541 # Execute RobotETE-specific instructions: create share folder to run as a docker volume
542 mkdir -p /opt/eteshare/logs
543 mkdir -p /opt/eteshare/config
545 # Run docker-compose to spin up containers
547 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/testsuite/properties.git testsuite/properties
553 type: OS::Neutron::Port
555 network: { get_resource: oam_ecomp }
556 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.8.1}]
559 type: OS::Nova::Server
561 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
562 flavor: 2 GB General Purpose v1
564 key_name: { get_resource: vm_key }
566 - network: { get_param: public_net_id }
567 - port: { get_resource: vid_private_port }
568 user_data_format: RAW
572 __nexus_repo__: { get_param: nexus_repo }
573 __nexus_docker_repo__: { get_param: nexus_docker_repo }
574 __nexus_username__: { get_param: nexus_username }
575 __nexus_password__: { get_param: nexus_password }
576 __gitlab_username__: { get_param: gitlab_username }
577 __gitlab_password__: { get_param: gitlab_password }
578 __artifacts_version__: { get_param: artifacts_version }
579 __docker_version__: { get_param: docker_version }
583 # DNS/GW IP address configuration
584 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
587 # Download dependencies
588 add-apt-repository -y ppa:openjdk-r/ppa
590 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk make git ntp ntpdate
592 # Download scripts from Nexus
593 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_vm_init.sh -o /opt/vid_vm_init.sh
594 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_serv.sh -o /opt/vid_serv.sh
595 chmod +x /opt/vid_vm_init.sh
596 chmod +x /opt/vid_serv.sh
597 mv /opt/vid_serv.sh /etc/init.d
598 update-rc.d vid_serv.sh defaults
600 # Download and install docker-engine and docker-compose
601 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
602 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
604 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
605 apt-get install -y docker-engine
609 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
610 chmod +x /opt/docker/docker-compose
612 # Store credentials in files
614 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
615 echo "__nexus_username__" > /opt/config/nexus_username.txt
616 echo "__nexus_password__" > /opt/config/nexus_password.txt
617 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
618 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
619 echo "__docker_version__" > /opt/config/docker_version.txt
621 # Run script to spin up containers
623 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/vid.git
627 # SDN-C instantiation
629 type: OS::Neutron::Port
631 network: { get_resource: oam_ecomp }
632 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.7.1}]
635 type: OS::Nova::Server
637 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
638 flavor: 4 GB General Purpose v1
640 key_name: { get_resource: vm_key }
642 - network: { get_param: public_net_id }
643 - port: { get_resource: sdnc_private_port }
644 user_data_format: RAW
648 __nexus_repo__: { get_param: nexus_repo }
649 __nexus_docker_repo__: { get_param: nexus_docker_repo }
650 __nexus_username__: { get_param: nexus_username }
651 __nexus_password__: { get_param: nexus_password }
652 __gitlab_username__: { get_param: gitlab_username }
653 __gitlab_password__: { get_param: gitlab_password }
654 __artifacts_version__: { get_param: artifacts_version }
655 __docker_version__: { get_param: docker_version }
659 # DNS/GW IP address configuration
661 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
662 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
665 # Download dependencies
666 add-apt-repository -y ppa:openjdk-r/ppa
668 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
670 # Download scripts from Nexus
671 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_vm_init.sh -o /opt/sdnc_vm_init.sh
672 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_serv.sh -o /opt/sdnc_serv.sh
673 chmod +x /opt/sdnc_vm_init.sh
674 chmod +x /opt/sdnc_serv.sh
675 mv /opt/sdnc_serv.sh /etc/init.d
676 update-rc.d sdnc_serv.sh defaults
678 # Download and install docker-engine and docker-compose
679 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
680 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
682 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
683 apt-get install -y docker-engine
687 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
688 chmod +x /opt/docker/docker-compose
690 # Store credentials in files
692 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
693 echo "__nexus_username__" > /opt/config/nexus_username.txt
694 echo "__nexus_password__" > /opt/config/nexus_password.txt
695 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
696 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
697 echo "__docker_version__" > /opt/config/docker_version.txt
699 # Run docker-compose to spin up containers
701 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/sdnc/oam.git sdnc
707 type: OS::Neutron::Port
709 network: { get_resource: oam_ecomp }
710 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.3.1}]
713 type: OS::Cinder::Volume
718 image: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM)
721 type: OS::Cinder::Volume
727 sdc_volume_attachment:
728 type: OS::Cinder::VolumeAttachment
730 volume_id: { get_resource: sdc_volume_data }
731 instance_uuid: { get_resource: sdc_vm }
732 mountpoint: /dev/xvdb
735 type: OS::Nova::Server
737 flavor: 15 GB Compute v1
739 key_name: { get_resource: vm_key }
740 block_device_mapping:
741 - volume_id: { get_resource: sdc_volume_local }
744 - network: { get_param: public_net_id }
745 - port: { get_resource: sdc_private_port }
746 user_data_format: RAW
750 __nexus_repo__: { get_param: nexus_repo }
751 __nexus_docker_repo__: { get_param: nexus_docker_repo }
752 __nexus_username__: { get_param: nexus_username }
753 __nexus_password__: { get_param: nexus_password }
754 __gitlab_username__: { get_param: gitlab_username }
755 __gitlab_password__: { get_param: gitlab_password }
756 __env_name__: { get_param: dmaap_topic }
757 __artifacts_version__: { get_param: artifacts_version }
758 __docker_version__: { get_param: docker_version }
762 # DNS/GW IP address configuration
764 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
765 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
768 # Download dependencies
769 add-apt-repository -y ppa:openjdk-r/ppa
771 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
773 # Download scripts from Nexus
774 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_vm_init.sh -o /opt/asdc_vm_init.sh
775 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_serv.sh -o /opt/asdc_serv.sh
776 chmod +x /opt/asdc_vm_init.sh
777 chmod +x /opt/asdc_serv.sh
778 mv /opt/asdc_serv.sh /etc/init.d
779 update-rc.d asdc_serv.sh defaults
781 # Download and install docker-engine and docker-compose
782 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
783 echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
785 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
786 apt-get install -y docker-engine
789 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
790 chmod +x /opt/docker/docker-compose
792 # Create partition and mount the external volume
793 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_ext_volume_partitions.txt -o /opt/asdc_ext_volume_partitions.txt
794 sfdisk /dev/xvdb < /opt/asdc_ext_volume_partitions.txt
795 mkfs -t ext4 /dev/xvdb1
797 mount /dev/xvdb1 /data
798 echo "/dev/xvdb1 /data ext4 errors=remount-ro,noatime,barrier=0 0 1" >> /etc/fstab
800 # Store credentials in files
802 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
803 echo "__nexus_username__" > /opt/config/nexus_username.txt
804 echo "__nexus_password__" > /opt/config/nexus_password.txt
805 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
806 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
807 echo "__env_name__" > /opt/config/env_name.txt
808 echo "10.0.11.1" > /opt/config/mr_ip_addr.txt
809 echo "__docker_version__" > /opt/config/docker_version.txt
811 # Run SDC-specific instructions
813 mkdir -p /data/environments
814 mkdir -p /data/scripts
815 mkdir -p /data/logs/BE
816 mkdir -p /data/logs/FE
818 chmod 777 /data/logs/BE
819 chmod 777 /data/logs/FE
821 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/sdc.git
823 cat > /root/.bash_aliases << EOF
824 alias dcls='/data/scripts/docker_clean.sh \$1'
825 alias dlog='/data/scripts/docker_login.sh \$1'
826 alias rund='/data/scripts/docker_run.sh'
827 alias health='/data/scripts/docker_health.sh'
830 # Run docker-compose to spin up containers
834 # PORTAL instantiation
836 type: OS::Neutron::Port
838 network: { get_resource: oam_ecomp }
839 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.9.1}]
842 type: OS::Cinder::Volume
847 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
850 type: OS::Nova::Server
852 flavor: 15 GB Memory v1
854 key_name: { get_resource: vm_key }
855 block_device_mapping:
856 - volume_id: { get_resource: portal_volume }
859 - network: { get_param: public_net_id }
860 - port: { get_resource: portal_private_port }
861 user_data_format: RAW
865 __nexus_repo__: { get_param: nexus_repo }
866 __nexus_docker_repo__: { get_param: nexus_docker_repo }
867 __nexus_username__: { get_param: nexus_username }
868 __nexus_password__: { get_param: nexus_password }
869 __gitlab_username__: { get_param: gitlab_username }
870 __gitlab_password__: { get_param: gitlab_password }
871 __artifacts_version__: { get_param: artifacts_version }
872 __docker_version__: { get_param: docker_version }
876 # DNS/GW IP address configuration
878 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
879 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
882 # Download dependencies
883 add-apt-repository -y ppa:openjdk-r/ppa
885 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk unzip mysql-client-core-5.6 ntp ntpdate
887 # Download scripts from Nexus
888 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_vm_init.sh -o /opt/portal_vm_init.sh
889 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_serv.sh -o /opt/portal_serv.sh
890 chmod +x /opt/portal_vm_init.sh
891 chmod +x /opt/portal_serv.sh
892 mv /opt/portal_serv.sh /etc/init.d
893 update-rc.d portal_serv.sh defaults
895 # Download and install docker-engine and docker-compose
896 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
897 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
899 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
900 apt-get install -y docker-engine
903 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
904 chmod +x /opt/docker/docker-compose
906 # Store credentials in files
908 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
909 echo "__nexus_username__" > /opt/config/nexus_username.txt
910 echo "__nexus_password__" > /opt/config/nexus_password.txt
911 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
912 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
913 echo "__docker_version__" > /opt/config/docker_version.txt
915 # Run Portal-specific instructions
916 mkdir -p /PROJECT/OpenSource/UbuntuEP/logs
918 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/portal.git
920 # Run docker-compose to spin up containers
924 # DCAE Controller instantiation
926 type: OS::Neutron::Port
928 network: { get_resource: oam_ecomp }
929 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.4.1}]
931 type: OS::Nova::Server
933 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
934 flavor: 8 GB General Purpose v1
935 name: vm1-dcae-controller
936 key_name: { get_resource: vm_key }
938 - network: { get_param: public_net_id }
939 - port: { get_resource: dcae_c_private_port }
940 user_data_format: RAW
944 __nexus_repo__: { get_param: nexus_repo }
945 __nexus_docker_repo__: { get_param: nexus_docker_repo }
946 __nexus_username__: { get_param: nexus_username }
947 __nexus_password__: { get_param: nexus_password }
948 __nexus_url_snapshots__: { get_param: nexus_url_snapshot }
949 __gitlab_username__: { get_param: gitlab_username }
950 __gitlab_password__: { get_param: gitlab_password }
951 __gitlab_branch__: { get_param: gitlab_branch }
952 __dcae_zone__: { get_param: dcae_zone }
953 __dcae_state__: { get_param: dcae_state }
954 __artifacts_version__: { get_param: artifacts_version }
955 __tenant_id__: { get_param: openstack_tenant_id }
956 __openstack_private_network_name__: { get_attr: [oam_ecomp, name] }
957 __openstack_user__: { get_param: openstack_username }
958 __openstack_password__: { get_param: openstack_api_key }
959 __key_name__: { get_param: key_name }
960 __rand_str__: { get_resource: random-str }
961 __pub_key__: { get_param: pub_key }
962 __nexus_repo_root__: { get_param: nexus_repo_root }
963 __openstack_region__: { get_param: openstack_region }
964 __docker_version__: { get_param: docker_version }
968 # DNS/GW IP address configuration
969 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
972 # Download dependencies
973 add-apt-repository -y ppa:openjdk-r/ppa
975 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk make git ntp ntpdate
977 # Download scripts from Nexus
978 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_vm_init.sh -o /opt/dcae_vm_init.sh
979 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_serv.sh -o /opt/dcae_serv.sh
980 chmod +x /opt/dcae_vm_init.sh
981 chmod +x /opt/dcae_serv.sh
982 mv /opt/dcae_serv.sh /etc/init.d
983 update-rc.d dcae_serv.sh defaults
985 # Download and install docker-engine and docker-compose
986 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
987 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
989 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
990 apt-get install -y docker-engine
993 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
994 chmod +x /opt/docker/docker-compose
996 # DCAE Controller specific deployment
998 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/dcae/demo/startup/controller.git dcae-startup-vm-controller
1000 cd dcae-startup-vm-controller
1001 mkdir -p /opt/app/dcae-controller
1002 cat > /opt/app/dcae-controller/config.yaml << EOF_CONFIG
1004 STATE: __dcae_state__
1006 HORIZON-URL: https://mycloud.rackspace.com/cloud/__tenant_id__
1007 KEYSTONE-URL: https://identity.api.rackspacecloud.com/v2.0
1008 OPENSTACK-TENANT-ID: __tenant_id__
1009 OPENSTACK-TENANT-NAME: OPEN-ECOMP
1010 OPENSTACK-REGION: __openstack_region__
1011 OPENSTACK-PRIVATE-NETWORK: __openstack_private_network_name__
1012 OPENSTACK-USER: __openstack_user__
1013 OPENSTACK-PASSWORD: __openstack_password__
1014 OPENSTACK-KEYNAME: __key_name_____rand_str___dcae
1015 OPENSTACK-PUBKEY: __pub_key__
1017 NEXUS-URL-ROOT: __nexus_repo_root__
1018 NEXUS-USER: __nexus_username__
1019 NEXUS-PASSWORD: __nexus_password__
1020 NEXUS-URL-SNAPSHOTS: __nexus_url_snapshots__
1021 NEXUS-RAWURL: __nexus_repo__
1023 DOCKER-REGISTRY: __nexus_docker_repo__
1025 GIT-MR-REPO: https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/dcae/demo/startup/message-router.git
1028 # Store credentials in files
1029 mkdir -p /opt/config
1030 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1031 echo "__nexus_username__" > /opt/config/nexus_username.txt
1032 echo "__nexus_password__" > /opt/config/nexus_password.txt
1033 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
1034 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
1035 echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
1036 echo "__docker_version__" > /opt/config/docker_version.txt
1042 # Policy engine instantiation
1043 policy_private_port:
1044 type: OS::Neutron::Port
1046 network: { get_resource: oam_ecomp }
1047 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.6.1}]
1050 type: OS::Cinder::Volume
1055 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
1058 type: OS::Nova::Server
1060 flavor: 15 GB Compute v1
1062 key_name: { get_resource: vm_key }
1063 block_device_mapping:
1064 - volume_id: { get_resource: policy_volume }
1067 - network: { get_param: public_net_id }
1068 - port: { get_resource: policy_private_port }
1069 user_data_format: RAW
1073 __nexus_repo__: { get_param: nexus_repo }
1074 __nexus_docker_repo__: { get_param: nexus_docker_repo }
1075 __nexus_username__: { get_param: nexus_username }
1076 __nexus_password__: { get_param: nexus_password }
1077 __gitlab_username__: { get_param: gitlab_username }
1078 __gitlab_password__: { get_param: gitlab_password }
1079 __artifacts_version__: { get_param: artifacts_version }
1080 __docker_version__: { get_param: docker_version }
1084 # DNS/GW IP address configuration
1086 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
1087 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
1090 # Download dependencies
1091 add-apt-repository -y ppa:openjdk-r/ppa
1093 apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
1095 # Download scripts from Nexus
1096 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_vm_init.sh -o /opt/policy_vm_init.sh
1097 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_serv.sh -o /opt/policy_serv.sh
1098 chmod +x /opt/policy_vm_init.sh
1099 chmod +x /opt/policy_serv.sh
1100 mv /opt/policy_serv.sh /etc/init.d
1101 update-rc.d policy_serv.sh defaults
1103 # Download and install docker-engine and docker-compose
1104 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1105 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1107 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1108 apt-get install -y docker-engine
1109 service docker start
1111 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1112 chmod +x /opt/docker/docker-compose
1114 # Store credentials in files
1115 mkdir -p /opt/config
1116 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1117 echo "__nexus_username__" > /opt/config/nexus_username.txt
1118 echo "__nexus_password__" > /opt/config/nexus_password.txt
1119 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
1120 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
1121 echo "__docker_version__" > /opt/config/docker_version.txt
1123 # Run docker-compose to spin up containers
1125 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/policy/docker.git policy
1130 # APP-C instantiation
1132 type: OS::Neutron::Port
1134 network: { get_resource: oam_ecomp }
1135 fixed_ips: [{"subnet": { get_resource: oam_ecomp_subnet }, "ip_address": 10.0.2.1}]
1138 type: OS::Nova::Server
1140 image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
1141 flavor: 4 GB General Purpose v1
1143 key_name: { get_resource: vm_key }
1145 - network: { get_param: public_net_id }
1146 - port: { get_resource: appc_private_port }
1147 user_data_format: RAW
1151 __nexus_repo__: { get_param: nexus_repo }
1152 __nexus_docker_repo__: { get_param: nexus_docker_repo }
1153 __nexus_username__: { get_param: nexus_username }
1154 __nexus_password__: { get_param: nexus_password }
1155 __gitlab_username__: { get_param: gitlab_username }
1156 __gitlab_password__: { get_param: gitlab_password }
1157 __dmaap_topic__: { get_param: dmaap_topic }
1158 __artifacts_version__: { get_param: artifacts_version }
1159 __docker_version__: { get_param: docker_version }
1163 # DNS/GW IP address configuration
1165 echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
1166 echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
1169 # Download dependencies
1170 add-apt-repository -y ppa:openjdk-r/ppa
1172 apt-get install -y apt-transport-https ca-certificates wget openjdk-7-jdk ntp ntpdate
1174 # Download scripts from Nexus
1175 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_vm_init.sh -o /opt/appc_vm_init.sh
1176 curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_serv.sh -o /opt/appc_serv.sh
1177 chmod +x /opt/appc_vm_init.sh
1178 chmod +x /opt/appc_serv.sh
1179 mv /opt/appc_serv.sh /etc/init.d
1180 update-rc.d appc_serv.sh defaults
1182 # Download and install docker-engine and docker-compose
1183 apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
1184 echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
1186 apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
1187 apt-get install -y docker-engine
1188 service docker start
1191 curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
1192 chmod +x /opt/docker/docker-compose
1194 # Store credentials in files
1195 mkdir -p /opt/config
1196 echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
1197 echo "__nexus_username__" > /opt/config/nexus_username.txt
1198 echo "__nexus_password__" > /opt/config/nexus_password.txt
1199 echo "__gitlab_username__" > /opt/config/gitlab_username.txt
1200 echo "__gitlab_password__" > /opt/config/gitlab_password.txt
1201 echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
1202 echo "__docker_version__" > /opt/config/docker_version.txt
1204 # Run docker-compose to spin up containers
1206 git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/appc/deployment.git appc