summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xboot/dcae2_vm_init.sh7
-rw-r--r--heat/ONAP/cloud-config/dcae2_install.sh12
2 files changed, 12 insertions, 7 deletions
diff --git a/boot/dcae2_vm_init.sh b/boot/dcae2_vm_init.sh
index f423256e..e4288195 100755
--- a/boot/dcae2_vm_init.sh
+++ b/boot/dcae2_vm_init.sh
@@ -23,11 +23,6 @@
set -ex
-# add well-known DCAE hostname aliases
-echo "$(cat /opt/config/dcae_ip_addr.txt) consul" >>/etc/hosts
-echo "$(cat /opt/config/dcae_ip_addr.txt) dockerhost" >>/etc/hosts
-
-
URL_ROOT='nexus.onap.org/service/local/repositories/raw/content'
REPO_BLUEPRINTS='org.onap.dcaegen2.platform.blueprints'
REPO_DEPLOYMENTS='org.onap.dcaegen2.deployments'
@@ -52,6 +47,8 @@ then
export https_proxy=$HTTPS_PROXY
fi
+# clean up old network configuration in docker engine
+docker network rm config_default
docker login -u "$NEXUS_USER" -p "$NEXUS_PASSWORD" "$NEXUS_DOCKER_REPO"
diff --git a/heat/ONAP/cloud-config/dcae2_install.sh b/heat/ONAP/cloud-config/dcae2_install.sh
index e7d72df5..f7866fda 100644
--- a/heat/ONAP/cloud-config/dcae2_install.sh
+++ b/heat/ONAP/cloud-config/dcae2_install.sh
@@ -18,6 +18,10 @@
set -ex
+# add well-known DCAE hostname aliases
+echo "$(cat /opt/config/dcae_ip_addr.txt) consul" >>/etc/hosts
+echo "$(cat /opt/config/dcae_ip_addr.txt) dockerhost" >>/etc/hosts
+
# Read configuration files
EXTERNAL_DNS=$(cat /opt/config/external_dns.txt)
MAC_ADDR=$(cat /opt/config/mac_addr.txt)
@@ -39,7 +43,11 @@ apt-get install -y python python-pip
cp /opt/boot/dcae2_vm_init.sh /opt/dcae2_vm_init.sh
chmod +x /opt/dcae2_vm_init.sh
-echo "DOCKER_OPTS=\" $DOCKER_OPTS --raw-logs -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock\" " >> /etc/default/docker
+DOCKER_OPTS=$(cat /etc/default/docker | grep ^DOCKER_OPTS)
+DOCKER_OPTS=${DOCKER_OPTS::-1}" --raw-logs -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock\""
+sed -i "s|DOCKER_OPTS=.*|DOCKER_OPTS=$DOCKER_OPTS|g" /etc/default/docker
+
+#echo "DOCKER_OPTS=\" $DOCKER_OPTS --raw-logs -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock\" " >> /etc/default/docker
sed -i "/ExecStart/s/$/ -H tcp:\/\/0.0.0.0:2376 --raw-logs/g" /etc/systemd/system/docker.service
if [ ! -e /etc/docker/daemon.json ]; then
REGISTRY="$(cat /opt/config/nexus_docker_repo.txt)"
@@ -56,4 +64,4 @@ mkdir -p /opt/app/config
cd /opt
-./dcae2_vm_init.sh
+./dcae2_vm_init.sh &>/dev/null &disown