X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=vnfs%2FvLB%2Fscripts%2Fv_lb_install.sh;h=8bfe9fcd681b9840c4f567cd75724b57ebc08439;hb=bf325d77199a0e52f195f5304b784bb03a69a07f;hp=5b84f21e78f723b799eb4b70cc2b9e482c7a4e05;hpb=1a532cd64a16a0186513c7ca2d78951294ca5c36;p=demo.git diff --git a/vnfs/vLB/scripts/v_lb_install.sh b/vnfs/vLB/scripts/v_lb_install.sh index 5b84f21e..8bfe9fcd 100644 --- a/vnfs/vLB/scripts/v_lb_install.sh +++ b/vnfs/vLB/scripts/v_lb_install.sh @@ -6,6 +6,27 @@ DEMO_ARTIFACTS_VERSION=$(cat /opt/config/demo_artifacts_version.txt) INSTALL_SCRIPT_VERSION=$(cat /opt/config/install_script_version.txt) CLOUD_ENV=$(cat /opt/config/cloud_env.txt) +# OpenStack network configuration +if [[ $CLOUD_ENV == "openstack" ]] +then + echo 127.0.0.1 $(hostname) >> /etc/hosts + + VLB_PRIVATE_IP_O=$(cat /opt/config/local_private_ipaddr.txt) + echo "auto eth1" >> /etc/network/interfaces + echo "iface eth1 inet static" >> /etc/network/interfaces + echo " address $VLB_PRIVATE_IP_O" >> /etc/network/interfaces + echo " netmask 255.255.255.0" >> /etc/network/interfaces + + VLB_PRIVATE_IP_1=$(cat /opt/config/oam_private_ipaddr.txt) + echo "auto eth2" >> /etc/network/interfaces + echo "iface eth2 inet static" >> /etc/network/interfaces + echo " address $VLB_PRIVATE_IP_1" >> /etc/network/interfaces + echo " netmask 255.255.255.0" >> /etc/network/interfaces + + ifup eth1 + ifup eth2 +fi + # Download required dependencies add-apt-repository -y ppa:openjdk-r/ppa apt-get update