heat_template_version: 2013-05-23
-description: Heat template to deploy OpenECOMP components
+description: Heat template to deploy ONAP components
parameters:
- # Generic parameters used across all OpenECOMP components
+ # Generic parameters used across all ONAP components
public_net_id:
type: string
label: Public network name or ID
artifacts_version:
type: string
label: Artifacts Version
- description: Artifacts version of OpenECOMP components
+ description: Artifacts version of ONAP components
+
+ docker_version:
+ type: string
+ label: Docker Version
+ description: Docker version of ONAP docker images
+ gerrit_branch:
+ type: string
+ label: Gerrit code branch
+ description: Gerrit branch where to download the code from
# Parameters for DCAE instantiation
dcae_zone:
properties:
length: 4
- # Public key used to access OpenECOMP components
+ # Public key used to access ONAP components
vm_key:
type: OS::Nova::KeyPair
properties:
save_private_key: false
- # OpenECOMP management private network
+ # ONAP management private network
oam_ecomp:
type: OS::Neutron::Net
properties:
rand: { get_resource: random-str }
network_id: { get_resource: oam_ecomp }
cidr: 10.0.0.0/8
- value: { get_attr: [oam_ecomp, name] }
+ #value: { get_attr: [oam_ecomp, name] }
# DNS Server instantiation
str_replace:
params:
__nexus_repo__: { get_param: nexus_repo }
- __nexus_docker_repo__: { get_param: nexus_docker_repo }
- __nexus_username__: { get_param: nexus_username }
- __nexus_password__: { get_param: nexus_password }
- __gitlab_username__: { get_param: gitlab_username }
- __gitlab_password__: { get_param: gitlab_password }
__artifacts_version__: { get_param: artifacts_version }
template: |
#!/bin/bash
__gitlab_password__: { get_param: gitlab_password }
__dmaap_topic__: { get_param: dmaap_topic }
__artifacts_version__: { get_param: artifacts_version }
+ __docker_version__: { get_param: docker_version }
template: |
#!/bin/bash
echo "__gitlab_username__" > /opt/config/gitlab_username.txt
echo "__gitlab_password__" > /opt/config/gitlab_password.txt
echo "gerrit.openecomp.org" > /opt/config/gitlab_certname.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
+
# Execute docker instructions
cd /opt
./aai_vm_init.sh
__openstack_api_key__: { get_param: openstack_api_key }
__dmaap_topic__: { get_param: dmaap_topic }
__artifacts_version__: { get_param: artifacts_version }
+ __docker_version__: { get_param: docker_version }
+ __gerrit_branch__: { get_param: gerrit_branch }
template: |
#!/bin/bash
echo "__openstack_username__" > /opt/config/openstack_username.txt
echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
-
+ echo "__docker_version__" > /opt/config/docker_version.txt
# Run docker-compose to spin up containers
cd /opt
- git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/mso/docker-config.git test_lab
+ git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/mso/docker-config.git test_lab
MSO_ENCRYPTION_KEY=$(cat /opt/test_lab/encryption.key)
echo -n "__openstack_api_key__" | openssl aes-128-ecb -e -K $MSO_ENCRYPTION_KEY -nosalt | xxd -c 256 -p > /opt/config/api_key.txt
./mso_vm_init.sh
__gitlab_username__: { get_param: gitlab_username }
__gitlab_password__: { get_param: gitlab_password }
__artifacts_version__: { get_param: artifacts_version }
+ __gerrit_branch__: { get_param: gerrit_branch }
template: |
#!/bin/bash
# Run docker-compose to spin up containers
cd /opt
- git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/dcae/demo/startup/message-router.git dcae-startup-vm-message-router
+ 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
./mr_vm_init.sh
__openstack_password__: { get_param: openstack_password }
__artifacts_version__: { get_param: artifacts_version }
__openstack_region__: { get_param: openstack_region }
+ __docker_version__: { get_param: docker_version }
+ __gerrit_branch__: { get_param: gerrit_branch }
template: |
#!/bin/bash
add-apt-repository -y ppa:openjdk-r/ppa
apt-get update
apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk ntp ntpdate
+ echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic
# Download scripts from Nexus
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_vm_init.sh -o /opt/robot_vm_init.sh
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y docker-engine
- #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
service docker start
mkdir /opt/docker
echo "__openstack_password__" > /opt/config/openstack_password.txt
echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
echo "__openstack_region__" > /opt/config/region.txt
+ echo "__artifacts_version__" > /opt/config/artifacts_version.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
# Execute RobotETE-specific instructions: create share folder to run as a docker volume
mkdir -p /opt/eteshare/logs
# Run docker-compose to spin up containers
cd /opt
- git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/testsuite/properties.git testsuite/properties
+ git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/testsuite/properties.git testsuite/properties
./robot_vm_init.sh
__gitlab_username__: { get_param: gitlab_username }
__gitlab_password__: { get_param: gitlab_password }
__artifacts_version__: { get_param: artifacts_version }
+ __docker_version__: { get_param: docker_version }
+ __gerrit_branch__: { get_param: gerrit_branch }
template: |
#!/bin/bash
echo "__nexus_password__" > /opt/config/nexus_password.txt
echo "__gitlab_username__" > /opt/config/gitlab_username.txt
echo "__gitlab_password__" > /opt/config/gitlab_password.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
# Run script to spin up containers
cd /opt
- git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/vid.git
+ git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/vid.git
./vid_vm_init.sh
__gitlab_username__: { get_param: gitlab_username }
__gitlab_password__: { get_param: gitlab_password }
__artifacts_version__: { get_param: artifacts_version }
+ __docker_version__: { get_param: docker_version }
+ __gerrit_branch__: { get_param: gerrit_branch }
template: |
#!/bin/bash
echo "__nexus_password__" > /opt/config/nexus_password.txt
echo "__gitlab_username__" > /opt/config/gitlab_username.txt
echo "__gitlab_password__" > /opt/config/gitlab_password.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
# Run docker-compose to spin up containers
cd /opt
- git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/sdnc/oam.git sdnc
+ git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/sdnc/oam.git sdnc
./sdnc_vm_init.sh
__gitlab_password__: { get_param: gitlab_password }
__env_name__: { get_param: dmaap_topic }
__artifacts_version__: { get_param: artifacts_version }
+ __docker_version__: { get_param: docker_version }
+ __gerrit_branch__: { get_param: gerrit_branch }
template: |
#!/bin/bash
+
# DNS/GW IP address configuration
mkdir /opt/config
echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
chmod +x /opt/docker/docker-compose
# Create partition and mount the external volume
- curl --user '__nexus_username__:__nexus_password__' __nexus_repo__/org.openecomp.boot/asdc_ext_volume_partitions.txt -o /opt/asdc_ext_volume_partitions.txt
+ curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_ext_volume_partitions.txt -o /opt/asdc_ext_volume_partitions.txt
sfdisk /dev/xvdb < /opt/asdc_ext_volume_partitions.txt
mkfs -t ext4 /dev/xvdb1
mkdir -p /data
echo "__gitlab_username__" > /opt/config/gitlab_username.txt
echo "__gitlab_password__" > /opt/config/gitlab_password.txt
echo "__env_name__" > /opt/config/env_name.txt
+ echo "10.0.11.1" > /opt/config/mr_ip_addr.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
# Run SDC-specific instructions
cd /opt
mkdir -p /data/scripts
mkdir -p /data/logs/BE
mkdir -p /data/logs/FE
- chmod 775 /data
- chmod 775 /data/logs/BE
- chmod 775 /data/logs/FE
+ chmod 777 /data
+ chmod 777 /data/logs/BE
+ chmod 777 /data/logs/FE
- git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/sdc.git
+ git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/sdc.git
cat > /root/.bash_aliases << EOF
alias dcls='/data/scripts/docker_clean.sh \$1'
__gitlab_username__: { get_param: gitlab_username }
__gitlab_password__: { get_param: gitlab_password }
__artifacts_version__: { get_param: artifacts_version }
+ __docker_version__: { get_param: docker_version }
+ __gerrit_branch__: { get_param: gerrit_branch }
template: |
#!/bin/bash
+
# DNS/GW IP address configuration
mkdir /opt/config
echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
echo "__nexus_password__" > /opt/config/nexus_password.txt
echo "__gitlab_username__" > /opt/config/gitlab_username.txt
echo "__gitlab_password__" > /opt/config/gitlab_password.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
# Run Portal-specific instructions
mkdir -p /PROJECT/OpenSource/UbuntuEP/logs
cd /opt
- git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/portal.git
+ git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/portal.git
# Run docker-compose to spin up containers
./portal_vm_init.sh
__pub_key__: { get_param: pub_key }
__nexus_repo_root__: { get_param: nexus_repo_root }
__openstack_region__: { get_param: openstack_region }
+ __docker_version__: { get_param: docker_version }
+ __gerrit_branch__: { get_param: gerrit_branch }
template: |
#!/bin/bash
+
# DNS/GW IP address configuration
echo "nameserver 10.0.0.1" >> /etc/resolvconf/resolv.conf.d/head
resolvconf -u
# DCAE Controller specific deployment
cd /opt
- git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/dcae/demo/startup/controller.git dcae-startup-vm-controller
+ 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
cd dcae-startup-vm-controller
mkdir -p /opt/app/dcae-controller
cat > /opt/app/dcae-controller/config.yaml << EOF_CONFIG
ZONE: __dcae_zone__
STATE: __dcae_state__
- DCAE-VERSION: 0.1.0-SNAPSHOT
+ DCAE-VERSION: __artifacts_version__
HORIZON-URL: https://mycloud.rackspace.com/cloud/__tenant_id__
KEYSTONE-URL: https://identity.api.rackspacecloud.com/v2.0
OPENSTACK-TENANT-ID: __tenant_id__
echo "__gitlab_username__" > /opt/config/gitlab_username.txt
echo "__gitlab_password__" > /opt/config/gitlab_password.txt
echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
cd /opt
./dcae_vm_init.sh
__gitlab_username__: { get_param: gitlab_username }
__gitlab_password__: { get_param: gitlab_password }
__artifacts_version__: { get_param: artifacts_version }
+ __docker_version__: { get_param: docker_version }
+ __gerrit_branch__: { get_param: gerrit_branch }
template: |
#!/bin/bash
+
# DNS/GW IP address configuration
mkdir /opt/config
echo "10.0.0.1" > /opt/config/dns_gw_ip.txt
echo "__nexus_password__" > /opt/config/nexus_password.txt
echo "__gitlab_username__" > /opt/config/gitlab_username.txt
echo "__gitlab_password__" > /opt/config/gitlab_password.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
# Run docker-compose to spin up containers
cd /opt
- git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/policy/docker.git policy
+ git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/policy/docker.git policy
./policy_vm_init.sh
__gitlab_password__: { get_param: gitlab_password }
__dmaap_topic__: { get_param: dmaap_topic }
__artifacts_version__: { get_param: artifacts_version }
+ __docker_version__: { get_param: docker_version }
+ __gerrit_branch__: { get_param: gerrit_branch }
template: |
#!/bin/bash
echo "__gitlab_username__" > /opt/config/gitlab_username.txt
echo "__gitlab_password__" > /opt/config/gitlab_password.txt
echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
# Run docker-compose to spin up containers
cd /opt
- git clone https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/appc/deployment.git appc
+ git clone -b __gerrit_branch__ --single-branch https://__gitlab_username__:__gitlab_password__@gerrit.openecomp.org/r/a/appc/deployment.git appc
./appc_vm_init.sh