From 4b53b580898219dba28723ffb6e5edcb0abcad7f Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Wed, 30 Aug 2017 20:46:11 +0300 Subject: name alignment as part of the name alignment i want to change all occurrences of asdc to sdc. Change-Id: I2eb9ff087d3cfd61c0c1347d085dd02da64c2d89 Issue-Id: INT-100 Signed-off-by: Michael Lando Signed-off-by: Victor Morales --- boot/asdc_ext_volume_partitions.txt | 7 - boot/asdc_install.sh | 142 --------------------- boot/asdc_serv.sh | 98 -------------- boot/asdc_vm_init.sh | 34 ----- boot/sdc_ext_volume_partitions.txt | 7 + boot/sdc_install.sh | 142 +++++++++++++++++++++ boot/sdc_serv.sh | 98 ++++++++++++++ boot/sdc_vm_init.sh | 34 +++++ heat/ONAP/onap_openstack.yaml | 8 +- heat/ONAP/onap_openstack_float.yaml | 8 +- heat/ONAP/onap_openstack_nofloat.yaml | 8 +- heat/ONAP/onap_rackspace.yaml | 8 +- .../event_format_updated.json | 4 +- 13 files changed, 299 insertions(+), 299 deletions(-) delete mode 100644 boot/asdc_ext_volume_partitions.txt delete mode 100644 boot/asdc_install.sh delete mode 100644 boot/asdc_serv.sh delete mode 100644 boot/asdc_vm_init.sh create mode 100644 boot/sdc_ext_volume_partitions.txt create mode 100644 boot/sdc_install.sh create mode 100644 boot/sdc_serv.sh create mode 100644 boot/sdc_vm_init.sh diff --git a/boot/asdc_ext_volume_partitions.txt b/boot/asdc_ext_volume_partitions.txt deleted file mode 100644 index b00c6ae2..00000000 --- a/boot/asdc_ext_volume_partitions.txt +++ /dev/null @@ -1,7 +0,0 @@ -# partition table of /dev/xvdb -unit: sectors - -/dev/xvdb1 : start= 2048, size=209713152, Id=83 -/dev/xvdb2 : start= 0, size= 0, Id= 0 -/dev/xvdb3 : start= 0, size= 0, Id= 0 -/dev/xvdb4 : start= 0, size= 0, Id= 0 diff --git a/boot/asdc_install.sh b/boot/asdc_install.sh deleted file mode 100644 index 0400194c..00000000 --- a/boot/asdc_install.sh +++ /dev/null @@ -1,142 +0,0 @@ -#!/bin/bash - -# Read configuration files -NEXUS_REPO=$(cat /opt/config/nexus_repo.txt) -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) - -# 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 - -# Set private IP in /etc/network/interfaces manually in the presence of public interface -# Some VM images don't add the private interface automatically, we have to do it during the component installation -if [[ $CLOUD_ENV == "openstack_nofloat" ]] -then - LOCAL_IP=$(cat /opt/config/local_ip_addr.txt) - CIDR=$(cat /opt/config/oam_network_cidr.txt) - BITMASK=$(echo $CIDR | cut -d"/" -f2) - - # Compute the netmask based on the network cidr - if [[ $BITMASK == "8" ]] - then - NETMASK=255.0.0.0 - elif [[ $BITMASK == "16" ]] - then - NETMASK=255.255.0.0 - elif [[ $BITMASK == "24" ]] - then - NETMASK=255.255.255.0 - fi - - echo "auto eth1" >> /etc/network/interfaces - echo "iface eth1 inet static" >> /etc/network/interfaces - echo " address $LOCAL_IP" >> /etc/network/interfaces - echo " netmask $NETMASK" >> /etc/network/interfaces - echo " mtu $MTU" >> /etc/network/interfaces - ifup eth1 -fi - -# Download dependencies -add-apt-repository -y ppa:openjdk-r/ppa -apt-get update -apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make - -# Download scripts from Nexus -curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/asdc_vm_init.sh -o /opt/asdc_vm_init.sh -curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/asdc_serv.sh -o /opt/asdc_serv.sh -chmod +x /opt/asdc_vm_init.sh -chmod +x /opt/asdc_serv.sh -mv /opt/asdc_serv.sh /etc/init.d -update-rc.d asdc_serv.sh defaults - -# Download and install docker-engine and docker-compose -echo "deb https://apt.dockerproject.org/repo ubuntu-xenial 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 -curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/asdc_ext_volume_partitions.txt -o /opt/asdc_ext_volume_partitions.txt - -if [[ $CLOUD_ENV == "rackspace" ]] -then - DISK="xvdb" -else - DISK=$(ls /dev |grep -e '^.*db$') - sed -i "s/xvdb/$DISK/g" /opt/asdc_ext_volume_partitions.txt -fi - -sfdisk /dev/$DISK < /opt/asdc_ext_volume_partitions.txt -mkfs -t ext4 /dev/$DISK"1" -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 -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 -mkdir -p /data/environments -mkdir -p /data/scripts -mkdir -p /data/logs/BE -mkdir -p /data/logs/FE -chmod 777 /data -chmod 777 /data/logs/BE -chmod 777 /data/logs/FE - -git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO - -cat > /root/.bash_aliases << EOF -alias dcls='/data/scripts/docker_clean.sh \$1' -alias dlog='/data/scripts/docker_login.sh \$1' -alias rund='/data/scripts/docker_run.sh' -alias health='/data/scripts/docker_health.sh' -EOF - -# Rename network interface in openstack Ubuntu 16.04 images. Then, reboot the VM to pick up changes -if [[ $CLOUD_ENV != "rackspace" ]] -then - sed -i "s/GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0\"/g" /etc/default/grub - grub-mkconfig -o /boot/grub/grub.cfg - sed -i "s/ens[0-9]*/eth0/g" /etc/network/interfaces.d/*.cfg - sed -i "s/ens[0-9]*/eth0/g" /etc/udev/rules.d/70-persistent-net.rules - echo 'network: {config: disabled}' >> /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg - echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic - reboot -fi - -# Run docker containers. For openstack Ubuntu 16.04 images this will run as a service after the VM has restarted -./asdc_vm_init.sh diff --git a/boot/asdc_serv.sh b/boot/asdc_serv.sh deleted file mode 100644 index 7d2539eb..00000000 --- a/boot/asdc_serv.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Start daemon at boot time -# Description: Enable service provided by daemon. -### END INIT INFO - -dir="/opt" -cmd="./asdc_vm_init.sh" -user="root" - -name=`basename $0` -pid_file="/var/run/$name.pid" -stdout_log="/var/log/$name.log" -stderr_log="/var/log/$name.err" - -get_pid() { - cat "$pid_file" -} - -is_running() { - [ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1 -} - -case "$1" in - start) - if is_running; then - echo "Already started" - else - echo "Starting $name" - cd "$dir" - if [ -z "$user" ]; then - sudo $cmd >> "$stdout_log" 2>> "$stderr_log" & - else - sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & - fi - echo $! > "$pid_file" - if ! is_running; then - echo "Unable to start, see $stdout_log and $stderr_log" - exit 1 - fi - fi - ;; - stop) - if is_running; then - echo -n "Stopping $name.." - kill `get_pid` - for i in {1..10} - do - if ! is_running; then - break - fi - - echo -n "." - sleep 1 - done - echo - - if is_running; then - echo "Not stopped; may still be shutting down or shutdown may have failed" - exit 1 - else - echo "Stopped" - if [ -f "$pid_file" ]; then - rm "$pid_file" - fi - fi - else - echo "Not running" - fi - ;; - restart) - $0 stop - if is_running; then - echo "Unable to stop, will not attempt to start" - exit 1 - fi - $0 start - ;; - status) - if is_running; then - echo "Running" - else - echo "Stopped" - exit 1 - fi - ;; - *) - echo "Usage: $0 {start|stop|restart|status}" - exit 1 - ;; -esac - -exit 0 diff --git a/boot/asdc_vm_init.sh b/boot/asdc_vm_init.sh deleted file mode 100644 index dd15c0a1..00000000 --- a/boot/asdc_vm_init.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) -NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) -NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) -NEXUS_DOCKER_PORT=$(echo $NEXUS_DOCKER_REPO | cut -d':' -f2) -ENV_NAME=$(cat /opt/config/env_name.txt) -MR_IP_ADDR=$(cat /opt/config/mr_ip_addr.txt) -RELEASE=$(cat /opt/config/docker_version.txt) - -cd /opt/sdc -git pull - -cd /opt -cp sdc/sdc-os-chef/environments/Template.json /data/environments -cp sdc/sdc-os-chef/scripts/docker_run.sh /data/scripts -cp sdc/sdc-os-chef/scripts/docker_health.sh /data/scripts -chmod +x /data/scripts/docker_run.sh -chmod +x /data/scripts/docker_health.sh - -if [ -e /opt/config/public_ip.txt ] -then - IP_ADDRESS=$(cat /opt/config/public_ip.txt) -else - IP_ADDRESS=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2) -fi - -cat /data/environments/Template.json | sed "s/yyy/"$IP_ADDRESS"/g" > /data/environments/$ENV_NAME.json -sed -i "s/xxx/"$ENV_NAME"/g" /data/environments/$ENV_NAME.json -sed -i "s/\"ueb_url_list\":.*/\"ueb_url_list\": \""$MR_IP_ADDR","$MR_IP_ADDR"\",/g" /data/environments/$ENV_NAME.json -sed -i "s/\"fqdn\":.*/\"fqdn\": [\""$MR_IP_ADDR"\", \""$MR_IP_ADDR"\"]/g" /data/environments/$ENV_NAME.json - -docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO -bash /data/scripts/docker_run.sh -e $ENV_NAME -r $RELEASE -p $NEXUS_DOCKER_PORT diff --git a/boot/sdc_ext_volume_partitions.txt b/boot/sdc_ext_volume_partitions.txt new file mode 100644 index 00000000..b00c6ae2 --- /dev/null +++ b/boot/sdc_ext_volume_partitions.txt @@ -0,0 +1,7 @@ +# partition table of /dev/xvdb +unit: sectors + +/dev/xvdb1 : start= 2048, size=209713152, Id=83 +/dev/xvdb2 : start= 0, size= 0, Id= 0 +/dev/xvdb3 : start= 0, size= 0, Id= 0 +/dev/xvdb4 : start= 0, size= 0, Id= 0 diff --git a/boot/sdc_install.sh b/boot/sdc_install.sh new file mode 100644 index 00000000..b0b6bf15 --- /dev/null +++ b/boot/sdc_install.sh @@ -0,0 +1,142 @@ +#!/bin/bash + +# Read configuration files +NEXUS_REPO=$(cat /opt/config/nexus_repo.txt) +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) + +# 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 + +# Set private IP in /etc/network/interfaces manually in the presence of public interface +# Some VM images don't add the private interface automatically, we have to do it during the component installation +if [[ $CLOUD_ENV == "openstack_nofloat" ]] +then + LOCAL_IP=$(cat /opt/config/local_ip_addr.txt) + CIDR=$(cat /opt/config/oam_network_cidr.txt) + BITMASK=$(echo $CIDR | cut -d"/" -f2) + + # Compute the netmask based on the network cidr + if [[ $BITMASK == "8" ]] + then + NETMASK=255.0.0.0 + elif [[ $BITMASK == "16" ]] + then + NETMASK=255.255.0.0 + elif [[ $BITMASK == "24" ]] + then + NETMASK=255.255.255.0 + fi + + echo "auto eth1" >> /etc/network/interfaces + echo "iface eth1 inet static" >> /etc/network/interfaces + echo " address $LOCAL_IP" >> /etc/network/interfaces + echo " netmask $NETMASK" >> /etc/network/interfaces + echo " mtu $MTU" >> /etc/network/interfaces + ifup eth1 +fi + +# Download dependencies +add-apt-repository -y ppa:openjdk-r/ppa +apt-get update +apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make + +# Download scripts from Nexus +curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/sdc_vm_init.sh -o /opt/sdc_vm_init.sh +curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/sdc_serv.sh -o /opt/sdc_serv.sh +chmod +x /opt/sdc_vm_init.sh +chmod +x /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-xenial 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 +curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/sdc_ext_volume_partitions.txt -o /opt/sdc_ext_volume_partitions.txt + +if [[ $CLOUD_ENV == "rackspace" ]] +then + DISK="xvdb" +else + 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 +mkfs -t ext4 /dev/$DISK"1" +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 +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 +mkdir -p /data/environments +mkdir -p /data/scripts +mkdir -p /data/logs/BE +mkdir -p /data/logs/FE +chmod 777 /data +chmod 777 /data/logs/BE +chmod 777 /data/logs/FE + +git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO + +cat > /root/.bash_aliases << EOF +alias dcls='/data/scripts/docker_clean.sh \$1' +alias dlog='/data/scripts/docker_login.sh \$1' +alias rund='/data/scripts/docker_run.sh' +alias health='/data/scripts/docker_health.sh' +EOF + +# Rename network interface in openstack Ubuntu 16.04 images. Then, reboot the VM to pick up changes +if [[ $CLOUD_ENV != "rackspace" ]] +then + sed -i "s/GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0\"/g" /etc/default/grub + grub-mkconfig -o /boot/grub/grub.cfg + sed -i "s/ens[0-9]*/eth0/g" /etc/network/interfaces.d/*.cfg + sed -i "s/ens[0-9]*/eth0/g" /etc/udev/rules.d/70-persistent-net.rules + echo 'network: {config: disabled}' >> /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg + echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic + reboot +fi + +# Run docker containers. For openstack Ubuntu 16.04 images this will run as a service after the VM has restarted +./sdc_vm_init.sh diff --git a/boot/sdc_serv.sh b/boot/sdc_serv.sh new file mode 100644 index 00000000..b48c8484 --- /dev/null +++ b/boot/sdc_serv.sh @@ -0,0 +1,98 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start daemon at boot time +# Description: Enable service provided by daemon. +### END INIT INFO + +dir="/opt" +cmd="./sdc_vm_init.sh" +user="root" + +name=`basename $0` +pid_file="/var/run/$name.pid" +stdout_log="/var/log/$name.log" +stderr_log="/var/log/$name.err" + +get_pid() { + cat "$pid_file" +} + +is_running() { + [ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1 +} + +case "$1" in + start) + if is_running; then + echo "Already started" + else + echo "Starting $name" + cd "$dir" + if [ -z "$user" ]; then + sudo $cmd >> "$stdout_log" 2>> "$stderr_log" & + else + sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & + fi + echo $! > "$pid_file" + if ! is_running; then + echo "Unable to start, see $stdout_log and $stderr_log" + exit 1 + fi + fi + ;; + stop) + if is_running; then + echo -n "Stopping $name.." + kill `get_pid` + for i in {1..10} + do + if ! is_running; then + break + fi + + echo -n "." + sleep 1 + done + echo + + if is_running; then + echo "Not stopped; may still be shutting down or shutdown may have failed" + exit 1 + else + echo "Stopped" + if [ -f "$pid_file" ]; then + rm "$pid_file" + fi + fi + else + echo "Not running" + fi + ;; + restart) + $0 stop + if is_running; then + echo "Unable to stop, will not attempt to start" + exit 1 + fi + $0 start + ;; + status) + if is_running; then + echo "Running" + else + echo "Stopped" + exit 1 + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/boot/sdc_vm_init.sh b/boot/sdc_vm_init.sh new file mode 100644 index 00000000..dd15c0a1 --- /dev/null +++ b/boot/sdc_vm_init.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt) +NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt) +NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt) +NEXUS_DOCKER_PORT=$(echo $NEXUS_DOCKER_REPO | cut -d':' -f2) +ENV_NAME=$(cat /opt/config/env_name.txt) +MR_IP_ADDR=$(cat /opt/config/mr_ip_addr.txt) +RELEASE=$(cat /opt/config/docker_version.txt) + +cd /opt/sdc +git pull + +cd /opt +cp sdc/sdc-os-chef/environments/Template.json /data/environments +cp sdc/sdc-os-chef/scripts/docker_run.sh /data/scripts +cp sdc/sdc-os-chef/scripts/docker_health.sh /data/scripts +chmod +x /data/scripts/docker_run.sh +chmod +x /data/scripts/docker_health.sh + +if [ -e /opt/config/public_ip.txt ] +then + IP_ADDRESS=$(cat /opt/config/public_ip.txt) +else + IP_ADDRESS=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2) +fi + +cat /data/environments/Template.json | sed "s/yyy/"$IP_ADDRESS"/g" > /data/environments/$ENV_NAME.json +sed -i "s/xxx/"$ENV_NAME"/g" /data/environments/$ENV_NAME.json +sed -i "s/\"ueb_url_list\":.*/\"ueb_url_list\": \""$MR_IP_ADDR","$MR_IP_ADDR"\",/g" /data/environments/$ENV_NAME.json +sed -i "s/\"fqdn\":.*/\"fqdn\": [\""$MR_IP_ADDR"\", \""$MR_IP_ADDR"\"]/g" /data/environments/$ENV_NAME.json + +docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO +bash /data/scripts/docker_run.sh -e $ENV_NAME -r $RELEASE -p $NEXUS_DOCKER_PORT diff --git a/heat/ONAP/onap_openstack.yaml b/heat/ONAP/onap_openstack.yaml index a99054c1..af8ef76d 100644 --- a/heat/ONAP/onap_openstack.yaml +++ b/heat/ONAP/onap_openstack.yaml @@ -1075,10 +1075,10 @@ resources: echo "__sdc_repo__" > /opt/config/remote_repo.txt # Download and run install script - curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/asdc_install.sh -o /opt/asdc_install.sh + curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdc_install.sh -o /opt/sdc_install.sh cd /opt - chmod +x asdc_install.sh - ./asdc_install.sh + chmod +x sdc_install.sh + ./sdc_install.sh # PORTAL instantiation @@ -1497,4 +1497,4 @@ resources: curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/clamp_install.sh -o /opt/clamp_install.sh cd /opt chmod +x clamp_install.sh - ./clamp_install.sh \ No newline at end of file + ./clamp_install.sh diff --git a/heat/ONAP/onap_openstack_float.yaml b/heat/ONAP/onap_openstack_float.yaml index 74e24e46..ab9b560a 100644 --- a/heat/ONAP/onap_openstack_float.yaml +++ b/heat/ONAP/onap_openstack_float.yaml @@ -1153,10 +1153,10 @@ resources: echo "__sdc_repo__" > /opt/config/remote_repo.txt # Download and run install script - curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/asdc_install.sh -o /opt/asdc_install.sh + curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdc_install.sh -o /opt/sdc_install.sh cd /opt - chmod +x asdc_install.sh - ./asdc_install.sh + chmod +x sdc_install.sh + ./sdc_install.sh # PORTAL instantiation @@ -1580,4 +1580,4 @@ resources: curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/clamp_install.sh -o /opt/clamp_install.sh cd /opt chmod +x clamp_install.sh - ./clamp_install.sh \ No newline at end of file + ./clamp_install.sh diff --git a/heat/ONAP/onap_openstack_nofloat.yaml b/heat/ONAP/onap_openstack_nofloat.yaml index 05ba2239..3dbea8e9 100644 --- a/heat/ONAP/onap_openstack_nofloat.yaml +++ b/heat/ONAP/onap_openstack_nofloat.yaml @@ -1024,10 +1024,10 @@ resources: echo "__sdc_repo__" > /opt/config/remote_repo.txt # Download and run install script - curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/asdc_install.sh -o /opt/asdc_install.sh + curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdc_install.sh -o /opt/sdc_install.sh cd /opt - chmod +x asdc_install.sh - ./asdc_install.sh + chmod +x sdc_install.sh + ./sdc_install.sh # PORTAL instantiation @@ -1423,4 +1423,4 @@ resources: curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/clamp_install.sh -o /opt/clamp_install.sh cd /opt chmod +x clamp_install.sh - ./clamp_install.sh \ No newline at end of file + ./clamp_install.sh diff --git a/heat/ONAP/onap_rackspace.yaml b/heat/ONAP/onap_rackspace.yaml index 260632c2..09c290e4 100644 --- a/heat/ONAP/onap_rackspace.yaml +++ b/heat/ONAP/onap_rackspace.yaml @@ -829,10 +829,10 @@ resources: echo "__sdc_repo__" > /opt/config/remote_repo.txt # Download and run install script - curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/asdc_install.sh -o /opt/asdc_install.sh + curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/sdc_install.sh -o /opt/sdc_install.sh cd /opt - chmod +x asdc_install.sh - ./asdc_install.sh + chmod +x sdc_install.sh + ./sdc_install.sh # PORTAL instantiation @@ -1196,4 +1196,4 @@ resources: curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/clamp_install.sh -o /opt/clamp_install.sh cd /opt chmod +x clamp_install.sh - ./clamp_install.sh \ No newline at end of file + ./clamp_install.sh diff --git a/vnfs/VES5.0/evel/evel-test-collector/docs/att_interface_definition/event_format_updated.json b/vnfs/VES5.0/evel/evel-test-collector/docs/att_interface_definition/event_format_updated.json index 82339b0c..160add52 100644 --- a/vnfs/VES5.0/evel/evel-test-collector/docs/att_interface_definition/event_format_updated.json +++ b/vnfs/VES5.0/evel/evel-test-collector/docs/att_interface_definition/event_format_updated.json @@ -1693,11 +1693,11 @@ "type": "string" }, "vfModuleName": { - "description": "ASDC vfModuleName for the vfModule generating the event", + "description": "SDC vfModuleName for the vfModule generating the event", "type": "string" }, "vnfName": { - "description": "ASDC modelName for the VNF generating the event", + "description": "SDC modelName for the VNF generating the event", "type": "string" } }, -- cgit 1.2.3-korg