diff options
author | AbirATTAR <abir.el_attar@nokia.com> | 2018-07-03 09:28:58 +0200 |
---|---|---|
committer | AbirATTAR <abir.el_attar@nokia.com> | 2018-07-16 17:47:39 +0200 |
commit | 16f7357930c846a1163fc124bd82267be914512f (patch) | |
tree | 465257abbb766abafc244ef0077429fb8b9f66db /boot/aai_install.sh | |
parent | fd761391ba59ba11452270807033e3605da5c6a4 (diff) |
Improve the way to deploy onap via proxy
Issue-ID: OOM-1275
Change-Id: I0d77bcfe1e9ca183b3ba1aa56fff713db33b677b
Signed-off-by: Abir EL ATTAR <abir.el_attar@nokia.com>
Diffstat (limited to 'boot/aai_install.sh')
-rw-r--r-- | boot/aai_install.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/boot/aai_install.sh b/boot/aai_install.sh index e9ff3bfc..981e026f 100644 --- a/boot/aai_install.sh +++ b/boot/aai_install.sh @@ -8,6 +8,14 @@ GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt) AAI_INSTANCE=$(cat /opt/config/aai_instance.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 # Download scripts from Nexus unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip aai_vm_init.sh > /opt/aai_vm_init.sh unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip aai_serv.sh > /opt/aai_serv.sh +unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh +chmod +x /opt/imagetest.sh chmod +x /opt/aai_vm_init.sh chmod +x /opt/aai_serv.sh mv /opt/aai_serv.sh /etc/init.d @@ -85,6 +95,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 |