aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/heat/onap-oom
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-02-08 07:16:37 -0800
committerGary Wu <gary.i.wu@huawei.com>2018-02-08 07:16:37 -0800
commit3ad596fbae7795d289a1fa67eb017b8c6f484c01 (patch)
treeaa0a540947751e0fd48c546c052d878967e7e332 /deployment/heat/onap-oom
parent669e36a74c030d89e00a27916232c46ff493d2b2 (diff)
Make apt and docker proxies optional
Change-Id: Id786be755d8db88359c00cb442d7132afbb64f95 Issue-ID: INT-414 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'deployment/heat/onap-oom')
-rw-r--r--deployment/heat/onap-oom/rancher_vm_entrypoint.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/deployment/heat/onap-oom/rancher_vm_entrypoint.sh b/deployment/heat/onap-oom/rancher_vm_entrypoint.sh
index da1955446..ac704f106 100644
--- a/deployment/heat/onap-oom/rancher_vm_entrypoint.sh
+++ b/deployment/heat/onap-oom/rancher_vm_entrypoint.sh
@@ -3,15 +3,19 @@ printenv
echo `hostname -I` `hostname` >> /etc/hosts
mkdir -p /etc/docker
-cat > /etc/docker/daemon.json <<EOF
+if [ ! -z "__docker_proxy__" ]; then
+ cat > /etc/docker/daemon.json <<EOF
{
"insecure-registries" : ["__docker_proxy__"]
}
EOF
-cat > /etc/apt/apt.conf.d/30proxy<<EOF
+fi
+if [ ! -z "__apt_proxy__" ]; then
+ cat > /etc/apt/apt.conf.d/30proxy<<EOF
Acquire::http { Proxy "http://__apt_proxy__"; };
Acquire::https::Proxy "DIRECT";
EOF
+fi
apt-get -y update
apt-get -y install docker.io
usermod -aG docker ubuntu