From 16f7357930c846a1163fc124bd82267be914512f Mon Sep 17 00:00:00 2001 From: AbirATTAR Date: Tue, 3 Jul 2018 09:28:58 +0200 Subject: [PATCH] Improve the way to deploy onap via proxy Issue-ID: OOM-1275 Change-Id: I0d77bcfe1e9ca183b3ba1aa56fff713db33b677b Signed-off-by: Abir EL ATTAR --- boot/aaf_install.sh | 35 ++++- boot/aaf_serv.sh | 9 ++ boot/aai_install.sh | 15 ++ boot/aai_serv.sh | 8 ++ boot/appc_install.sh | 15 ++ boot/appc_serv.sh | 8 ++ boot/clamp_install.sh | 15 ++ boot/clamp_serv.sh | 8 ++ boot/cli_install.sh | 9 ++ boot/dcae2_install.sh | 15 ++ boot/dcae2_serv.sh | 8 ++ boot/dns_install.sh | 8 ++ boot/imagetest.sh | 20 +++ boot/mr_install.sh | 15 ++ boot/mr_serv.sh | 8 ++ boot/music_install.sh | 15 ++ boot/music_serv.sh | 8 ++ boot/nbi_install.sh | 15 ++ boot/nbi_serv.sh | 8 ++ boot/oof_install.sh | 15 ++ boot/oof_serv.sh | 8 ++ boot/openo_all_serv.sh | 8 ++ boot/openo_install.sh | 15 ++ boot/openo_serv.sh | 8 ++ boot/policy_install.sh | 15 ++ boot/policy_serv.sh | 8 ++ boot/portal_install.sh | 15 ++ boot/portal_serv.sh | 8 ++ boot/robot_install.sh | 15 ++ boot/robot_serv.sh | 8 ++ boot/sdc_install.sh | 13 ++ boot/sdc_serv.sh | 8 ++ boot/sdnc_install.sh | 15 ++ boot/sdnc_serv.sh | 8 ++ boot/sms_install.sh | 15 ++ boot/sms_serv.sh | 8 ++ boot/so_install.sh | 15 ++ boot/so_serv.sh | 8 ++ boot/vid_install.sh | 15 ++ boot/vid_serv.sh | 8 ++ heat/ONAP/onap_openstack.env | 4 + heat/ONAP/onap_openstack.yaml | 309 +++++++++++++++++++++++++++++++++++++++++- 42 files changed, 784 insertions(+), 7 deletions(-) create mode 100644 boot/imagetest.sh diff --git a/boot/aaf_install.sh b/boot/aaf_install.sh index af0ebbfe..ab7bcf78 100644 --- a/boot/aaf_install.sh +++ b/boot/aaf_install.sh @@ -7,6 +7,15 @@ 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 != " " ] +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" ]] @@ -55,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 aaf_vm_init.sh > /opt/aaf_vm_init.sh unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip aaf_serv.sh > /opt/aaf_serv.sh +unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh +chmod +x /opt/imagetest.sh chmod +x /opt/aaf_vm_init.sh chmod +x /opt/aaf_serv.sh mv /opt/aaf_serv.sh /etc/init.d @@ -84,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 @@ -194,22 +210,29 @@ under the License. | specification in this list marked as active will be used. |--> - +