summaryrefslogtreecommitdiffstats
path: root/heat/ONAP/cloud-config/dcae2_install.sh
diff options
context:
space:
mode:
authorLusheng Ji <lji@research.att.com>2018-09-18 00:13:42 -0400
committerLusheng Ji <lji@research.att.com>2018-09-18 13:57:09 +0000
commit30576033acda31e499bf15b2fa5d2f5c1eb3d296 (patch)
tree5fcc037039926d09c675186e3a5e7e576793ab6d /heat/ONAP/cloud-config/dcae2_install.sh
parent854b09f25a0527c7021a5c88b79d41112a2a164f (diff)
Remove deprecated R1 code
Issue-ID: DCAEGEN2-499 Change-Id: I8dd791c09a8f45412319f4a1d0f0fb919028b011 Signed-off-by: Lusheng Ji <lji@research.att.com>
Diffstat (limited to 'heat/ONAP/cloud-config/dcae2_install.sh')
-rw-r--r--heat/ONAP/cloud-config/dcae2_install.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/heat/ONAP/cloud-config/dcae2_install.sh b/heat/ONAP/cloud-config/dcae2_install.sh
index fbc8db3c..e7d72df5 100644
--- a/heat/ONAP/cloud-config/dcae2_install.sh
+++ b/heat/ONAP/cloud-config/dcae2_install.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#############################################################################
#
-# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -39,22 +39,21 @@ 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
+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)"
+ if [[ $REGISTRY != nexus3.onap.org* ]]; then
+ echo "{ \"insecure-registries\" : [\"${REGISTRY}\"] }" > /etc/docker/daemon.json
+ fi
+fi
systemctl daemon-reload
service docker restart
-# add hostname aliases
-echo "$(cat /opt/config/dcae_ip_addr.txt) consul" >>/etc/hosts
-echo "$(cat /opt/config/dcae_ip_addr.txt) dockerhost" >>/etc/hosts
-
# prepare the configurations needed by DCAEGEN2 installer
rm -rf /opt/app/config
mkdir -p /opt/app/config
-# private key
-sed -e 's/\\n/\n/g' /opt/config/priv_key | sed -e 's/^[ \t]*//g; s/[ \t]*$//g' > /opt/app/config/key
-chmod 777 /opt/app/config/key
cd /opt
./dcae2_vm_init.sh