aboutsummaryrefslogtreecommitdiffstats
path: root/heat/ONAP
diff options
context:
space:
mode:
authorMarco Platania <platania@research.att.com>2018-09-26 09:53:44 -0400
committerMarco Platania <platania@research.att.com>2018-09-26 09:53:44 -0400
commit18ef61806ca74186ef1b45c5b854c4b2658f857c (patch)
tree5075d62ccd2084bdd16b27ad9fe6adb4624b761e /heat/ONAP
parent503068c084efe36f2349413679a3f3602641b094 (diff)
Fix DCAE deployment in Heat
Change-Id: If5be263616df3e0e726d8a111862fa017d0b8fa6 Issue-ID: INT-669 Signed-off-by: Marco Platania <platania@research.att.com>
Diffstat (limited to 'heat/ONAP')
-rw-r--r--heat/ONAP/cloud-config/dcae2_install.sh12
1 files changed, 10 insertions, 2 deletions
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