Improve the way to deploy onap via proxy 79/55679/4
authorAbirATTAR <abir.el_attar@nokia.com>
Tue, 3 Jul 2018 07:28:58 +0000 (09:28 +0200)
committerAbirATTAR <abir.el_attar@nokia.com>
Mon, 16 Jul 2018 15:47:39 +0000 (17:47 +0200)
Issue-ID: OOM-1275
Change-Id: I0d77bcfe1e9ca183b3ba1aa56fff713db33b677b
Signed-off-by: Abir EL ATTAR <abir.el_attar@nokia.com>
42 files changed:
boot/aaf_install.sh
boot/aaf_serv.sh
boot/aai_install.sh
boot/aai_serv.sh
boot/appc_install.sh
boot/appc_serv.sh
boot/clamp_install.sh
boot/clamp_serv.sh
boot/cli_install.sh
boot/dcae2_install.sh
boot/dcae2_serv.sh
boot/dns_install.sh
boot/imagetest.sh [new file with mode: 0644]
boot/mr_install.sh
boot/mr_serv.sh
boot/music_install.sh
boot/music_serv.sh
boot/nbi_install.sh
boot/nbi_serv.sh
boot/oof_install.sh
boot/oof_serv.sh
boot/openo_all_serv.sh
boot/openo_install.sh
boot/openo_serv.sh
boot/policy_install.sh
boot/policy_serv.sh
boot/portal_install.sh
boot/portal_serv.sh
boot/robot_install.sh
boot/robot_serv.sh
boot/sdc_install.sh
boot/sdc_serv.sh
boot/sdnc_install.sh
boot/sdnc_serv.sh
boot/sms_install.sh
boot/sms_serv.sh
boot/so_install.sh
boot/so_serv.sh
boot/vid_install.sh
boot/vid_serv.sh
heat/ONAP/onap_openstack.env
heat/ONAP/onap_openstack.yaml

index af0ebbf..ab7bcf7 100644 (file)
@@ -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.
    |-->
   <proxies>
-    <!-- proxy
-     | Specification for one proxy, to be used in connecting to the network.
-     |
     <proxy>
       <id>optional</id>
       <active>true</active>
       <protocol>http</protocol>
       <username>proxyuser</username>
       <password>proxypass</password>
-      <host>proxy.host.net</host>
-      <port>80</port>
+      <host>$(cat /opt/config/http_proxy.txt | cut -d ':' -f1)</host>
+      <port>$(cat /opt/config/http_proxy.txt | cut -d ':' -f2)</port>
+      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
+    </proxy>
+    <proxy>
+      <id>optional</id>
+      <active>true</active>
+      <protocol>https</protocol>
+      <username>proxyuser</username>
+      <password>proxypass</password>
+      <host>$(cat /opt/config/https_proxy.txt | cut -d ':' -f1)</host>
+      <port>$(cat /opt/config/https_proxy.txt | cut -d ':' -f2)</port>
       <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
     </proxy>
-    -->
   </proxies>
 
+
   <!-- servers
    | This is a list of authentication profiles, keyed by the server-id used within the system.
    | Authentication profiles can be used whenever maven must make a connection to a remote server.
index 73d22ad..51391b8 100644 (file)
@@ -9,6 +9,15 @@
 # Description:       Enable service provided by daemon.
 ### END INIT INFO
 
+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
+
 dir="/opt"
 cmd="./aaf_vm_init.sh"
 user="root"
index e9ff3bf..981e026 100644 (file)
@@ -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
index 2e0dbab..dc93be6 100644 (file)
@@ -8,6 +8,14 @@
 # Short-Description: Start daemon at boot time
 # Description:       Enable service provided by daemon.
 ### END INIT INFO
+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
 
 dir="/opt"
 cmd="./aai_vm_init.sh"
