summaryrefslogtreecommitdiffstats
path: root/boot
diff options
context:
space:
mode:
Diffstat (limited to 'boot')
-rw-r--r--boot/aaf_install.sh35
-rw-r--r--boot/aaf_serv.sh9
-rw-r--r--boot/aai_install.sh15
-rw-r--r--boot/aai_serv.sh8
-rw-r--r--boot/appc_install.sh15
-rw-r--r--boot/appc_serv.sh8
-rw-r--r--boot/clamp_install.sh15
-rw-r--r--boot/clamp_serv.sh8
-rw-r--r--boot/cli_install.sh9
-rwxr-xr-xboot/dcae2_install.sh15
-rw-r--r--boot/dcae2_serv.sh8
-rw-r--r--boot/dns_install.sh8
-rw-r--r--boot/imagetest.sh20
-rw-r--r--boot/mr_install.sh15
-rw-r--r--boot/mr_serv.sh8
-rw-r--r--boot/music_install.sh15
-rw-r--r--boot/music_serv.sh8
-rw-r--r--boot/nbi_install.sh15
-rw-r--r--boot/nbi_serv.sh8
-rw-r--r--boot/oof_install.sh15
-rw-r--r--boot/oof_serv.sh8
-rw-r--r--boot/openo_all_serv.sh8
-rw-r--r--boot/openo_install.sh15
-rw-r--r--boot/openo_serv.sh8
-rw-r--r--boot/policy_install.sh15
-rw-r--r--boot/policy_serv.sh8
-rw-r--r--boot/portal_install.sh15
-rw-r--r--boot/portal_serv.sh8
-rw-r--r--boot/robot_install.sh15
-rw-r--r--boot/robot_serv.sh8
-rw-r--r--boot/sdc_install.sh13
-rw-r--r--boot/sdc_serv.sh8
-rw-r--r--boot/sdnc_install.sh15
-rw-r--r--boot/sdnc_serv.sh8
-rw-r--r--boot/sms_install.sh15
-rw-r--r--boot/sms_serv.sh8
-rw-r--r--boot/so_install.sh15
-rw-r--r--boot/so_serv.sh8
-rw-r--r--boot/vid_install.sh15
-rw-r--r--boot/vid_serv.sh8
40 files changed, 472 insertions, 6 deletions
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.
|-->
<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.
diff --git a/boot/aaf_serv.sh b/boot/aaf_serv.sh
index 73d22ad3..51391b84 100644
--- a/boot/aaf_serv.sh
+++ b/boot/aaf_serv.sh
@@ -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"
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
diff --git a/boot/aai_serv.sh b/boot/aai_serv.sh
index 2e0dbab3..dc93be64 100644
--- a/boot/aai_serv.sh
+++ b/boot/aai_serv.sh
@@ -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"
diff --git a/boot/appc_install.sh b/boot/appc_install.sh
index ca7a8e22..7efedb81 100644
--- a/boot/appc_install.sh
+++ b/boot/appc_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" ]]
@@ -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
diff --git a/boot/appc_serv.sh b/boot/appc_serv.sh
index a71db888..de9c2594 100644
--- a/boot/appc_serv.sh
+++ b/boot/appc_serv.sh
@@ -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"
diff --git a/boot/clamp_install.sh b/boot/clamp_install.sh
index 0dbb8125..88b0370e 100644
--- a/boot/clamp_install.sh
+++ b/boot/clamp_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" ]]
@@ -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
diff --git a/boot/clamp_serv.sh b/boot/clamp_serv.sh
index ed311849..edda3939 100644
--- a/boot/clamp_serv.sh
+++ b/boot/clamp_serv.sh
@@ -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"
diff --git a/boot/cli_install.sh b/boot/cli_install.sh
index 22fec53e..4593c686 100644
--- a/boot/cli_install.sh
+++ b/boot/cli_install.sh
@@ -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
diff --git a/boot/dcae2_install.sh b/boot/dcae2_install.sh
index 5a8c7072..05722c36 100755
--- a/boot/dcae2_install.sh
+++ b/boot/dcae2_install.sh
@@ -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
diff --git a/boot/dcae2_serv.sh b/boot/dcae2_serv.sh
index 30e647e4..b05a8958 100644
--- a/boot/dcae2_serv.sh
+++ b/boot/dcae2_serv.sh
@@ -25,6 +25,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="./dcae2_vm_init.sh"
diff --git a/boot/dns_install.sh b/boot/dns_install.sh
index 4bfdbff4..fcb2c445 100644
--- a/boot/dns_install.sh
+++ b/boot/dns_install.sh
@@ -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
index 00000000..edd6154e
--- /dev/null
+++ b/boot/imagetest.sh
@@ -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
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
diff --git a/boot/mr_serv.sh b/boot/mr_serv.sh
index 77f86395..505beb8b 100644
--- a/boot/mr_serv.sh
+++ b/boot/mr_serv.sh
@@ -26,6 +26,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="./mr_vm_init.sh"
diff --git a/boot/music_install.sh b/boot/music_install.sh
index 86914192..a080034b 100644
--- a/boot/music_install.sh
+++ b/boot/music_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" ]]
@@ -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
diff --git a/boot/music_serv.sh b/boot/music_serv.sh
index 29dc4c3c..849d2eba 100644
--- a/boot/music_serv.sh
+++ b/boot/music_serv.sh
@@ -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"
diff --git a/boot/nbi_install.sh b/boot/nbi_install.sh
index 35e42ac4..5af9332d 100644
--- a/boot/nbi_install.sh
+++ b/boot/nbi_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" ]]
@@ -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
diff --git a/boot/nbi_serv.sh b/boot/nbi_serv.sh
index 6a9c2aed..a9390b8a 100644
--- a/boot/nbi_serv.sh
+++ b/boot/nbi_serv.sh
@@ -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"
diff --git a/boot/oof_install.sh b/boot/oof_install.sh
index d18bd575..8139b890 100644
--- a/boot/oof_install.sh
+++ b/boot/oof_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" ]]
@@ -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
diff --git a/boot/oof_serv.sh b/boot/oof_serv.sh
index 58a1691b..01fb3fd3 100644
--- a/boot/oof_serv.sh
+++ b/boot/oof_serv.sh
@@ -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"
diff --git a/boot/openo_all_serv.sh b/boot/openo_all_serv.sh
index 9c523a8c..e6776830 100644
--- a/boot/openo_all_serv.sh
+++ b/boot/openo_all_serv.sh
@@ -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
diff --git a/boot/openo_install.sh b/boot/openo_install.sh
index 5cfaea4a..69cd2f76 100644
--- a/boot/openo_install.sh
+++ b/boot/openo_install.sh
@@ -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
diff --git a/boot/openo_serv.sh b/boot/openo_serv.sh
index 0afa931e..c46329ad 100644
--- a/boot/openo_serv.sh
+++ b/boot/openo_serv.sh
@@ -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"
diff --git a/boot/policy_install.sh b/boot/policy_install.sh
index 0e979910..6394fc18 100644
--- a/boot/policy_install.sh
+++ b/boot/policy_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" ]]
@@ -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
diff --git a/boot/policy_serv.sh b/boot/policy_serv.sh
index 2e7195b9..cad27206 100644
--- a/boot/policy_serv.sh
+++ b/boot/policy_serv.sh
@@ -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"
diff --git a/boot/portal_install.sh b/boot/portal_install.sh
index 5b93c608..60b3d3d1 100644
--- a/boot/portal_install.sh
+++ b/boot/portal_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" ]]
@@ -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
diff --git a/boot/portal_serv.sh b/boot/portal_serv.sh
index cf0c412d..19954880 100644
--- a/boot/portal_serv.sh
+++ b/boot/portal_serv.sh
@@ -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"
diff --git a/boot/robot_install.sh b/boot/robot_install.sh
index 9978e566..d3807f82 100644
--- a/boot/robot_install.sh
+++ b/boot/robot_install.sh
@@ -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
diff --git a/boot/robot_serv.sh b/boot/robot_serv.sh
index 7c4419d1..d1203e5e 100644
--- a/boot/robot_serv.sh
+++ b/boot/robot_serv.sh
@@ -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"
diff --git a/boot/sdc_install.sh b/boot/sdc_install.sh
index 6b48f557..b0d58996 100644
--- a/boot/sdc_install.sh
+++ b/boot/sdc_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" ]]
@@ -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
diff --git a/boot/sdc_serv.sh b/boot/sdc_serv.sh
index b48c8484..a2bb3d11 100644
--- a/boot/sdc_serv.sh
+++ b/boot/sdc_serv.sh
@@ -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"
diff --git a/boot/sdnc_install.sh b/boot/sdnc_install.sh
index 7ca69776..196542fa 100644
--- a/boot/sdnc_install.sh
+++ b/boot/sdnc_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" ]]
@@ -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
diff --git a/boot/sdnc_serv.sh b/boot/sdnc_serv.sh
index 58f03f1c..cce2039c 100644
--- a/boot/sdnc_serv.sh
+++ b/boot/sdnc_serv.sh
@@ -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"
diff --git a/boot/sms_install.sh b/boot/sms_install.sh
index 1c8b6bae..5522c373 100644
--- a/boot/sms_install.sh
+++ b/boot/sms_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" ]]
@@ -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
diff --git a/boot/sms_serv.sh b/boot/sms_serv.sh
index 7cbdab7e..2bbf255d 100644
--- a/boot/sms_serv.sh
+++ b/boot/sms_serv.sh
@@ -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"
diff --git a/boot/so_install.sh b/boot/so_install.sh
index 77f2a7a6..f58a6167 100644
--- a/boot/so_install.sh
+++ b/boot/so_install.sh
@@ -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
diff --git a/boot/so_serv.sh b/boot/so_serv.sh
index d324447f..762d2e1b 100644
--- a/boot/so_serv.sh
+++ b/boot/so_serv.sh
@@ -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"
diff --git a/boot/vid_install.sh b/boot/vid_install.sh
index f1bd3cca..74018f60 100644
--- a/boot/vid_install.sh
+++ b/boot/vid_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" ]]
@@ -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
diff --git a/boot/vid_serv.sh b/boot/vid_serv.sh
index 445196c3..91b4d248 100644
--- a/boot/vid_serv.sh
+++ b/boot/vid_serv.sh
@@ -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"