blob: 59ba676a35639218de3798c61d0cc9ecf26267e2 [file] [log] [blame]
Gary Wud83efff2018-01-09 16:47:30 -08001#!/bin/bash
2sed -i '/#!\/bin\/bash/a\
Gary Wu53323362018-01-09 22:37:27 -08003 # sleep up to 3 minutes to avoid disk contention\
4 sleep $((RANDOM / 200))\
Gary Wu5e8e8122018-01-09 19:54:45 -08005 mkdir -p /etc/docker\
6 cat > /etc/docker/daemon.json <<EOF\
7 {\
Gary Wue0404342018-01-09 20:20:39 -08008 "insecure-registries" : ["docker-proxy.local.enacct.com:5000"]\
Gary Wu5e8e8122018-01-09 19:54:45 -08009 }\
10 EOF\
Gary Wud83efff2018-01-09 16:47:30 -080011 cat > /etc/apt/apt.conf.d/30proxy<<EOF\
12 Acquire::http { Proxy "http://stack.local.enacct.com:3142"; };\
13 Acquire::https::Proxy "DIRECT";\
14 EOF\
15 apt-get -y update' $1
Gary Wub57cc8f2018-01-12 01:17:32 -080016
17# don't use insecure docker proxy in dcae
18perl -i -0pe 's/(?<=dcae_c_vm:)(.*?)\{ get_param: nexus_docker_repo \}/$1"nexus3.onap.org:10001"/s' $1