aboutsummaryrefslogtreecommitdiffstats
path: root/test/ete/labs/tlab/apt-proxy.sh
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-02-15 12:05:26 -0800
committerGary Wu <gary.i.wu@huawei.com>2018-02-15 12:20:32 -0800
commit688201c1a862b3cdcc313093aa1d49fc10e034ae (patch)
treeec220a21bd76d1d3673ab41a3c4ca9f43f7e19ec /test/ete/labs/tlab/apt-proxy.sh
parent104a07ec59ff4422bae4f3b4a4cc6c6415bd6467 (diff)
Use local docker proxy for TLAB
Change-Id: I2ba86b0e34594bb9054bafb52b0780abbc2b2e10 Issue-ID: INT-414 Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'test/ete/labs/tlab/apt-proxy.sh')
-rwxr-xr-xtest/ete/labs/tlab/apt-proxy.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ete/labs/tlab/apt-proxy.sh b/test/ete/labs/tlab/apt-proxy.sh
new file mode 100755
index 000000000..f2094ee2f
--- /dev/null
+++ b/test/ete/labs/tlab/apt-proxy.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+sed -i '/#!\/bin\/bash/a\
+ mkdir -p /etc/docker\
+ cat > /etc/docker/daemon.json <<EOF\
+ {\
+ "insecure-registries" : ["192.168.31.204:5000"]\
+ }\
+ EOF\
+ cat > /etc/apt/apt.conf.d/30proxy<<EOF\
+ Acquire::http { Proxy "http://192.168.31.204:3142"; };\
+ Acquire::https::Proxy "DIRECT";\
+ EOF\
+ apt-get -y update' $1
+
+# don't use insecure docker proxy in dcae
+perl -i -0pe 's/(?<=dcae_c_vm:)(.*?)\{ get_param: nexus_docker_repo \}/$1"nexus3.onap.org:10001"/s' $1