aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-08-03 07:56:14 -0700
committerGary Wu <gary.i.wu@huawei.com>2018-08-06 08:20:47 -0700
commitb9a2a29a9e1e93cd04bfa46f9ed66a2117ef56e5 (patch)
treebcf2b80a434326360f3ce1ec0d64110d5b09e1e8
parent16509432a21feb3f90bbf954ec4815c2bf7f0033 (diff)
Refactor ONAP HEAT template config, part 2
Change-Id: Ic4930654395ec9e9d57836733cd47e7a3b0bf972 Issue-ID: INT-605 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
-rw-r--r--boot/imagetest.sh20
-rw-r--r--heat/ONAP/cloud-config/aaf_install.sh58
-rw-r--r--heat/ONAP/cloud-config/aaf_vm_init.sh (renamed from boot/aaf_vm_init.sh)0
-rw-r--r--heat/ONAP/cloud-config/aai_install.sh59
-rw-r--r--heat/ONAP/cloud-config/aai_vm_init.sh (renamed from boot/aai_vm_init.sh)0
-rw-r--r--heat/ONAP/cloud-config/appc_install.sh59
-rw-r--r--heat/ONAP/cloud-config/appc_vm_init.sh (renamed from boot/appc_vm_init.sh)0
-rw-r--r--heat/ONAP/cloud-config/clamp_install.sh59
-rw-r--r--heat/ONAP/cloud-config/clamp_vm_init.sh (renamed from boot/clamp_vm_init.sh)0
-rw-r--r--heat/ONAP/cloud-config/dbcl_vm_init.sh (renamed from boot/dbcl_vm_init.sh)0
-rw-r--r--[-rwxr-xr-x]heat/ONAP/cloud-config/dcae2_install.sh60
-rw-r--r--heat/ONAP/cloud-config/dns_install.sh34
-rw-r--r--heat/ONAP/cloud-config/mr_install.sh61
-rw-r--r--heat/ONAP/cloud-config/mr_vm_init.sh (renamed from boot/mr_vm_init.sh)0
-rw-r--r--heat/ONAP/cloud-config/msb_vm_init.sh (renamed from boot/msb_vm_init.sh)0
-rw-r--r--heat/ONAP/cloud-config/music_install.sh59
-rw-r--r--heat/ONAP/cloud-config/music_vm_init.sh (renamed from boot/music_vm_init.sh)0
-rw-r--r--heat/ONAP/cloud-config/nbi_install.sh61
-rw-r--r--heat/ONAP/cloud-config/nbi_vm_init.sh (renamed from boot/nbi_vm_init.sh)0
-rw-r--r--heat/ONAP/cloud-config/oof_install.sh59
-rw-r--r--heat/ONAP/cloud-config/oof_vm_init.sh (renamed from boot/oof_vm_init.sh)0
-rw-r--r--heat/ONAP/cloud-config/openo_all_serv.sh (renamed from boot/openo_all_serv.sh)0
-rw-r--r--heat/ONAP/cloud-config/openo_install.sh75
-rw-r--r--heat/ONAP/cloud-config/policy_install.sh59
-rw-r--r--heat/ONAP/cloud-config/policy_vm_init.sh (renamed from boot/policy_vm_init.sh)0
-rw-r--r--heat/ONAP/cloud-config/portal_install.sh59
-rw-r--r--[-rwxr-xr-x]heat/ONAP/cloud-config/portal_vm_init.sh (renamed from boot/portal_vm_init.sh)0
-rw-r--r--heat/ONAP/cloud-config/robot_install.sh65
-rw-r--r--heat/ONAP/cloud-config/robot_vm_init.sh (renamed from boot/robot_vm_init.sh)0
-rw-r--r--heat/ONAP/cloud-config/sdc_install.sh66
-rw-r--r--heat/ONAP/cloud-config/sdc_vm_init.sh (renamed from boot/sdc_vm_init.sh)0
-rw-r--r--heat/ONAP/cloud-config/sdc_wfd_vm_init.sh (renamed from boot/sdc_wfd_vm_init.sh)0
-rw-r--r--heat/ONAP/cloud-config/sdnc_install.sh59
-rw-r--r--heat/ONAP/cloud-config/sdnc_vm_init.sh (renamed from boot/sdnc_vm_init.sh)2
-rw-r--r--heat/ONAP/cloud-config/serv.sh (renamed from boot/serv.sh)4
-rw-r--r--heat/ONAP/cloud-config/sms_install.sh59
-rw-r--r--heat/ONAP/cloud-config/sms_vm_init.sh (renamed from boot/sms_vm_init.sh)0
-rw-r--r--heat/ONAP/cloud-config/so_install.sh59
-rw-r--r--heat/ONAP/cloud-config/so_vm_init.sh (renamed from boot/so_vm_init.sh)0
-rw-r--r--heat/ONAP/cloud-config/vid_install.sh59
-rw-r--r--heat/ONAP/cloud-config/vid_vm_init.sh (renamed from boot/vid_vm_init.sh)0
-rw-r--r--heat/ONAP/onap_openstack.yaml277
42 files changed, 308 insertions, 1124 deletions
diff --git a/boot/imagetest.sh b/boot/imagetest.sh
deleted file mode 100644
index edd6154e..00000000
--- a/boot/imagetest.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
-HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
-
-image=$(cat /etc/issue | cut -d' ' -f2 | cut -c1-5)
-echo $image
-if [ ${image} == '16.04' ]
-then
- echo "[Service]" > /etc/systemd/system/docker.service.d/http-proxy.conf
- echo "Environment=\"http_proxy=http://\"$HTTP_PROXY\"" >> /etc/systemd/system/docker.service.d/http-proxy.conf
- echo "Environment=\"https_proxy=https://\"$HTTPS_PROXY\"" >>/etc/systemd/system/docker.service.d/http-proxy.conf
- echo "Environment=\"HTTP_PROXY=HTTP://\"$HTTP_PROXY\"" >>/etc/systemd/system/docker.service.d/http-proxy.conf
- echo "Environment=\"HTTPS_PROXY=HTTPS://\"$HTTPS_PROXY\"" >>/etc/systemd/system/docker.service.d/http-proxy.conf
-elif [ ${image} == '14.04' ]
-then
- echo " export http_proxy=$HTTP_PROXY " > /etc/default/docker
- echo " export https_proxy=$HTTPS_PROXY " >> /etc/default/docker
-else echo " It's not a 16 nor a 14 Ubuntu image"
-fi
diff --git a/heat/ONAP/cloud-config/aaf_install.sh b/heat/ONAP/cloud-config/aaf_install.sh
index 171592ce..a164c042 100644
--- a/heat/ONAP/cloud-config/aaf_install.sh
+++ b/heat/ONAP/cloud-config/aaf_install.sh
@@ -1,11 +1,7 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
-CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
CODE_REPO=$(cat /opt/config/remote_repo.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -17,67 +13,15 @@ then
fi
-# Add host name to /etc/host to avoid warnings in openstack images
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
-
# Download dependencies
echo "deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list
echo "deb-src http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list
apt-get update
-apt-get install --allow-unauthenticated -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make maven
+apt-get install --allow-unauthenticated -y openjdk-8-jdk maven
# Download scripts from Nexus
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip aaf_vm_init.sh > /opt/aaf_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/aaf_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
-chmod +x /opt/imagetest.sh
-chmod +x /opt/aaf_vm_init.sh
-chmod +x /opt/aaf_serv.sh
-sed -i "s|cmd=\"\"|cmd=\"./aaf_vm_init.sh\"|g" /opt/aaf_serv.sh
-mv /opt/aaf_serv.sh /etc/init.d
update-rc.d aaf_serv.sh defaults
-# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | tee /etc/apt/sources.list.d/docker.list
-apt-get update
-apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
-apt-get install -y --allow-unauthenticated docker-engine
-
-mkdir /opt/docker
-curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
-chmod +x /opt/docker/docker-compose
-
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
-service docker restart
-
-# DNS IP address configuration
-echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
# Clone Gerrit repository and run docker containers
cd /opt
diff --git a/boot/aaf_vm_init.sh b/heat/ONAP/cloud-config/aaf_vm_init.sh
index a388bf2f..a388bf2f 100644
--- a/boot/aaf_vm_init.sh
+++ b/heat/ONAP/cloud-config/aaf_vm_init.sh
diff --git a/heat/ONAP/cloud-config/aai_install.sh b/heat/ONAP/cloud-config/aai_install.sh
index b238fd6e..feaf7f3c 100644
--- a/heat/ONAP/cloud-config/aai_install.sh
+++ b/heat/ONAP/cloud-config/aai_install.sh
@@ -1,12 +1,8 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
-CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
AAI_INSTANCE=$(cat /opt/config/aai_instance.txt)
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
CODE_REPO=$(cat /opt/config/remote_repo.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -17,65 +13,10 @@ then
export https_proxy=$HTTPS_PROXY
fi
-# Add host name to /etc/host to avoid warnings in openstack images
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
-
-# Download dependencies
-apt-get update
-apt-get install -y apt-transport-https ca-certificates wget git ntp ntpdate make
# Download scripts from Nexus
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip aai_vm_init.sh > /opt/aai_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/aai_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
-chmod +x /opt/imagetest.sh
-chmod +x /opt/aai_vm_init.sh
-chmod +x /opt/aai_serv.sh
-sed -i "s|cmd=\"\"|cmd=\"./aai_vm_init.sh\"|g" /opt/aai_serv.sh
-mv /opt/aai_serv.sh /etc/init.d
update-rc.d aai_serv.sh defaults
-# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
-apt-get update
-apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
-apt-get install -y --allow-unauthenticated docker-engine
-
-mkdir /opt/docker
-curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
-chmod +x /opt/docker/docker-compose
-
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
-service docker restart
-
-# DNS IP address configuration
-echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
# Run docker containers
cd /opt
diff --git a/boot/aai_vm_init.sh b/heat/ONAP/cloud-config/aai_vm_init.sh
index ffe0955f..ffe0955f 100644
--- a/boot/aai_vm_init.sh
+++ b/heat/ONAP/cloud-config/aai_vm_init.sh
diff --git a/heat/ONAP/cloud-config/appc_install.sh b/heat/ONAP/cloud-config/appc_install.sh
index e871bfc1..e9731f71 100644
--- a/heat/ONAP/cloud-config/appc_install.sh
+++ b/heat/ONAP/cloud-config/appc_install.sh
@@ -1,11 +1,7 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
-CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
CODE_REPO=$(cat /opt/config/remote_repo.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -16,65 +12,10 @@ then
export https_proxy=$HTTPS_PROXY
fi
-# Add host name to /etc/host to avoid warnings in openstack images
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
-
-# Download dependencies
-apt-get update
-apt-get install -y apt-transport-https ca-certificates wget git ntp ntpdate make
# Download scripts from Nexus
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip appc_vm_init.sh > /opt/appc_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/appc_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
-chmod +x /opt/imagetest.sh
-chmod +x /opt/appc_vm_init.sh
-chmod +x /opt/appc_serv.sh
-sed -i "s|cmd=\"\"|cmd=\"./appc_vm_init.sh\"|g" /opt/appc_serv.sh
-mv /opt/appc_serv.sh /etc/init.d
update-rc.d appc_serv.sh defaults
-# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
-apt-get update
-apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
-apt-get install -y --allow-unauthenticated docker-engine
-
-mkdir /opt/docker
-curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
-chmod +x /opt/docker/docker-compose
-
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
-service docker restart
-
-# DNS IP address configuration
-echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
# Clone Gerrit repository and run docker containers
cd /opt
diff --git a/boot/appc_vm_init.sh b/heat/ONAP/cloud-config/appc_vm_init.sh
index 647e9597..647e9597 100644
--- a/boot/appc_vm_init.sh
+++ b/heat/ONAP/cloud-config/appc_vm_init.sh
diff --git a/heat/ONAP/cloud-config/clamp_install.sh b/heat/ONAP/cloud-config/clamp_install.sh
index ffe4d14e..1a45119c 100644
--- a/heat/ONAP/cloud-config/clamp_install.sh
+++ b/heat/ONAP/cloud-config/clamp_install.sh
@@ -1,11 +1,7 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
-CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
CODE_REPO=$(cat /opt/config/remote_repo.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -16,65 +12,10 @@ then
export https_proxy=$HTTPS_PROXY
fi
-# Add host name to /etc/host to avoid warnings in openstack images
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
-
-# Download dependencies
-apt-get update
-apt-get install -y apt-transport-https ca-certificates wget git ntp ntpdate make
# Download scripts from Nexus
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip clamp_vm_init.sh > /opt/clamp_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/clamp_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
-chmod +x /opt/imagetest.sh
-chmod +x /opt/clamp_vm_init.sh
-chmod +x /opt/clamp_serv.sh
-sed -i "s|cmd=\"\"|cmd=\"./clamp_vm_init.sh\"|g" /opt/clamp_serv.sh
-mv /opt/clamp_serv.sh /etc/init.d
update-rc.d clamp_serv.sh defaults
-# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
-apt-get update
-apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
-apt-get install -y --allow-unauthenticated docker-engine
-
-mkdir /opt/docker
-curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
-chmod +x /opt/docker/docker-compose
-
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
-service docker restart
-
-# DNS IP address configuration
-echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
# Clone Gerrit repository and run docker containers
cd /opt
diff --git a/boot/clamp_vm_init.sh b/heat/ONAP/cloud-config/clamp_vm_init.sh
index f8b26e30..f8b26e30 100644
--- a/boot/clamp_vm_init.sh
+++ b/heat/ONAP/cloud-config/clamp_vm_init.sh
diff --git a/boot/dbcl_vm_init.sh b/heat/ONAP/cloud-config/dbcl_vm_init.sh
index 08cc3f10..08cc3f10 100644
--- a/boot/dbcl_vm_init.sh
+++ b/heat/ONAP/cloud-config/dbcl_vm_init.sh
diff --git a/heat/ONAP/cloud-config/dcae2_install.sh b/heat/ONAP/cloud-config/dcae2_install.sh
index d0f5fd6e..a4fd556a 100755..100644
--- a/heat/ONAP/cloud-config/dcae2_install.sh
+++ b/heat/ONAP/cloud-config/dcae2_install.sh
@@ -19,9 +19,6 @@
set -ex
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
-CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
EXTERNAL_DNS=$(cat /opt/config/external_dns.txt)
MAC_ADDR=$(cat /opt/config/mac_addr.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
@@ -33,65 +30,18 @@ then
export https_proxy=$HTTPS_PROXY
fi
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
-
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- # Add host name to /etc/host to avoid warnings in openstack images
- echo "127.0.0.1 $(hostname)" >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
# Download dependencies
apt-get update
-#apt-get install -y apt-transport-https ca-certificates wget make git ntp ntpdate python python-pip
-apt-get install -y apt-transport-https ca-certificates wget git ntp ntpdate python python-pip
+apt-get install -y python python-pip
# Download scripts from Nexus
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip dcae2_vm_init.sh > /opt/dcae2_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/dcae2_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
-chmod +x /opt/imagetest.sh
+cp /opt/boot/dcae2_vm_init.sh /opt/dcae2_vm_init.sh
chmod +x /opt/dcae2_vm_init.sh
-chmod +x /opt/dcae2_serv.sh
-sed -i "s|cmd=\"\"|cmd=\"./dcae2_vm_init.sh\"|g" /opt/dcae2_serv.sh
-mv /opt/dcae2_serv.sh /etc/init.d
update-rc.d dcae2_serv.sh defaults
-# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
-apt-get update
-apt-get install -y "linux-image-extra-$(uname -r)" linux-image-extra-virtual jq
-apt-get install -y --allow-unauthenticated docker-engine
-
-mkdir -p /opt/docker
-curl -L "https://github.com/docker/compose/releases/download/1.9.0/docker-compose-$(uname -s)-$(uname -m)" > /opt/docker/docker-compose
-chmod +x /opt/docker/docker-compose
-
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may
-# need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU --raw-logs -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
+echo "DOCKER_OPTS=\"\$DOCKER_OPTS --raw-logs -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock\"" >> /etc/default/docker
sed -i "/ExecStart/s/$/ -H tcp:\/\/0.0.0.0:2376 --raw-logs/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
systemctl daemon-reload
service docker restart
@@ -99,10 +49,6 @@ service docker restart
echo "$(cat /opt/config/dcae_ip_addr.txt) consul" >>/etc/hosts
echo "$(cat /opt/config/dcae_ip_addr.txt) dockerhost" >>/etc/hosts
-# DNS IP address configuration
-echo "nameserver $DNS_IP_ADDR" >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
-
# prepare the configurations needed by DCAEGEN2 installer
rm -rf /opt/app/config
mkdir -p /opt/app/config
diff --git a/heat/ONAP/cloud-config/dns_install.sh b/heat/ONAP/cloud-config/dns_install.sh
index 1f940ac3..b277e6dc 100644
--- a/heat/ONAP/cloud-config/dns_install.sh
+++ b/heat/ONAP/cloud-config/dns_install.sh
@@ -1,7 +1,6 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -15,33 +14,24 @@ fi
if [[ $CLOUD_ENV != "rackspace" ]]
then
- # Add host name to /etc/host to avoid warnings in openstack images
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-
- # Set the Bind configuration file name based on the deployment environment
- ZONE_FILE="bind_zones"
- ZONE_ONAP="bind_zones_onap"
- OPTIONS_FILE="bind_options"
+ # Set the Bind configuration file name based on the deployment environment
+ ZONE_FILE="bind_zones"
+ ZONE_ONAP="bind_zones_onap"
+ OPTIONS_FILE="bind_options"
else
- ZONE_FILE="db_simpledemo_openecomp_org"
- ZONE_ONAP="db_simpledemo_onap_org"
- OPTIONS_FILE="named.conf.options"
+ ZONE_FILE="db_simpledemo_openecomp_org"
+ ZONE_ONAP="db_simpledemo_onap_org"
+ OPTIONS_FILE="named.conf.options"
fi
-# Download dependencies
-apt-get update
-apt-get install -y apt-transport-https ca-certificates wget bind9 bind9utils bind9-doc ntp ntpdate make
+apt-get install -y bind9 bind9utils bind9-doc
# Download script
mkdir /etc/bind/zones
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip $ZONE_FILE > /etc/bind/zones/db.simpledemo.openecomp.org
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip $ZONE_ONAP > /etc/bind/zones/db.simpledemo.onap.org
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip $OPTIONS_FILE > /etc/bind/named.conf.options
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip named.conf.local > /etc/bind/named.conf.local
+cp /opt/boot/$ZONE_FILE /etc/bind/zones/db.simpledemo.openecomp.org
+cp /opt/boot/$ZONE_ONAP /etc/bind/zones/db.simpledemo.onap.org
+cp /opt/boot/$OPTIONS_FILE /etc/bind/named.conf.options
+cp /opt/boot/named.conf.local /etc/bind/named.conf.local
# Set the private IP address of each ONAP VM in the Bind configuration in OpenStack deployments
if [[ $CLOUD_ENV != "rackspace" ]]
diff --git a/heat/ONAP/cloud-config/mr_install.sh b/heat/ONAP/cloud-config/mr_install.sh
index b7573589..f2906970 100644
--- a/heat/ONAP/cloud-config/mr_install.sh
+++ b/heat/ONAP/cloud-config/mr_install.sh
@@ -1,11 +1,7 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
-CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
CODE_REPO=$(cat /opt/config/remote_repo.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -16,70 +12,13 @@ then
export https_proxy=$HTTPS_PROXY
fi
-# Add host name to /etc/host to avoid warnings in openstack images
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
-
-# Download dependencies
-apt-get update
-apt-get install -y apt-transport-https ca-certificates wget make git ntp ntpdate
# Download scripts from Nexus
# a) scripts for message router (mr)
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip mr_vm_init.sh > /opt/mr_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/mr_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
-chmod +x /opt/imagetest.sh
-chmod +x /opt/mr_vm_init.sh
-chmod +x /opt/mr_serv.sh
-sed -i "s|cmd=\"\"|cmd=\"./mr_vm_init.sh\"|g" /opt/mr_serv.sh
-mv /opt/mr_serv.sh /etc/init.d
update-rc.d mr_serv.sh defaults
# b) scripts for bus controller (dbcl)
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip dbcl_vm_init.sh > /opt/dbcl_vm_init.sh
-chmod +x /opt/dbcl_vm_init.sh
-
-# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
-apt-get update
-apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
-apt-get install -y --allow-unauthenticated docker-engine
-
-mkdir /opt/docker
-curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
-chmod +x /opt/docker/docker-compose
-
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
-service docker restart
-# DNS IP address configuration
-echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
# Clone Gerrit repository and run docker containers
cd /opt
diff --git a/boot/mr_vm_init.sh b/heat/ONAP/cloud-config/mr_vm_init.sh
index 78d61f8a..78d61f8a 100644
--- a/boot/mr_vm_init.sh
+++ b/heat/ONAP/cloud-config/mr_vm_init.sh
diff --git a/boot/msb_vm_init.sh b/heat/ONAP/cloud-config/msb_vm_init.sh
index 938a3d6d..938a3d6d 100644
--- a/boot/msb_vm_init.sh
+++ b/heat/ONAP/cloud-config/msb_vm_init.sh
diff --git a/heat/ONAP/cloud-config/music_install.sh b/heat/ONAP/cloud-config/music_install.sh
index 84ba5629..38aaa71c 100644
--- a/heat/ONAP/cloud-config/music_install.sh
+++ b/heat/ONAP/cloud-config/music_install.sh
@@ -1,11 +1,7 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
-CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
CODE_REPO=$(cat /opt/config/remote_repo.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -16,65 +12,10 @@ then
export https_proxy=$HTTPS_PROXY
fi
-# Add host name to /etc/host to avoid warnings in openstack images
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
-
-# Download dependencies
-apt-get update
-apt-get install -y apt-transport-https ca-certificates wget git ntp ntpdate make
# Download scripts from Nexus
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip music_vm_init.sh > /opt/music_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/music_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
-chmod +x /opt/imagetest.sh
-chmod +x /opt/music_vm_init.sh
-chmod +x /opt/music_serv.sh
-sed -i "s|cmd=\"\"|cmd=\"./music_vm_init.sh\"|g" /opt/music_serv.sh
-mv /opt/music_serv.sh /etc/init.d
update-rc.d music_serv.sh defaults
-# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | tee /etc/apt/sources.list.d/docker.list
-apt-get update
-apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
-apt-get install -y --allow-unauthenticated docker-engine
-
-mkdir /opt/docker
-curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
-chmod +x /opt/docker/docker-compose
-
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
-service docker restart
-
-# DNS IP address configuration
-echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
# Clone Gerrit repository and run docker containers
cd /opt
diff --git a/boot/music_vm_init.sh b/heat/ONAP/cloud-config/music_vm_init.sh
index 2241ed13..2241ed13 100644
--- a/boot/music_vm_init.sh
+++ b/heat/ONAP/cloud-config/music_vm_init.sh
diff --git a/heat/ONAP/cloud-config/nbi_install.sh b/heat/ONAP/cloud-config/nbi_install.sh
index 7705a25a..4e40f782 100644
--- a/heat/ONAP/cloud-config/nbi_install.sh
+++ b/heat/ONAP/cloud-config/nbi_install.sh
@@ -1,11 +1,7 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
-CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
CODE_REPO=$(cat /opt/config/remote_repo.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -16,67 +12,10 @@ then
export https_proxy=$HTTPS_PROXY
fi
-# Add host name to /etc/host to avoid warnings in openstack images
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
-
-apt-get update
-apt-get install -y apt-transport-https ca-certificates curl git ntp ntpdate make software-properties-common
# Download scripts from Nexus
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip nbi_vm_init.sh > /opt/nbi_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/nbi_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
-chmod +x /opt/imagetest.sh
-chmod +x /opt/nbi_vm_init.sh
-chmod +x /opt/nbi_serv.sh
-sed -i "s|cmd=\"\"|cmd=\"./nbi_vm_init.sh\"|g" /opt/nbi_serv.sh
-mv /opt/nbi_serv.sh /etc/init.d
update-rc.d nbi_serv.sh defaults
-# Download and install docker-engine and docker-compose
-curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
-add-apt-repository \
- "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
- $(lsb_release -cs) \
- stable"
-apt-get update
-apt-get install -y docker-ce
-
-mkdir /opt/docker
-curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
-chmod +x /opt/docker/docker-compose
-
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
-service docker restart
-
-# DNS IP address configuration
-echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
# Run docker containers
cd /opt
diff --git a/boot/nbi_vm_init.sh b/heat/ONAP/cloud-config/nbi_vm_init.sh
index c626938e..c626938e 100644
--- a/boot/nbi_vm_init.sh
+++ b/heat/ONAP/cloud-config/nbi_vm_init.sh
diff --git a/heat/ONAP/cloud-config/oof_install.sh b/heat/ONAP/cloud-config/oof_install.sh
index d8eda1de..15987442 100644
--- a/heat/ONAP/cloud-config/oof_install.sh
+++ b/heat/ONAP/cloud-config/oof_install.sh
@@ -1,11 +1,7 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
-CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
CODE_REPO=$(cat /opt/config/remote_repo.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -16,65 +12,10 @@ then
export https_proxy=$HTTPS_PROXY
fi
-# Add host name to /etc/host to avoid warnings in openstack images
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
-
-# Download dependencies
-apt-get update
-apt-get install -y apt-transport-https ca-certificates wget git ntp ntpdate make
# Download scripts from Nexus
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip oof_vm_init.sh > /opt/oof_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/oof_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
-chmod +x /opt/imagetest.sh
-chmod +x /opt/oof_vm_init.sh
-chmod +x /opt/oof_serv.sh
-sed -i "s|cmd=\"\"|cmd=\"./oof_vm_init.sh\"|g" /opt/oof_serv.sh
-mv /opt/oof_serv.sh /etc/init.d
update-rc.d oof_serv.sh defaults
-# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
-apt-get update
-apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
-apt-get install -y --allow-unauthenticated docker-engine
-
-mkdir /opt/docker
-curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
-chmod +x /opt/docker/docker-compose
-
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
-service docker restart
-
-# DNS IP address configuration
-echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
# Clone Gerrit repository and run docker containers
cd /opt
diff --git a/boot/oof_vm_init.sh b/heat/ONAP/cloud-config/oof_vm_init.sh
index 4654ffbb..4654ffbb 100644
--- a/boot/oof_vm_init.sh
+++ b/heat/ONAP/cloud-config/oof_vm_init.sh
diff --git a/boot/openo_all_serv.sh b/heat/ONAP/cloud-config/openo_all_serv.sh
index 57de2908..57de2908 100644
--- a/boot/openo_all_serv.sh
+++ b/heat/ONAP/cloud-config/openo_all_serv.sh
diff --git a/heat/ONAP/cloud-config/openo_install.sh b/heat/ONAP/cloud-config/openo_install.sh
index 57e00949..e9150a27 100644
--- a/heat/ONAP/cloud-config/openo_install.sh
+++ b/heat/ONAP/cloud-config/openo_install.sh
@@ -1,11 +1,7 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
-CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
VNFSDK_BRANCH=$(cat /opt/config/vnfsdk_branch.txt)
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
VNFSDK_REPO=$(cat /opt/config/vnfsdk_repo.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -16,82 +12,29 @@ then
export https_proxy=$HTTPS_PROXY
fi
-# Add host name to /etc/host to avoid warnings in openstack images
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
-
# Download dependencies
apt-get update
-apt-get install -y apt-transport-https ca-certificates wget git unzip mysql-client-core-5.6 ntp ntpdate make
+apt-get install -y mysql-client-core-5.6
# Download scripts from Nexus
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip vnfsdk_vm_init.sh > /opt/vnfsdk_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip msb_vm_init.sh > /opt/msb_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip mvim_vm_init.sh > /opt/mvim_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip vfc_vm_init.sh > /opt/vfc_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip uui_vm_init.sh > /opt/uui_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip openo_all_serv.sh > /opt/openo_all_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/openo_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip cli_install.sh > /opt/cli_install.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip esr_vm_init.sh > /opt/esr_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
-chmod +x /opt/imagetest.sh
+cp /opt/boot/vnfsdk_vm_init.sh /opt/vnfsdk_vm_init.sh
+cp /opt/boot/msb_vm_init.sh /opt/msb_vm_init.sh
+cp /opt/boot/mvim_vm_init.sh /opt/mvim_vm_init.sh
+cp /opt/boot/vfc_vm_init.sh /opt/vfc_vm_init.sh
+cp /opt/boot/uui_vm_init.sh /opt/uui_vm_init.sh
+cp /opt/boot/openo_all_serv.sh /opt/openo_all_serv.sh
+cp /opt/boot/esr_vm_init.sh /opt/esr_vm_init.sh
chmod +x /opt/vnfsdk_vm_init.sh
chmod +x /opt/msb_vm_init.sh
chmod +x /opt/mvim_vm_init.sh
chmod +x /opt/vfc_vm_init.sh
chmod +x /opt/uui_vm_init.sh
chmod +x /opt/openo_all_serv.sh
-chmod +x /opt/openo_serv.sh
-chmod +x /opt/cli_install.sh
chmod +x /opt/esr_vm_init.sh
-sed -i "s|cmd=\"\"|cmd=\"./openo_all_serv.sh\"|g" /opt/openo_serv.sh
-mv /opt/openo_serv.sh /etc/init.d
update-rc.d openo_serv.sh defaults
-# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
-apt-get update
-apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
-apt-get install -y --allow-unauthenticated docker-engine
-
-mkdir /opt/docker
-curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
-chmod +x /opt/docker/docker-compose
-
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
-service docker restart
-
-# DNS IP address configuration
-echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
-
# Clone Gerrit repository and run docker containers
cd /opt
git clone -b $VNFSDK_BRANCH --single-branch $VNFSDK_REPO
source ./cli_install.sh
-./openo_all_serv.sh \ No newline at end of file
+./openo_all_serv.sh
diff --git a/heat/ONAP/cloud-config/policy_install.sh b/heat/ONAP/cloud-config/policy_install.sh
index c77323d1..43537c03 100644
--- a/heat/ONAP/cloud-config/policy_install.sh
+++ b/heat/ONAP/cloud-config/policy_install.sh
@@ -1,11 +1,7 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
-CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
CODE_REPO=$(cat /opt/config/remote_repo.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -16,65 +12,10 @@ then
export https_proxy=$HTTPS_PROXY
fi
-# Add host name to /etc/host to avoid warnings in openstack images
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
-
-# Download dependencies
-apt-get update
-apt-get install -y apt-transport-https ca-certificates wget git ntp ntpdate make
# Download scripts from Nexus
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip policy_vm_init.sh > /opt/policy_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/policy_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
-chmod +x /opt/imagetest.sh
-chmod +x /opt/policy_vm_init.sh
-chmod +x /opt/policy_serv.sh
-sed -i "s|cmd=\"\"|cmd=\"./policy_vm_init.sh\"|g" /opt/policy_serv.sh
-mv /opt/policy_serv.sh /etc/init.d
update-rc.d policy_serv.sh defaults
-# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
-apt-get update
-apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
-apt-get install -y --allow-unauthenticated docker-engine
-
-mkdir /opt/docker
-curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
-chmod +x /opt/docker/docker-compose
-
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
-service docker restart
-
-# DNS IP address configuration
-echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
# Clone Gerrit repository and run docker containers
cd /opt
diff --git a/boot/policy_vm_init.sh b/heat/ONAP/cloud-config/policy_vm_init.sh
index 12818402..12818402 100644
--- a/boot/policy_vm_init.sh
+++ b/heat/ONAP/cloud-config/policy_vm_init.sh
diff --git a/heat/ONAP/cloud-config/portal_install.sh b/heat/ONAP/cloud-config/portal_install.sh
index d052d655..7945d0e5 100644
--- a/heat/ONAP/cloud-config/portal_install.sh
+++ b/heat/ONAP/cloud-config/portal_install.sh
@@ -1,11 +1,7 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
-CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
CODE_REPO=$(cat /opt/config/remote_repo.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -16,65 +12,10 @@ then
export https_proxy=$HTTPS_PROXY
fi
-# Add host name to /etc/host to avoid warnings in openstack images
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
-
-# Download dependencies
-apt-get update
-apt-get install -y apt-transport-https ca-certificates wget git unzip mysql-client-core-5.6 ntp ntpdate make
# Download scripts from Nexus
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip portal_vm_init.sh > /opt/portal_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/portal_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
-chmod +x /opt/imagetest.sh
-chmod +x /opt/portal_vm_init.sh
-chmod +x /opt/portal_serv.sh
-sed -i "s|cmd=\"\"|cmd=\"./portal_vm_init.sh\"|g" /opt/portal_serv.sh
-mv /opt/portal_serv.sh /etc/init.d
update-rc.d portal_serv.sh defaults
-# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
-apt-get update
-apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
-apt-get install -y --allow-unauthenticated docker-engine
-
-mkdir /opt/docker
-curl -L https://github.com/docker/compose/releases/download/1.16.1/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
-chmod +x /opt/docker/docker-compose
-
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
-service docker restart
-
-# DNS IP address configuration
-echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
# Clone Gerrit repository and run docker containers
cd /opt
diff --git a/boot/portal_vm_init.sh b/heat/ONAP/cloud-config/portal_vm_init.sh
index 17640058..17640058 100755..100644
--- a/boot/portal_vm_init.sh
+++ b/heat/ONAP/cloud-config/portal_vm_init.sh
diff --git a/heat/ONAP/cloud-config/robot_install.sh b/heat/ONAP/cloud-config/robot_install.sh
index 7896ecde..3441dd85 100644
--- a/heat/ONAP/cloud-config/robot_install.sh
+++ b/heat/ONAP/cloud-config/robot_install.sh
@@ -1,10 +1,6 @@
#!/bin/bash -x
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
-CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -17,73 +13,22 @@ fi
# Short-term fix to get around MSO to SO name change
cp /opt/config/so_ip_addr.txt /opt/config/mso_ip_addr.txt
-# Add host name to /etc/host to avoid warnings in openstack images
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
-
-apt-get update
-apt-get install -y apt-transport-https ca-certificates wget git ntp ntpdate make
# Download scripts from Nexus
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip robot_vm_init.sh > /opt/robot_vm_init.sh
-chmod +x /opt/robot_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/robot_serv.sh
-chmod +x /opt/robot_serv.sh
-sed -i "s|cmd=\"\"|cmd=\"./robot_vm_init.sh\"|g" /opt/robot_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
-chmod +x /opt/imagetest.sh
-
mkdir -p /opt/eteshare/config
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip robot/integration_preload_parameters.py > /opt/eteshare/config/integration_preload_parameters.py
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip robot/integration_robot_properties.py > /opt/eteshare/config/integration_robot_properties.py
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip robot/vm_config2robot.sh > /opt/eteshare/config/vm_config2robot.sh
+cp /opt/boot/robot/integration_preload_parameters.py /opt/eteshare/config/integration_preload_parameters.py
+cp /opt/boot/robot/integration_robot_properties.py /opt/eteshare/config/integration_robot_properties.py
+cp /opt/boot/robot/vm_config2robot.sh /opt/eteshare/config/vm_config2robot.sh
chmod +x /opt/eteshare/config/vm_config2robot.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip robot/ete.sh > /opt/ete.sh
+cp /opt/boot/robot/ete.sh /opt/ete.sh
chmod +x /opt/ete.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip robot/demo.sh > /opt/demo.sh
+cp /opt/boot/robot/demo.sh /opt/demo.sh
chmod +x /opt/demo.sh
mkdir -p /opt/eteshare/logs
-cp /opt/robot_serv.sh /etc/init.d
update-rc.d robot_serv.sh defaults
-# Download and install docker-engine
-echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
-apt-get update
-apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
-apt-get install -y --allow-unauthenticated docker-engine
-
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
-service docker restart
-
-# DNS IP address configuration
-echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
# Run docker containers.
./robot_vm_init.sh
diff --git a/boot/robot_vm_init.sh b/heat/ONAP/cloud-config/robot_vm_init.sh
index 65eec434..65eec434 100644
--- a/boot/robot_vm_init.sh
+++ b/heat/ONAP/cloud-config/robot_vm_init.sh
diff --git a/heat/ONAP/cloud-config/sdc_install.sh b/heat/ONAP/cloud-config/sdc_install.sh
index 55963734..a77cdc92 100644
--- a/heat/ONAP/cloud-config/sdc_install.sh
+++ b/heat/ONAP/cloud-config/sdc_install.sh
@@ -1,11 +1,8 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
CODE_REPO=$(cat /opt/config/remote_repo.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -16,50 +13,19 @@ then
export https_proxy=$HTTPS_PROXY
fi
-# Add host name to /etc/host to avoid warnings in openstack images
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
-
-# Download dependencies
-apt-get update
-apt-get install -y apt-transport-https ca-certificates wget git ntp ntpdate make
# Download scripts from Nexus
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip sdc_vm_init.sh > /opt/sdc_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/sdc_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip sdc_wfd_vm_init.sh > /opt/sdc_wfd_vm_init.sh
-chmod +x /opt/sdc_vm_init.sh
-chmod +x /opt/sdc_serv.sh
-chmod +x /opt/sdc_wfd_vm_init.sh
-sed -i "s|cmd=\"\"|cmd=\"./sdc_vm_init.sh\"|g" /opt/sdc_serv.sh
-mv /opt/sdc_serv.sh /etc/init.d
update-rc.d sdc_serv.sh defaults
-# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
-apt-get update
-apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
-apt-get install -y --allow-unauthenticated docker-engine
-
-mkdir /opt/docker
-curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
-chmod +x /opt/docker/docker-compose
-
# Create partition and mount the external volume
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip sdc_ext_volume_partitions.txt > /opt/sdc_ext_volume_partitions.txt
+cp /opt/boot/sdc_ext_volume_partitions.txt /opt/sdc_ext_volume_partitions.txt
if [[ $CLOUD_ENV == "rackspace" ]]
then
- DISK="xvdb"
+ DISK="xvdb"
else
- DISK=$(ls /dev |grep -e '^.*db$')
- sed -i "s/xvdb/$DISK/g" /opt/sdc_ext_volume_partitions.txt
+ DISK=$(ls /dev |grep -e '^.*db$')
+ sed -i "s/xvdb/$DISK/g" /opt/sdc_ext_volume_partitions.txt
fi
sfdisk /dev/$DISK < /opt/sdc_ext_volume_partitions.txt
@@ -68,30 +34,6 @@ mkdir -p /data
mount /dev/$DISK"1" /data
echo "/dev/"$DISK"1 /data ext4 errors=remount-ro,noatime,barrier=0 0 1" >> /etc/fstab
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
-service docker restart
-
-# DNS IP address configuration
-echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
# Clone Gerrit repository
cd /opt
diff --git a/boot/sdc_vm_init.sh b/heat/ONAP/cloud-config/sdc_vm_init.sh
index 9626a2ee..9626a2ee 100644
--- a/boot/sdc_vm_init.sh
+++ b/heat/ONAP/cloud-config/sdc_vm_init.sh
diff --git a/boot/sdc_wfd_vm_init.sh b/heat/ONAP/cloud-config/sdc_wfd_vm_init.sh
index bcbcb4ac..bcbcb4ac 100644
--- a/boot/sdc_wfd_vm_init.sh
+++ b/heat/ONAP/cloud-config/sdc_wfd_vm_init.sh
diff --git a/heat/ONAP/cloud-config/sdnc_install.sh b/heat/ONAP/cloud-config/sdnc_install.sh
index 2c82eea5..3eae650d 100644
--- a/heat/ONAP/cloud-config/sdnc_install.sh
+++ b/heat/ONAP/cloud-config/sdnc_install.sh
@@ -1,11 +1,7 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
-CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
CODE_REPO=$(cat /opt/config/remote_repo.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -16,65 +12,10 @@ then
export https_proxy=$HTTPS_PROXY
fi
-# Add host name to /etc/host to avoid warnings in openstack images
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
-
-# Download dependencies
-apt-get update
-apt-get install -y apt-transport-https ca-certificates wget git ntp ntpdate make jq
# Download scripts from Nexus
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip sdnc_vm_init.sh > /opt/sdnc_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/sdnc_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
-chmod +x /opt/imagetest.sh
-chmod +x /opt/sdnc_vm_init.sh
-chmod +x /opt/sdnc_serv.sh
-sed -i "s|cmd=\"\"|cmd=\"./sdnc_vm_init.sh\"|g" /opt/sdnc_serv.sh
-mv /opt/sdnc_serv.sh /etc/init.d
update-rc.d sdnc_serv.sh defaults
-# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
-apt-get update
-apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
-apt-get install -y --allow-unauthenticated docker-engine
-
-mkdir /opt/docker
-curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
-chmod +x /opt/docker/docker-compose
-
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
-service docker restart
-
-# DNS IP address configuration
-echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
# Clone Gerrit repository and run docker containers
cd /opt
diff --git a/boot/sdnc_vm_init.sh b/heat/ONAP/cloud-config/sdnc_vm_init.sh
index a5236849..7816eab4 100644
--- a/boot/sdnc_vm_init.sh
+++ b/heat/ONAP/cloud-config/sdnc_vm_init.sh
@@ -49,4 +49,4 @@ else
echo "Timeout expired before SDC BE health check passed. SDNC containers starting, but UEB Listener may not be healthy"
fi
-/opt/docker/docker-compose up -d \ No newline at end of file
+/opt/docker/docker-compose up -d
diff --git a/boot/serv.sh b/heat/ONAP/cloud-config/serv.sh
index d34bd19e..62466d9c 100644
--- a/boot/serv.sh
+++ b/heat/ONAP/cloud-config/serv.sh
@@ -1,6 +1,6 @@
#!/bin/sh
### BEGIN INIT INFO
-# Provides:
+# Provides: __vm_init_script__
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
@@ -18,7 +18,7 @@ then
fi
dir="/opt"
-cmd=""
+cmd="./__vm_init_script__"
user="root"
name=`basename $0`
diff --git a/heat/ONAP/cloud-config/sms_install.sh b/heat/ONAP/cloud-config/sms_install.sh
index bdd3a630..11617ea9 100644
--- a/heat/ONAP/cloud-config/sms_install.sh
+++ b/heat/ONAP/cloud-config/sms_install.sh
@@ -1,11 +1,7 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
-CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
CODE_REPO=$(cat /opt/config/remote_repo.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -16,65 +12,10 @@ then
export https_proxy=$HTTPS_PROXY
fi
-# Add host name to /etc/host to avoid warnings in openstack images
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
-
-# Download dependencies
-apt-get update
-apt-get install -y apt-transport-https ca-certificates wget git ntp ntpdate make
# Download scripts from Nexus
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip sms_vm_init.sh > /opt/sms_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/sms_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
-chmod +x /opt/imagetest.sh
-chmod +x /opt/sms_vm_init.sh
-chmod +x /opt/sms_serv.sh
-sed -i "s|cmd=\"\"|cmd=\"./sms_vm_init.sh\"|g" /opt/sms_serv.sh
-mv /opt/sms_serv.sh /etc/init.d
update-rc.d sms_serv.sh defaults
-# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
-apt-get update
-apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
-apt-get install -y --allow-unauthenticated docker-engine
-
-mkdir /opt/docker
-curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
-chmod +x /opt/docker/docker-compose
-
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
-service docker restart
-
-# DNS IP address configuration
-echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
# Clone Gerrit repository and run docker containers
cd /opt
diff --git a/boot/sms_vm_init.sh b/heat/ONAP/cloud-config/sms_vm_init.sh
index 62a9ac82..62a9ac82 100644
--- a/boot/sms_vm_init.sh
+++ b/heat/ONAP/cloud-config/sms_vm_init.sh
diff --git a/heat/ONAP/cloud-config/so_install.sh b/heat/ONAP/cloud-config/so_install.sh
index e47a73f2..18995249 100644
--- a/heat/ONAP/cloud-config/so_install.sh
+++ b/heat/ONAP/cloud-config/so_install.sh
@@ -1,12 +1,8 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
-CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
OPENSTACK_API_KEY=$(cat /opt/config/openstack_api_key.txt)
GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
CODE_REPO=$(cat /opt/config/remote_repo.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -17,65 +13,10 @@ then
export https_proxy=$HTTPS_PROXY
fi
-# Add host name to /etc/host to avoid warnings in openstack images
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
-
-# Download dependencies
-apt-get update
-apt-get install -y apt-transport-https ca-certificates wget git ntp ntpdate make
# Download scripts from Nexus
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip so_vm_init.sh > /opt/so_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/so_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
-chmod +x /opt/imagetest.sh
-chmod +x /opt/so_vm_init.sh
-chmod +x /opt/so_serv.sh
-sed -i "s|cmd=\"\"|cmd=\"./so_vm_init.sh\"|g" /opt/so_serv.sh
-mv /opt/so_serv.sh /etc/init.d
update-rc.d so_serv.sh defaults
-# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
-apt-get update
-apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
-apt-get install -y --allow-unauthenticated docker-engine
-
-mkdir /opt/docker
-curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
-chmod +x /opt/docker/docker-compose
-
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
-service docker restart
-
-# DNS IP address configuration
-echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
# Clone Gerrit repository and run docker containers.
cd /opt
diff --git a/boot/so_vm_init.sh b/heat/ONAP/cloud-config/so_vm_init.sh
index 58ee9921..58ee9921 100644
--- a/boot/so_vm_init.sh
+++ b/heat/ONAP/cloud-config/so_vm_init.sh
diff --git a/heat/ONAP/cloud-config/vid_install.sh b/heat/ONAP/cloud-config/vid_install.sh
index 2f36e9f0..a73a6832 100644
--- a/heat/ONAP/cloud-config/vid_install.sh
+++ b/heat/ONAP/cloud-config/vid_install.sh
@@ -1,11 +1,7 @@
#!/bin/bash
# Read configuration files
-ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
-DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
-CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt)
-MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
CODE_REPO=$(cat /opt/config/remote_repo.txt)
HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
@@ -16,65 +12,10 @@ then
export https_proxy=$HTTPS_PROXY
fi
-# Add host name to /etc/host to avoid warnings in openstack images
-if [[ $CLOUD_ENV != "rackspace" ]]
-then
- echo 127.0.0.1 $(hostname) >> /etc/hosts
-
- # Allow remote login as root
- mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
- cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
-fi
-
-# Download dependencies
-apt-get update
-apt-get install -y apt-transport-https ca-certificates wget git ntp ntpdate make
# Download scripts from Nexus
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip vid_vm_init.sh > /opt/vid_vm_init.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip serv.sh > /opt/vid_serv.sh
-unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
-chmod +x /opt/imagetest.sh
-chmod +x /opt/vid_vm_init.sh
-chmod +x /opt/vid_serv.sh
-sed -i "s|cmd=\"\"|cmd=\"./vid_vm_init.sh\"|g" /opt/vid_serv.sh
-mv /opt/vid_serv.sh /etc/init.d
update-rc.d vid_serv.sh defaults
-# Download and install docker-engine and docker-compose
-echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/docker.list
-apt-get update
-apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
-apt-get install -y --allow-unauthenticated docker-engine
-
-mkdir /opt/docker
-curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
-chmod +x /opt/docker/docker-compose
-
-# Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
-DNS_FLAG=""
-if [ -s /opt/config/dns_ip_addr.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
-fi
-if [ -s /opt/config/external_dns.txt ]
-then
- DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
-fi
-echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
-
-cp /lib/systemd/system/docker.service /etc/systemd/system
-sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
-if [ $HTTP_PROXY != "no_proxy" ]
-then
-cd /opt
-./imagetest.sh
-fi
-service docker restart
-
-# DNS IP address configuration
-echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head
-resolvconf -u
# Clone Gerrit repository and run docker containers
cd /opt
diff --git a/boot/vid_vm_init.sh b/heat/ONAP/cloud-config/vid_vm_init.sh
index 9c67307f..9c67307f 100644
--- a/boot/vid_vm_init.sh
+++ b/heat/ONAP/cloud-config/vid_vm_init.sh
diff --git a/heat/ONAP/onap_openstack.yaml b/heat/ONAP/onap_openstack.yaml
index 5e925a64..2f95e8bc 100644
--- a/heat/ONAP/onap_openstack.yaml
+++ b/heat/ONAP/onap_openstack.yaml
@@ -661,6 +661,16 @@ resources:
echo "__openstack_api_key__" > /opt/config/openstack_api_key.txt
echo "__openstack_region__" > /opt/config/openstack_region.txt
+ # Add host name to /etc/host to avoid warnings in openstack images
+ if [[ "__cloud_env__" != "rackspace" ]]
+ then
+ echo 127.0.0.1 $(hostname) >> /etc/hosts
+
+ # Allow remote login as root
+ mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
+ cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
+ fi
+
if [ __http_proxy__ != "no_proxy" ]
then
echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
@@ -674,15 +684,58 @@ resources:
export https_proxy=__https_proxy__
fi
- # Download and run install script
apt update
- apt-get -y install unzip
+ apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual apt-transport-https ca-certificates wget git ntp ntpdate make jq unzip
+
+ # Download boot scripts
if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
- while [ ! -s /opt/boot-__artifacts_version__.zip ]; do
- curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
+ cd /opt
+ while [ -z "$ZIP_NAME" ] || [ ! -s "$ZIP_NAME" ]; do
+ wget --content-disposition "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__"
+ ZIP_NAME=$(ls -1 /opt/boot-*.zip)
done
- ln -s /opt/boot-__artifacts_version__.zip /opt/boot.zip
+ mkdir -p /opt/boot
+ unzip $ZIP_NAME -d /opt/boot
+
+ # Download and install docker-engine
+ echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" | tee /etc/apt/sources.list.d/docker.list
+ apt-get update
+ apt-get install -y --allow-unauthenticated docker-engine
+
+ # Install docker-compose
+ mkdir -p /opt/docker
+ curl -L "https://github.com/docker/compose/releases/download/1.16.1/docker-compose-$(uname -s)-$(uname -m)" > /opt/docker/docker-compose
+ chmod +x /opt/docker/docker-compose
+
+ # Set the MTU size of docker containers to the minimum MTU size supported by vNICs. OpenStack deployments may need to know the external DNS IP
+ DNS_FLAG=""
+ if [ -s /opt/config/dns_ip_addr.txt ]
+ then
+ DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/dns_ip_addr.txt) "
+ fi
+ if [ -s /opt/config/external_dns.txt ]
+ then
+ DNS_FLAG=$DNS_FLAG"--dns $(cat /opt/config/external_dns.txt) "
+ fi
+ MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
+ echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU\"" >> /etc/default/docker
+
+ cp /lib/systemd/system/docker.service /etc/systemd/system
+ sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
+ if [ __http_proxy__ != "no_proxy" ]
+ then
+ echo "[Service]" > /etc/systemd/system/docker.service.d/http-proxy.conf
+ echo "Environment=\"http_proxy=http://__http_proxy__" >> /etc/systemd/system/docker.service.d/http-proxy.conf
+ echo "Environment=\"https_proxy=https://__https_proxy__" >>/etc/systemd/system/docker.service.d/http-proxy.conf
+ echo "Environment=\"HTTP_PROXY=HTTP://__http_proxy__" >>/etc/systemd/system/docker.service.d/http-proxy.conf
+ echo "Environment=\"HTTPS_PROXY=HTTPS://__https_proxy__" >>/etc/systemd/system/docker.service.d/http-proxy.conf
+ fi
+ systemctl daemon-reload
+ service docker restart
+ # DNS IP address configuration
+ echo "nameserver __dns_ip_addr__" >> /etc/resolvconf/resolv.conf.d/head
+ resolvconf -u
# DNS Server instantiation
dns_private_port:
@@ -824,6 +877,17 @@ resources:
- path: /opt/aai_install.sh
permissions: '0755'
content: { get_file: cloud-config/aai_install.sh }
+ - path: /opt/aai_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/aai_vm_init.sh }
+ - path: /etc/init.d/aai_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: aai_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
aai1_vm_config:
type: OS::Heat::MultipartMime
@@ -890,6 +954,17 @@ resources:
- path: /opt/aai_install.sh
permissions: '0755'
content: { get_file: cloud-config/aai_install.sh }
+ - path: /opt/aai_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/aai_vm_init.sh }
+ - path: /etc/init.d/aai_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: aai_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
aai2_vm_config:
type: OS::Heat::MultipartMime
@@ -957,6 +1032,17 @@ resources:
- path: /opt/so_install.sh
permissions: '0755'
content: { get_file: cloud-config/so_install.sh }
+ - path: /opt/so_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/so_vm_init.sh }
+ - path: /etc/init.d/so_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: so_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
so_vm_config:
type: OS::Heat::MultipartMime
@@ -1028,6 +1114,20 @@ resources:
- path: /opt/mr_install.sh
permissions: '0755'
content: { get_file: cloud-config/mr_install.sh }
+ - path: /opt/mr_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/mr_vm_init.sh }
+ - path: /opt/dbcl_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/dbcl_vm_init.sh }
+ - path: /etc/init.d/mr_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: mr_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
mrouter_vm_config:
type: OS::Heat::MultipartMime
@@ -1092,6 +1192,17 @@ resources:
- path: /opt/robot_install.sh
permissions: '0755'
content: { get_file: cloud-config/robot_install.sh }
+ - path: /opt/robot_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/robot_vm_init.sh }
+ - path: /etc/init.d/robot_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: robot_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
robot_vm_config:
type: OS::Heat::MultipartMime
@@ -1232,6 +1343,17 @@ resources:
- path: /opt/vid_install.sh
permissions: '0755'
content: { get_file: cloud-config/vid_install.sh }
+ - path: /opt/vid_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/vid_vm_init.sh }
+ - path: /etc/init.d/vid_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: vid_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
vid_vm_config:
type: OS::Heat::MultipartMime
@@ -1296,6 +1418,17 @@ resources:
- path: /opt/sdnc_install.sh
permissions: '0755'
content: { get_file: cloud-config/sdnc_install.sh }
+ - path: /opt/sdnc_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/sdnc_vm_init.sh }
+ - path: /etc/init.d/sdnc_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: sdnc_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
sdnc_vm_config:
type: OS::Heat::MultipartMime
@@ -1371,6 +1504,20 @@ resources:
- path: /opt/sdc_install.sh
permissions: '0755'
content: { get_file: cloud-config/sdc_install.sh }
+ - path: /opt/sdc_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/sdc_vm_init.sh }
+ - path: /opt/sdc_wfd_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/sdc_wfd_vm_init.sh }
+ - path: /etc/init.d/sdc_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: sdc_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
sdc_vm_config:
type: OS::Heat::MultipartMime
@@ -1443,6 +1590,17 @@ resources:
- path: /opt/portal_install.sh
permissions: '0755'
content: { get_file: cloud-config/portal_install.sh }
+ - path: /opt/portal_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/portal_vm_init.sh }
+ - path: /etc/init.d/portal_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: portal_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
portal_vm_config:
type: OS::Heat::MultipartMime
@@ -1511,6 +1669,17 @@ resources:
- path: /opt/policy_install.sh
permissions: '0755'
content: { get_file: cloud-config/policy_install.sh }
+ - path: /opt/policy_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/policy_vm_init.sh }
+ - path: /etc/init.d/policy_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: policy_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
policy_vm_config:
type: OS::Heat::MultipartMime
@@ -1577,6 +1746,17 @@ resources:
- path: /opt/appc_install.sh
permissions: '0755'
content: { get_file: cloud-config/appc_install.sh }
+ - path: /opt/appc_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/appc_vm_init.sh }
+ - path: /etc/init.d/appc_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: appc_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
appc_vm_config:
type: OS::Heat::MultipartMime
@@ -1645,6 +1825,17 @@ resources:
- path: /opt/clamp_install.sh
permissions: '0755'
content: { get_file: cloud-config/clamp_install.sh }
+ - path: /opt/clamp_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/clamp_vm_init.sh }
+ - path: /etc/init.d/clamp_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: clamp_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
clamp_vm_config:
type: OS::Heat::MultipartMime
@@ -1714,6 +1905,17 @@ resources:
- path: /opt/openo_install.sh
permissions: '0755'
content: { get_file: cloud-config/openo_install.sh }
+ - path: /opt/cli_install.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/cli_install.sh }
+ - path: /etc/init.d/openo_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: openo_all_serv.sh
+ template:
+ get_file: cloud-config/serv.sh
openo_vm_config:
type: OS::Heat::MultipartMime
@@ -1855,6 +2057,14 @@ resources:
- path: /opt/dcae2_install.sh
permissions: '0755'
content: { get_file: cloud-config/dcae2_install.sh }
+ - path: /etc/init.d/dcae2_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: dcae2_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
dcae_c_vm_config:
type: OS::Heat::MultipartMime
@@ -2023,7 +2233,7 @@ resources:
echo "__holmes_rm_docker__" > /opt/config/holmes_docker_rm.txt
cd /opt
- ./dcae2_install.sh > /tmp/dcae2_install.log 2>&1
+ ./dcae2_install.sh 2>&1 | tee -a /tmp/dcae2_install.log
# MUSIC instantiation
@@ -2065,6 +2275,17 @@ resources:
- path: /opt/music_install.sh
permissions: '0755'
content: { get_file: cloud-config/music_install.sh }
+ - path: /opt/music_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/music_vm_init.sh }
+ - path: /etc/init.d/music_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: music_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
music_vm_config:
type: OS::Heat::MultipartMime
@@ -2129,6 +2350,17 @@ resources:
- path: /opt/oof_install.sh
permissions: '0755'
content: { get_file: cloud-config/oof_install.sh }
+ - path: /opt/oof_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/oof_vm_init.sh }
+ - path: /etc/init.d/oof_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: oof_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
oof_vm_config:
type: OS::Heat::MultipartMime
@@ -2199,6 +2431,17 @@ resources:
- path: /opt/aaf_install.sh
permissions: '0755'
content: { get_file: cloud-config/aaf_install.sh }
+ - path: /opt/aaf_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/aaf_vm_init.sh }
+ - path: /etc/init.d/aaf_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: aaf_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
aaf_vm_config:
type: OS::Heat::MultipartMime
@@ -2265,6 +2508,17 @@ resources:
- path: /opt/sms_install.sh
permissions: '0755'
content: { get_file: cloud-config/sms_install.sh }
+ - path: /opt/sms_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/sms_vm_init.sh }
+ - path: /etc/init.d/sms_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: sms_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
sms_vm_config:
type: OS::Heat::MultipartMime
@@ -2331,6 +2585,17 @@ resources:
- path: /opt/nbi_install.sh
permissions: '0755'
content: { get_file: cloud-config/nbi_install.sh }
+ - path: /opt/nbi_vm_init.sh
+ permissions: '0755'
+ content: { get_file: cloud-config/nbi_vm_init.sh }
+ - path: /etc/init.d/nbi_serv.sh
+ permissions: '0755'
+ content:
+ str_replace:
+ params:
+ __vm_init_script__: nbi_vm_init.sh
+ template:
+ get_file: cloud-config/serv.sh
nbi_vm_config:
type: OS::Heat::MultipartMime