index ca7a8e2..7efedb8 100644 (file)
@@ -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" ]]
@@ -55,6 +63,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 appc_vm_init.sh > /opt/appc_vm_init.sh
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip appc_serv.sh > /opt/appc_serv.sh
+unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
+chmod +x /opt/imagetest.sh
 chmod +x /opt/appc_vm_init.sh
 chmod +x /opt/appc_serv.sh
 mv /opt/appc_serv.sh /etc/init.d
@@ -84,6 +94,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
index a71db88..de9c259 100644 (file)
@@ -8,6 +8,14 @@
 # Short-Description: Start daemon at boot time
 # Description:       Enable service provided by daemon.
 ### END INIT INFO
+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
 
 dir="/opt"
 cmd="./appc_vm_init.sh"
index 0dbb812..88b0370 100644 (file)
@@ -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" ]]
@@ -55,6 +63,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 clamp_vm_init.sh > /opt/clamp_vm_init.sh
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip clamp_serv.sh > /opt/clamp_serv.sh
+unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
+chmod +x /opt/imagetest.sh
 chmod +x /opt/clamp_vm_init.sh
 chmod +x /opt/clamp_serv.sh
 mv /opt/clamp_serv.sh /etc/init.d
@@ -84,6 +94,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
index ed31184..edda393 100644 (file)
@@ -8,6 +8,14 @@
 # Short-Description: Start daemon at boot time
 # Description:       Enable service provided by daemon.
 ### END INIT INFO
+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
 
 dir="/opt"
 cmd="./clamp_vm_init.sh"
index 22fec53..4593c68 100644 (file)
@@ -20,6 +20,15 @@ CLI_LATEST_BINARY="https://nexus.onap.org/content/repositories/releases/org/onap
 CLI_INSTALL_DIR=/opt/onap/cli
 CLI_ZIP=cli.zip
 CLI_BIN=/usr/bin/onap
+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
+
 export ONAP_CLI_HOME=$CLI_INSTALL_DIR
 export CLI_PRODUCT_VERSION=onap-1.1
 
