diff options
Diffstat (limited to 'boot')
-rw-r--r-- | boot/aai_install.sh | 5 | ||||
-rw-r--r-- | boot/appc_install.sh | 5 | ||||
-rw-r--r-- | boot/bind_zones | 9 | ||||
-rw-r--r-- | boot/clamp_install.sh | 111 | ||||
-rw-r--r-- | boot/clamp_serv.sh | 98 | ||||
-rw-r--r-- | boot/clamp_vm_init.sh | 30 | ||||
-rw-r--r-- | boot/db_simpledemo_openecomp_org | 11 | ||||
-rw-r--r-- | boot/dcae_install.sh | 5 | ||||
-rw-r--r-- | boot/dns_install.sh | 6 | ||||
-rw-r--r-- | boot/mr_install.sh | 5 | ||||
-rw-r--r-- | boot/mso_install.sh | 5 | ||||
-rw-r--r-- | boot/policy_install.sh | 5 | ||||
-rw-r--r-- | boot/portal_install.sh | 5 | ||||
-rw-r--r-- | boot/robot_install.sh | 5 | ||||
-rw-r--r-- | boot/sdc_ext_volume_partitions.txt (renamed from boot/asdc_ext_volume_partitions.txt) | 0 | ||||
-rw-r--r-- | boot/sdc_install.sh (renamed from boot/asdc_install.sh) | 25 | ||||
-rw-r--r-- | boot/sdc_serv.sh (renamed from boot/asdc_serv.sh) | 2 | ||||
-rw-r--r-- | boot/sdc_vm_init.sh (renamed from boot/asdc_vm_init.sh) | 0 | ||||
-rw-r--r-- | boot/sdnc_install.sh | 5 | ||||
-rw-r--r-- | boot/vid_install.sh | 5 |
20 files changed, 304 insertions, 38 deletions
diff --git a/boot/aai_install.sh b/boot/aai_install.sh index a09849e3..9ee49d7f 100644 --- a/boot/aai_install.sh +++ b/boot/aai_install.sh @@ -49,9 +49,10 @@ then fi # Download dependencies -add-apt-repository -y ppa:openjdk-r/ppa +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 -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make +apt-get install --allow-unauthenticated -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/aai_vm_init.sh -o /opt/aai_vm_init.sh diff --git a/boot/appc_install.sh b/boot/appc_install.sh index 7dfbd395..b241efe7 100644 --- a/boot/appc_install.sh +++ b/boot/appc_install.sh @@ -48,9 +48,10 @@ then fi # Download dependencies -add-apt-repository -y ppa:openjdk-r/ppa +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 -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make +apt-get install --allow-unauthenticated -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/appc_vm_init.sh -o /opt/appc_vm_init.sh diff --git a/boot/bind_zones b/boot/bind_zones index 01d8128c..83b9f873 100644 --- a/boot/bind_zones +++ b/boot/bind_zones @@ -69,9 +69,13 @@ vm1.portal.simpledemo.openecomp.org. IN A portal_ip_addr c1.vm1.portal.simpledemo.openecomp.org. IN A portal_ip_addr c2.vm1.portal.simpledemo.openecomp.org. IN A portal_ip_addr +vm1.clamp.simpledemo.openecomp.org. IN A clamp_ip_addr +c1.vm1.clamp.simpledemo.openecomp.org. IN A clamp_ip_addr +c2.vm1.clamp.simpledemo.openecomp.org. IN A clamp_ip_addr + ;vm1.aaf.simpledemo.openecomp.org. IN A aaf_ip_addr -vm1.mr.simpledemo.openecomp.org. IN A mr_ip_addr +vm1.mr.simpledemo.openecomp.org. IN A mr_ip_addr ;CNAMES @@ -115,5 +119,8 @@ collector.api.simpledemo.openecomp.org. IN A dcae_coll_ip_addr ;dbc.api.simpledemo.openecomp.org. IN CNAME vm1.mr.simpledemo.openecomp.org. ;drprov.api.simpledemo.openecomp.org. IN CNAME vm1.mr.simpledemo.openecomp.org. +CLAMP +clamp.api.simpledemo.openecomp.org. IN CNAME vm1.clamp.simpledemo.openecomp.org. + ;AAF ;aaf.api.simpledemo.openecomp.org. IN CNAME vm1.aaf.simpledemo.openecomp.org. diff --git a/boot/clamp_install.sh b/boot/clamp_install.sh new file mode 100644 index 00000000..26e8f06f --- /dev/null +++ b/boot/clamp_install.sh @@ -0,0 +1,111 @@ +#!/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 +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 + +# Download scripts from Nexus +curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/clamp_vm_init.sh -o /opt/clamp_vm_init.sh +curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/clamp_serv.sh -o /opt/clamp_serv.sh +chmod +x /opt/clamp_vm_init.sh +chmod +x /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-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 + +# 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 +git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO + +# 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 +./clamp_vm_init.sh diff --git a/boot/clamp_serv.sh b/boot/clamp_serv.sh new file mode 100644 index 00000000..ed311849 --- /dev/null +++ b/boot/clamp_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="./clamp_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/clamp_vm_init.sh b/boot/clamp_vm_init.sh new file mode 100644 index 00000000..f8b26e30 --- /dev/null +++ b/boot/clamp_vm_init.sh @@ -0,0 +1,30 @@ +#!/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) +DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) + +# Fetch the latest code/scripts +cd /opt/clamp +git pull + +# Remove unused folders as only extra/ folder is used for docker compose +rm -rf pom.xml +rm -rf src/ + +# No configuration change here as directly done in the CLAMP repo + +# Pull the clamp docker image from nexus +# Maria db will be pulled automatically from docker.io during docker-compose +docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO + +docker pull $NEXUS_DOCKER_REPO/onap/clamp:$DOCKER_IMAGE_VERSION + +cd extra/docker/clamp/ + +# Change the Clamp docker image name in the docker-compose.yml to match the one downloaded +sed -i "/image: onap\/clamp/c\ image: $NEXUS_DOCKER_REPO\/onap\/clamp:$DOCKER_IMAGE_VERSION" docker-compose.yml + +# Start Clamp and MariaDB containers with docker compose and clamp/extra/docker/clamp/docker-compose.yml +/opt/docker/docker-compose up -d diff --git a/boot/db_simpledemo_openecomp_org b/boot/db_simpledemo_openecomp_org index 4209bfe0..65c8265f 100644 --- a/boot/db_simpledemo_openecomp_org +++ b/boot/db_simpledemo_openecomp_org @@ -69,9 +69,13 @@ vm1.portal.simpledemo.openecomp.org. IN A 10.0.9.1 c1.vm1.portal.simpledemo.openecomp.org. IN A 10.0.9.1 c2.vm1.portal.simpledemo.openecomp.org. IN A 10.0.9.1 -vm1.aaf.simpledemo.openecomp.org. IN A 10.0.12.1 +vm1.aaf.simpledemo.openecomp.org. IN A 10.0.13.1 -vm1.mr.simpledemo.openecomp.org. IN A 10.0.11.1 +vm1.mr.simpledemo.openecomp.org. IN A 10.0.11.1 + +vm1.clamp.simpledemo.openecomp.org. IN A 10.0.12.1 +c1.vm1.clamp.simpledemo.openecomp.org. IN A 10.0.12.1 +c2.vm1.clamp.simpledemo.openecomp.org. IN A 10.0.12.1 ;CNAMES @@ -115,5 +119,8 @@ collector.api.simpledemo.openecomp.org. IN A 10.0.4.102 ;dbc.api.simpledemo.openecomp.org. IN CNAME vm1.mr.simpledemo.openecomp.org. ;drprov.api.simpledemo.openecomp.org. IN CNAME vm1.mr.simpledemo.openecomp.org. +CLAMP +clamp.api.simpledemo.openecomp.org. IN CNAME vm1.clamp.simpledemo.openecomp.org. + ;AAF aaf.api.simpledemo.openecomp.org. IN CNAME vm1.aaf.simpledemo.openecomp.org. diff --git a/boot/dcae_install.sh b/boot/dcae_install.sh index 058725f5..09a9e33d 100644 --- a/boot/dcae_install.sh +++ b/boot/dcae_install.sh @@ -80,9 +80,10 @@ then fi # Download dependencies -add-apt-repository -y ppa:openjdk-r/ppa +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 -y apt-transport-https ca-certificates wget make openjdk-8-jdk git ntp ntpdate +apt-get install --allow-unauthenticated -y apt-transport-https ca-certificates wget make openjdk-8-jdk git ntp ntpdate # Download scripts from Nexus curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/dcae_vm_init.sh -o /opt/dcae_vm_init.sh diff --git a/boot/dns_install.sh b/boot/dns_install.sh index e76f371a..39f1ea0b 100644 --- a/boot/dns_install.sh +++ b/boot/dns_install.sh @@ -50,9 +50,10 @@ then fi # Download dependencies -add-apt-repository -y ppa:openjdk-r/ppa +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 -y apt-transport-https ca-certificates wget openjdk-8-jdk bind9 bind9utils bind9-doc ntp ntpdate make +apt-get install --allow-unauthenticated -y apt-transport-https ca-certificates wget openjdk-8-jdk bind9 bind9utils bind9-doc ntp ntpdate make # Download script mkdir /etc/bind/zones @@ -79,6 +80,7 @@ then sed -i "s/sdnc_ip_addr/"$(cat /opt/config/sdnc_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.openecomp.org sed -i "s/vid_ip_addr/"$(cat /opt/config/vid_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.openecomp.org sed -i "s/dcae_coll_ip_addr/"$(cat /opt/config/dcae_coll_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.openecomp.org + sed -i "s/clamp_ip_addr/"$(cat /opt/config/clamp_ip_addr.txt)"/g" /etc/bind/zones/db.simpledemo.openecomp.org fi # Configure Bind diff --git a/boot/mr_install.sh b/boot/mr_install.sh index 0f890572..e2168383 100644 --- a/boot/mr_install.sh +++ b/boot/mr_install.sh @@ -48,9 +48,10 @@ then fi # Download dependencies -add-apt-repository -y ppa:openjdk-r/ppa +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 -y apt-transport-https ca-certificates wget make openjdk-8-jdk git ntp ntpdate +apt-get install --allow-unauthenticated -y apt-transport-https ca-certificates wget make openjdk-8-jdk git ntp ntpdate # Download scripts from Nexus curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/mr_vm_init.sh -o /opt/mr_vm_init.sh diff --git a/boot/mso_install.sh b/boot/mso_install.sh index d9215b8d..bb36dcbd 100644 --- a/boot/mso_install.sh +++ b/boot/mso_install.sh @@ -49,9 +49,10 @@ then fi # Download dependencies -add-apt-repository -y ppa:openjdk-r/ppa +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 -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make +apt-get install --allow-unauthenticated -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/mso_vm_init.sh -o /opt/mso_vm_init.sh diff --git a/boot/policy_install.sh b/boot/policy_install.sh index 87aaca40..3f6ea5d1 100644 --- a/boot/policy_install.sh +++ b/boot/policy_install.sh @@ -48,9 +48,10 @@ then fi # Download dependencies -add-apt-repository -y ppa:openjdk-r/ppa +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 -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make +apt-get install --allow-unauthenticated -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/policy_vm_init.sh -o /opt/policy_vm_init.sh diff --git a/boot/portal_install.sh b/boot/portal_install.sh index 0d54565e..c1b816e0 100644 --- a/boot/portal_install.sh +++ b/boot/portal_install.sh @@ -48,9 +48,10 @@ then fi # Download dependencies -add-apt-repository -y ppa:openjdk-r/ppa +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 -y apt-transport-https ca-certificates wget openjdk-8-jdk git unzip mysql-client-core-5.6 ntp ntpdate make +apt-get install --allow-unauthenticated -y apt-transport-https ca-certificates wget openjdk-8-jdk git unzip mysql-client-core-5.6 ntp ntpdate make # Download scripts from Nexus curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/portal_vm_init.sh -o /opt/portal_vm_init.sh diff --git a/boot/robot_install.sh b/boot/robot_install.sh index 81f8e798..3447a01f 100644 --- a/boot/robot_install.sh +++ b/boot/robot_install.sh @@ -48,9 +48,10 @@ then fi # Download dependencies -add-apt-repository -y ppa:openjdk-r/ppa +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 -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make +apt-get install --allow-unauthenticated -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/robot_vm_init.sh -o /opt/robot_vm_init.sh diff --git a/boot/asdc_ext_volume_partitions.txt b/boot/sdc_ext_volume_partitions.txt index b00c6ae2..b00c6ae2 100644 --- a/boot/asdc_ext_volume_partitions.txt +++ b/boot/sdc_ext_volume_partitions.txt diff --git a/boot/asdc_install.sh b/boot/sdc_install.sh index 0400194c..2c32266c 100644 --- a/boot/asdc_install.sh +++ b/boot/sdc_install.sh @@ -48,17 +48,18 @@ then fi # Download dependencies -add-apt-repository -y ppa:openjdk-r/ppa +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 -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make +apt-get install --allow-unauthenticated -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 +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 @@ -71,17 +72,17 @@ curl -L https://github.com/docker/compose/releases/download/1.9.0/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 +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/asdc_ext_volume_partitions.txt + sed -i "s/xvdb/$DISK/g" /opt/sdc_ext_volume_partitions.txt fi -sfdisk /dev/$DISK < /opt/asdc_ext_volume_partitions.txt +sfdisk /dev/$DISK < /opt/sdc_ext_volume_partitions.txt mkfs -t ext4 /dev/$DISK"1" mkdir -p /data mount /dev/$DISK"1" /data @@ -139,4 +140,4 @@ then 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 +./sdc_vm_init.sh diff --git a/boot/asdc_serv.sh b/boot/sdc_serv.sh index 7d2539eb..b48c8484 100644 --- a/boot/asdc_serv.sh +++ b/boot/sdc_serv.sh @@ -10,7 +10,7 @@ ### END INIT INFO dir="/opt" -cmd="./asdc_vm_init.sh" +cmd="./sdc_vm_init.sh" user="root" name=`basename $0` diff --git a/boot/asdc_vm_init.sh b/boot/sdc_vm_init.sh index dd15c0a1..dd15c0a1 100644 --- a/boot/asdc_vm_init.sh +++ b/boot/sdc_vm_init.sh diff --git a/boot/sdnc_install.sh b/boot/sdnc_install.sh index 5cf169c7..3b5c5cfa 100644 --- a/boot/sdnc_install.sh +++ b/boot/sdnc_install.sh @@ -48,9 +48,10 @@ then fi # Download dependencies -add-apt-repository -y ppa:openjdk-r/ppa +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 -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make +apt-get install --allow-unauthenticated -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/sdnc_vm_init.sh -o /opt/sdnc_vm_init.sh diff --git a/boot/vid_install.sh b/boot/vid_install.sh index 1ec8ae62..118995c4 100644 --- a/boot/vid_install.sh +++ b/boot/vid_install.sh @@ -48,9 +48,10 @@ then fi # Download dependencies -add-apt-repository -y ppa:openjdk-r/ppa +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 -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make +apt-get install --allow-unauthenticated -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/vid_vm_init.sh -o /opt/vid_vm_init.sh |