X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=vnfs%2FvCPE%2Fscripts%2Fv_web_install.sh;h=685d675a6466bcb26fede3f26c395ef2751d6e04;hb=7c1cf784b194a956bc25d1ea0171572af28099ae;hp=94d3ebd775cfb42ffc3e5dc2db7e5c12bd142910;hpb=47793ae17c8f9d5555d5b36fc4da99d27a1f8e8e;p=demo.git diff --git a/vnfs/vCPE/scripts/v_web_install.sh b/vnfs/vCPE/scripts/v_web_install.sh index 94d3ebd7..685d675a 100644 --- a/vnfs/vCPE/scripts/v_web_install.sh +++ b/vnfs/vCPE/scripts/v_web_install.sh @@ -48,20 +48,43 @@ then fi # Download required 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 wget openjdk-8-jdk apt-transport-https ca-certificates g++ libcurl4-gnutls-dev +apt-get install --allow-unauthenticated -y wget openjdk-8-jdk apt-transport-https ca-certificates kea-dhcp4-server g++ libcurl4-gnutls-dev sleep 1 -# Download DHCP config files +# Download DHCP config and init files cd /opt +wget $REPO_URL_BLOB/org.onap.demo/vnfs/vcpe/$INSTALL_SCRIPT_VERSION/kea-dhcp4-web.conf wget $REPO_URL_BLOB/org.onap.demo/vnfs/vcpe/$INSTALL_SCRIPT_VERSION/v_web_init.sh wget $REPO_URL_BLOB/org.onap.demo/vnfs/vcpe/$INSTALL_SCRIPT_VERSION/v_web.sh + + + +# Configure DHCP +cp kea-dhcp4-web.conf /etc/kea-dhcp4-server.conf +mv kea-dhcp4-web.conf /etc/kea/kea-dhcp4.conf + + chmod +x v_web_init.sh chmod +x v_web.sh mv v_web.sh /etc/init.d update-rc.d v_web.sh defaults +# Install Apache2 web server +apt-get update +apt install -y apache2 +mv /var/www/html/index.html /var/www/html/index.html.example +cat > /var/www/html/index.html << EOF + + + +

Welcome to the vCPE Use Case Web Server!

+ + +EOF + # Rename network interface in openstack Ubuntu 16.04 images. Then, reboot the VM to pick up changes if [[ $CLOUD_ENV != "rackspace" ]] then @@ -74,4 +97,4 @@ then reboot fi -./v_web_init.sh \ No newline at end of file +./v_web_init.sh