index 5a8c707..05722c3 100755 (executable)
@@ -24,6 +24,14 @@ DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt)
 CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
 EXTERNAL_DNS=$(cat /opt/config/external_dns.txt)
 MAC_ADDR=$(cat /opt/config/mac_addr.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
 
 MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
 
@@ -47,6 +55,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 dcae2_vm_init.sh > /opt/dcae2_vm_init.sh
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip dcae2_serv.sh > /opt/dcae2_serv.sh
+unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
+chmod +x /opt/imagetest.sh
 chmod +x /opt/dcae2_vm_init.sh
 chmod +x /opt/dcae2_serv.sh
 mv /opt/dcae2_serv.sh /etc/init.d
@@ -79,6 +89,11 @@ echo "DOCKER_OPTS=\"$DNS_FLAG--mtu=$MTU --raw-logs -H tcp://0.0.0.0:2376 -H unix
 cp /lib/systemd/system/docker.service /etc/systemd/system
 sed -i "/ExecStart/s/$/ --mtu=$MTU/g" /etc/systemd/system/docker.service
 sed -i "/ExecStart/s/$/ -H tcp:\/\/0.0.0.0:2376 --raw-logs/g" /etc/systemd/system/docker.service
+if [ $HTTP_PROXY != "no_proxy" ]
+then
+cd /opt
+./imagetest.sh
+fi
 systemctl daemon-reload
 service docker restart
 
index 30e647e..b05a895 100644 (file)
 # Short-Description: Start daemon at boot time
 # Description: Enable service provided by daemon.
 ### END INIT INFO
+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
 
 dir="/opt"
 cmd="./dcae2_vm_init.sh"
index 4bfdbff..fcb2c44 100644 (file)
@@ -3,6 +3,14 @@
 # Read configuration files
 ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt)
 CLOUD_ENV=$(cat /opt/config/cloud_env.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
 
 
 if [[ $CLOUD_ENV != "rackspace" ]]
diff --git a/boot/imagetest.sh b/boot/imagetest.sh
new file mode 100644 (file)
index 0000000..edd6154
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+HTTP_PROXY=$(cat /opt/config/http_proxy.txt)
+HTTPS_PROXY=$(cat /opt/config/https_proxy.txt)
+
+image=$(cat /etc/issue | cut -d' ' -f2 | cut -c1-5)
+echo $image
+if [ ${image} == '16.04' ]
+then
+    echo "[Service]" > /etc/systemd/system/docker.service.d/http-proxy.conf
+    echo "Environment=\"http_proxy=http://\"$HTTP_PROXY\"" >> /etc/systemd/system/docker.service.d/http-proxy.conf
+    echo "Environment=\"https_proxy=https://\"$HTTPS_PROXY\"" >>/etc/systemd/system/docker.service.d/http-proxy.conf
+    echo "Environment=\"HTTP_PROXY=HTTP://\"$HTTP_PROXY\"" >>/etc/systemd/system/docker.service.d/http-proxy.conf
+    echo "Environment=\"HTTPS_PROXY=HTTPS://\"$HTTPS_PROXY\"" >>/etc/systemd/system/docker.service.d/http-proxy.conf
+elif [ ${image} == '14.04' ]
+then
+    echo " export http_proxy=$HTTP_PROXY " > /etc/default/docker
+    echo " export https_proxy=$HTTPS_PROXY " >> /etc/default/docker
+else echo " It's not a 16 nor a 14 Ubuntu image"
+fi
index bd15c97..a6a4f4b 100644 (file)
@@ -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
index 77f8639..505beb8 100644 (file)
 # Short-Description: Start daemon at boot time
 # Description:       Enable service provided by daemon.
 ### END INIT INFO
+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
 
 dir="/opt"
 cmd="./mr_vm_init.sh"
index 8691419..a080034 100644 (file)
@@ -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" ]]
@@ -55,6 +63,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 music_vm_init.sh > /opt/music_vm_init.sh
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip music_serv.sh > /opt/music_serv.sh
+unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
+chmod +x /opt/imagetest.sh
 chmod +x /opt/music_vm_init.sh
 chmod +x /opt/music_serv.sh
 mv /opt/music_serv.sh /etc/init.d
@@ -84,6 +94,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
index 29dc4c3..849d2eb 100644 (file)
@@ -8,6 +8,14 @@
 # Short-Description: Start daemon at boot time
 # Description:       Enable service provided by daemon.
 ### END INIT INFO
+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
 
 dir="/opt"
 cmd="./music_vm_init.sh"
index 35e42ac..5af9332 100644 (file)
@@ -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" ]]
@@ -52,6 +60,8 @@ apt-get install --allow-unauthenticated -y apt-transport-https ca-certificates c
 # Download scripts from Nexus
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip nbi_vm_init.sh > /opt/nbi_vm_init.sh
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip nbi_serv.sh > /opt/nbi_serv.sh
+unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
+chmod +x /opt/imagetest.sh
 chmod +x /opt/nbi_vm_init.sh
 chmod +x /opt/nbi_serv.sh
 mv /opt/nbi_serv.sh /etc/init.d
@@ -84,6 +94,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
index 6a9c2ae..a9390b8 100644 (file)
@@ -8,6 +8,14 @@
 # Short-Description: Start daemon at boot time
 # Description:       Enable service provided by daemon.
 ### END INIT INFO
+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
 
 dir="/opt"
 cmd="./nbi_vm_init.sh"
index d18bd57..8139b89 100644 (file)
@@ -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" ]]
@@ -55,6 +63,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 oof_vm_init.sh > /opt/oof_vm_init.sh
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip oof_serv.sh > /opt/oof_serv.sh
+unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
+chmod +x /opt/imagetest.sh
 chmod +x /opt/oof_vm_init.sh
 chmod +x /opt/oof_serv.sh
 mv /opt/oof_serv.sh /etc/init.d
@@ -84,6 +94,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
index 58a1691..01fb3fd 100644 (file)
@@ -8,6 +8,14 @@
 # Short-Description: Start daemon at boot time
 # Description:       Enable service provided by daemon.
 ### END INIT INFO
+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
 
 dir="/opt"
 cmd="./oof_vm_init.sh"
index 9c523a8..e677683 100644 (file)
@@ -1,4 +1,12 @@
 #!/bin/bash
+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
 
 bash /opt/msb_vm_init.sh &>/dev/null &disown
 bash /opt/vnfsdk_vm_init.sh &>/dev/null &disown
index 5cfaea4..69cd2f7 100644 (file)
@@ -7,6 +7,14 @@ CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
 VNFSDK_BRANCH=$(cat /opt/config/vnfsdk_branch.txt)
 MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
 VNFSDK_REPO=$(cat /opt/config/vnfsdk_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" ]]
@@ -62,6 +70,8 @@ unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip openo_all_serv.sh > /opt/openo_all_
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip openo_serv.sh > /opt/openo_serv.sh
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip cli_install.sh > /opt/cli_install.sh
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip esr_vm_init.sh > /opt/esr_vm_init.sh
+unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
+chmod +x /opt/imagetest.sh
 chmod +x /opt/vnfsdk_vm_init.sh
 chmod +x /opt/msb_vm_init.sh
 chmod +x /opt/mvim_vm_init.sh
@@ -98,6 +108,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
index 0afa931..c46329a 100644 (file)
@@ -8,6 +8,14 @@
 # Short-Description: Start daemon at boot time
 # Description:       Enable service provided by daemon.
 ### END INIT INFO
+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
 
 dir="/opt"
 cmd="./openo_all_serv.sh"
index 0e97991..6394fc1 100644 (file)
@@ -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" ]]
@@ -55,6 +63,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 policy_vm_init.sh > /opt/policy_vm_init.sh
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip policy_serv.sh > /opt/policy_serv.sh
+unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
+chmod +x /opt/imagetest.sh
 chmod +x /opt/policy_vm_init.sh
 chmod +x /opt/policy_serv.sh
 mv /opt/policy_serv.sh /etc/init.d
@@ -84,6 +94,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
index 2e7195b..cad2720 100644 (file)
@@ -8,6 +8,14 @@
 # Short-Description: Start daemon at boot time
 # Description:       Enable service provided by daemon.
 ### END INIT INFO
+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
 
 dir="/opt"
 cmd="./policy_vm_init.sh"
index 5b93c60..60b3d3d 100644 (file)
@@ -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" ]]
@@ -55,6 +63,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 portal_vm_init.sh > /opt/portal_vm_init.sh
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip portal_serv.sh > /opt/portal_serv.sh
+unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
+chmod +x /opt/imagetest.sh
 chmod +x /opt/portal_vm_init.sh
 chmod +x /opt/portal_serv.sh
 mv /opt/portal_serv.sh /etc/init.d
@@ -84,6 +94,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
index cf0c412..1995488 100644 (file)
@@ -8,6 +8,14 @@
 # Short-Description: Start daemon at boot time
 # Description:       Enable service provided by daemon.
 ### END INIT INFO
+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
 
 dir="/opt"
 cmd="./portal_vm_init.sh"
index 9978e56..d3807f8 100644 (file)
@@ -8,6 +8,14 @@ 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)
 HEAT_CODE_REPO=http://gerrit.onap.org/r/demo.git
+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
 
 # Short-term fix to get around MSO to SO name change
 cp /opt/config/so_ip_addr.txt /opt/config/mso_ip_addr.txt
@@ -59,6 +67,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 robot_vm_init.sh > /opt/robot_vm_init.sh
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip robot_serv.sh > /opt/robot_serv.sh
+unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
+chmod +x /opt/imagetest.sh
 chmod +x /opt/robot_vm_init.sh
 chmod +x /opt/robot_serv.sh
 mv /opt/robot_serv.sh /etc/init.d
@@ -88,6 +98,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
index 7c4419d..d1203e5 100644 (file)
@@ -8,6 +8,14 @@
 # Short-Description: Start daemon at boot time
 # Description:       Enable service provided by daemon.
 ### END INIT INFO
+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
 
 dir="/opt"
 cmd="./robot_vm_init.sh"
index 6b48f55..b0d5899 100644 (file)
@@ -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" ]]
@@ -103,6 +111,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
index b48c848..a2bb3d1 100644 (file)
@@ -8,6 +8,14 @@
 # Short-Description: Start daemon at boot time
 # Description:       Enable service provided by daemon.
 ### END INIT INFO
+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
 
 dir="/opt"
 cmd="./sdc_vm_init.sh"
index 7ca6977..196542f 100644 (file)
@@ -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" ]]
@@ -55,6 +63,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 sdnc_vm_init.sh > /opt/sdnc_vm_init.sh
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip sdnc_serv.sh > /opt/sdnc_serv.sh
+unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
+chmod +x /opt/imagetest.sh
 chmod +x /opt/sdnc_vm_init.sh
 chmod +x /opt/sdnc_serv.sh
 mv /opt/sdnc_serv.sh /etc/init.d
@@ -84,6 +94,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
index 58f03f1..cce2039 100644 (file)
@@ -8,6 +8,14 @@
 # Short-Description: Start daemon at boot time
 # Description:       Enable service provided by daemon.
 ### END INIT INFO
+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
 
 dir="/opt"
 cmd="./sdnc_vm_init.sh"
index 1c8b6ba..5522c37 100644 (file)
@@ -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" ]]
@@ -55,6 +63,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 sms_vm_init.sh > /opt/sms_vm_init.sh
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip sms_serv.sh > /opt/sms_serv.sh
+unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
+chmod +x /opt/imagetest.sh
 chmod +x /opt/sms_vm_init.sh
 chmod +x /opt/sms_serv.sh
 mv /opt/sms_serv.sh /etc/init.d
@@ -84,6 +94,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
index 7cbdab7..2bbf255 100644 (file)
@@ -8,6 +8,14 @@
 # Short-Description: Start daemon at boot time
 # Description:       Enable service provided by daemon.
 ### END INIT INFO
+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
 
 dir="/opt"
 cmd="./sms_vm_init.sh"
index 77f2a7a..f58a616 100644 (file)
@@ -8,6 +8,14 @@ OPENSTACK_API_KEY=$(cat /opt/config/openstack_api_key.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
 # Download scripts from Nexus
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip so_vm_init.sh > /opt/so_vm_init.sh
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip so_serv.sh > /opt/so_serv.sh
+unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
+chmod +x /opt/imagetest.sh
 chmod +x /opt/so_vm_init.sh
 chmod +x /opt/so_serv.sh
 mv /opt/so_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
index d324447..762d2e1 100644 (file)
@@ -8,6 +8,14 @@
 # Short-Description: Start daemon at boot time
 # Description:       Enable service provided by daemon.
 ### END INIT INFO
+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
 
 dir="/opt"
 cmd="./so_vm_init.sh"
index f1bd3cc..74018f6 100644 (file)
@@ -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" ]]
@@ -55,6 +63,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 vid_vm_init.sh > /opt/vid_vm_init.sh
 unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip vid_serv.sh > /opt/vid_serv.sh
+unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip imagetest.sh > /opt/imagetest.sh
+chmod +x /opt/imagetest.sh
 chmod +x /opt/vid_vm_init.sh
 chmod +x /opt/vid_serv.sh
 mv /opt/vid_serv.sh /etc/init.d
@@ -84,6 +94,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
index 445196c..91b4d24 100644 (file)
@@ -8,6 +8,14 @@
 # Short-Description: Start daemon at boot time
 # Description:       Enable service provided by daemon.
 ### END INIT INFO
+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
 
 dir="/opt"
 cmd="./vid_vm_init.sh"
index 72cf6e4..f016b0b 100644 (file)
@@ -54,6 +54,10 @@ parameters:
 
   cloud_env: openstack
 
+  http_proxy: PUT YOUR HTTP PROXY ADDRESS (if you don't work behind a proxy put no_proxy)
+
+  https_proxy: PUT YOUR HTTPS PROXY ADDRESS (if you don't work behind a proxy put no_proxy)
+
 
   ######################
   #                    #
index f9c2528..771cdfb 100644 (file)
@@ -141,6 +141,14 @@ parameters:
     type: string
     description: Region where the DCAE controller will spin the VMs
 
+  http_proxy:
+    type: string
+    description: http proxy address
+
+  https_proxy:
+    type: string
+    description: https proxy address
+
   ######################
   #                    #
   # Network parameters #
@@ -643,6 +651,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __artifacts_version__: { get_param: artifacts_version }
             __oam_network_cidr__: { get_attr: [oam_onap_subnet, cidr] }
@@ -700,8 +710,21 @@ resources:
             echo "__nbi_ip_addr__" > /opt/config/nbi_ip_addr.txt
             echo "__external_dns__" > /opt/config/external_dns.txt
             echo "__dns_forwarder__" > /opt/config/dns_forwarder.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -744,6 +767,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -774,8 +799,21 @@ resources:
             echo "__cloud_env__" > /opt/config/cloud_env.txt
             echo "__external_dns__" > /opt/config/external_dns.txt
             echo "__aai_repo__" > /opt/config/remote_repo.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -816,6 +854,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -846,8 +886,21 @@ resources:
             echo "__cloud_env__" > /opt/config/cloud_env.txt
             echo "__external_dns__" > /opt/config/external_dns.txt
             echo "__aai_repo__" > /opt/config/remote_repo.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -889,6 +942,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -930,8 +985,21 @@ resources:
             echo "__cloud_env__" > /opt/config/cloud_env.txt
             echo "__external_dns__" > /opt/config/external_dns.txt
             echo "__so_repo__" > /opt/config/remote_repo.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -973,6 +1041,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -1000,8 +1070,21 @@ resources:
             echo "__external_dns__" > /opt/config/external_dns.txt
             echo "__mr_repo__" > /opt/config/remote_repo.txt
             echo "__dbcl_docker__" > /opt/config/docker_version.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -1043,6 +1126,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -1153,8 +1238,21 @@ resources:
             echo "localhost" > /opt/config/log_elasticsearch_ip_addr.txt # these tests will be skipped by robot
             echo "localhost" > /opt/config/log_logstash_ip_addr.txt # these tests will be skipped by robot
             echo "localhost" > /opt/config/log_kibana_ip_addr.txt # these tests will be skipped by robot
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -1196,6 +1294,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -1223,8 +1323,21 @@ resources:
             echo "__cloud_env__" > /opt/config/cloud_env.txt
             echo "__external_dns__" > /opt/config/external_dns.txt
             echo "__vid_repo__" > /opt/config/remote_repo.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -1266,6 +1379,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -1295,8 +1410,21 @@ resources:
             echo "__cloud_env__" > /opt/config/cloud_env.txt
             echo "__external_dns__" > /opt/config/external_dns.txt
             echo "__sdnc_repo__" > /opt/config/remote_repo.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -1347,6 +1475,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -1382,8 +1512,21 @@ resources:
             echo "__cloud_env__" > /opt/config/cloud_env.txt
             echo "__external_dns__" > /opt/config/external_dns.txt
             echo "__sdc_repo__" > /opt/config/remote_repo.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -1425,6 +1568,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -1456,8 +1601,21 @@ resources:
             echo "__cloud_env__" > /opt/config/cloud_env.txt
             echo "__external_dns__" > /opt/config/external_dns.txt
             echo "__portal_repo__" > /opt/config/remote_repo.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -1466,7 +1624,6 @@ resources:
             chmod +x portal_install.sh
             ./portal_install.sh
 
-
   # Policy Engine instantiation
   policy_private_port:
     type: OS::Neutron::Port
@@ -1499,6 +1656,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -1528,8 +1687,21 @@ resources:
             echo "__cloud_env__" > /opt/config/cloud_env.txt
             echo "__external_dns__" > /opt/config/external_dns.txt
             echo "__policy_repo__" > /opt/config/remote_repo.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -1571,6 +1743,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -1602,8 +1776,21 @@ resources:
             echo "__cloud_env__" > /opt/config/cloud_env.txt
             echo "__external_dns__" > /opt/config/external_dns.txt
             echo "__appc_repo__" > /opt/config/remote_repo.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -1645,6 +1832,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -1684,8 +1873,21 @@ resources:
             echo "__cloud_env__" > /opt/config/cloud_env.txt
             echo "__external_dns__" > /opt/config/external_dns.txt
             echo "__clamp_repo__" > /opt/config/remote_repo.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -1727,6 +1929,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -1829,8 +2033,21 @@ resources:
             echo "export VID_IP=__vid_ip_addr__" >> /opt/config/onap_ips.txt
             echo "export CLAMP_IP=__clamp_ip_addr__" >> /opt/config/onap_ips.txt
             echo "export OPENO_IP=__openo_ip_addr__" >> /opt/config/onap_ips.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -1876,6 +2093,8 @@ resources:
           params:
             __rand_str__: { get_resource: random-str }
             # repo related
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __artifacts_version__: { get_param: artifacts_version }
             __docker_version__: { get_param: dcae_docker }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
@@ -2045,8 +2264,21 @@ resources:
             echo "__dcae_prh_docker__" > /opt/config/dcae_docker_prh.txt
             echo "__holmes_em_docker__" > /opt/config/holmes_docker_em.txt
             echo "__holmes_rm_docker__" > /opt/config/holmes_docker_rm.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -2088,6 +2320,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -2115,8 +2349,21 @@ resources:
             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
             echo "__cloud_env__" > /opt/config/cloud_env.txt
             echo "__external_dns__" > /opt/config/external_dns.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -2158,6 +2405,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -2191,8 +2440,21 @@ resources:
             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
             echo "__cloud_env__" > /opt/config/cloud_env.txt
             echo "__external_dns__" > /opt/config/external_dns.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -2234,6 +2496,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -2263,8 +2527,21 @@ resources:
             echo "__aaf_repo__" > /opt/config/remote_repo.txt
             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
             echo "__local_ip__" > /opt/config/local_ip.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -2305,6 +2582,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -2334,8 +2613,21 @@ resources:
             echo "__sms_repo__" > /opt/config/remote_repo.txt
             echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
             echo "__local_ip__" > /opt/config/local_ip.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip
@@ -2376,6 +2668,8 @@ resources:
       user_data:
         str_replace:
           params:
+            __http_proxy__: { get_param: http_proxy }
+            __https_proxy__: { get_param: https_proxy }
             __nexus_artifact_repo__: { get_param: nexus_artifact_repo }
             __nexus_docker_repo__: { get_param: nexus_docker_repo }
             __nexus_username__: { get_param: nexus_username }
@@ -2409,8 +2703,21 @@ resources:
             echo "__sdc_ip_addr__" > /opt/config/sdc_ip_addr.txt
             echo "__aai1_ip_addr__" > /opt/config/aai_ip_addr.txt
             echo "__so_ip_addr__" > /opt/config/so_ip_addr.txt
+            echo "__http_proxy__" > /opt/config/http_proxy.txt
+            echo "__https_proxy__" > /opt/config/https_proxy.txt
+            if [ __http_proxy__ != "no_proxy" ]
+            then
+            echo "Acquire" > /etc/apt/apt.conf.d/apt.conf
+            echo "{" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  Retries \"0\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  http::Proxy \"http://__http_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "  https::Proxy \"https://__https_proxy__/\";" >> /etc/apt/apt.conf.d/apt.conf
+            echo "};" >> /etc/apt/apt.conf.d/apt.conf
 
             # Download and run install script
+            export http_proxy=__http_proxy__
+            export https_proxy=__https_proxy__
+            fi
             apt-get -y install unzip
             if [[ "__artifacts_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi
             curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo&a=boot&e=zip&v=__artifacts_version__" -o /opt/boot-__artifacts_version__.zip