diff options
42 files changed, 786 insertions, 7 deletions
diff --git a/boot/aaf_install.sh b/boot/aaf_install.sh index af0ebbfe..882c3ee4 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 != "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 +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..597969bc 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 != "no_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..09949bb9 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 != "no_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..6947b9f6 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 != "no_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..2c3a898a 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 != "no_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..cfb77e45 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 != "no_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..9e324dc0 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 != "no_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..11b95a12 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 != "no_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..9c4eea02 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 != "no_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..4e73ac88 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 != "no_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..57de2908 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 != "no_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..71f0245d 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 != "no_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..f5e2b230 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 != "no_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..d27e4693 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 != "no_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..656b9afb 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 != "no_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..8083cb7e 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 != "no_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..e5bb37ea 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 != "no_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..06310db7 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 != "no_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..48e7259e 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 != "no_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..8e92d204 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 != "no_proxy" ] +then + export http_proxy=$HTTP_PROXY + export https_proxy=$HTTPS_PROXY +fi dir="/opt" cmd="./vid_vm_init.sh" diff --git a/heat/ONAP/onap_openstack.env b/heat/ONAP/onap_openstack.env index 72cf6e4a..f016b0b0 100644 --- a/heat/ONAP/onap_openstack.env +++ b/heat/ONAP/onap_openstack.env @@ -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) + ###################### # # diff --git a/heat/ONAP/onap_openstack.yaml b/heat/ONAP/onap_openstack.yaml index f9c2528f..2eaaf738 100644 --- a/heat/ONAP/onap_openstack.yaml +++ b/heat/ONAP/onap_openstack.yaml @@ -141,6 +141,16 @@ parameters: type: string description: Region where the DCAE controller will spin the VMs + http_proxy: + type: string + description: http proxy address + default: 'no_proxy' + + https_proxy: + type: string + description: https proxy address + default: 'no_proxy' + ###################### # # # Network parameters # @@ -643,6 +653,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 +712,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 +769,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 +801,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 +856,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 +888,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 +944,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 +987,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 +1043,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 +1072,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 +1128,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 +1240,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 +1296,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 +1325,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 +1381,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 +1412,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 +1477,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 +1514,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 +1570,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 +1603,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 +1626,6 @@ resources: chmod +x portal_install.sh ./portal_install.sh - # Policy Engine instantiation policy_private_port: type: OS::Neutron::Port @@ -1499,6 +1658,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 +1689,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 +1745,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 +1778,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 +1834,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 +1875,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 +1931,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 +2035,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 +2095,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 +2266,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 +2322,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 +2351,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 +2407,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 +2442,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 +2498,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 +2529,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 +2584,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 +2615,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 +2670,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 +2705,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 |