diff options
author | 2018-07-17 17:33:04 +0000 | |
---|---|---|
committer | 2018-07-17 17:33:04 +0000 | |
commit | 534ba4b901b31b987b0c92e1d012758eadd1a954 (patch) | |
tree | a378aec805226cdb3dadf7b7168c9daf3515828a /boot/mr_install.sh | |
parent | e8cb52b80d4fb40810c455d9948e146e0ec79c19 (diff) | |
parent | 16f7357930c846a1163fc124bd82267be914512f (diff) |
Merge "Improve the way to deploy onap via proxy"
Diffstat (limited to 'boot/mr_install.sh')
-rw-r--r-- | boot/mr_install.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/boot/mr_install.sh b/boot/mr_install.sh index bd15c97f..a6a4f4b8 100644 --- a/boot/mr_install.sh +++ b/boot/mr_install.sh @@ -7,6 +7,14 @@ 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) + +if [ $HTTP_PROXY != "no_proxy" ] +then + export http_proxy=$HTTP_PROXY + export https_proxy=$HTTPS_PROXY +fi # Add host name to /etc/host to avoid warnings in openstack images if [[ $CLOUD_ENV != "rackspace" ]] @@ -56,6 +64,8 @@ apt-get install --allow-unauthenticated -y apt-transport-https ca-certificates w # 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 mr_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 mv /opt/mr_serv.sh /etc/init.d @@ -89,6 +99,11 @@ 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 |