summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile1
-rw-r--r--etc/DmaapConfig.json6
-rw-r--r--src/main/scripts/docker-entry.sh6
3 files changed, 9 insertions, 4 deletions
diff --git a/Dockerfile b/Dockerfile
index c7f7c2e2..37afd65b 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,6 +7,7 @@ WORKDIR /opt/app/VESCollector
ENV HOME /opt/app/VESCollector
ENV JAVA_HOME /usr
+ENV HOSTALIASES /etc/host.aliases
RUN apt-get update && apt-get install -y \
curl \
diff --git a/etc/DmaapConfig.json b/etc/DmaapConfig.json
index f144b382..529f314a 100644
--- a/etc/DmaapConfig.json
+++ b/etc/DmaapConfig.json
@@ -6,7 +6,7 @@
"class": "HpCambriaOutputStream",
"stripHpId": "true",
"type": "out",
- "cambria.hosts": "onap.dmaap.org"
+ "cambria.hosts": "onap-dmaap"
},
{
"name": "ves_fault",
@@ -14,7 +14,7 @@
"class": "HpCambriaOutputStream",
"stripHpId": "true",
"type": "out",
- "cambria.hosts": "onap.dmaap.org"
+ "cambria.hosts": "onap-dmaap"
},
{
"name": "ves_heartbeat",
@@ -22,7 +22,7 @@
"class": "HpCambriaOutputStream",
"stripHpId": "true",
"type": "out",
- "cambria.hosts": "onap.dmaap.org"
+ "cambria.hosts": "onap-dmaap"
}
]
}
diff --git a/src/main/scripts/docker-entry.sh b/src/main/scripts/docker-entry.sh
index 26dcb896..3b73005f 100644
--- a/src/main/scripts/docker-entry.sh
+++ b/src/main/scripts/docker-entry.sh
@@ -24,7 +24,11 @@ if [ ! -z "$COLLECTOR_IP" ]; then
fi
if [ ! -z "$DMAAPHOST" ]; then
- echo $DMAAPHOST onap.dmaap.org >> /etc/hosts
+ if [ -z "$(echo $DMAAPHOST | sed -e 's/[0-9\.]//g')" ]; then
+ echo "$DMAAPHOST onap-dmaap" >> /etc/hosts
+ else
+ echo "onap-dmaap $DMAAPHOST" >> /etc/host.aliases
+ fi
else
echo "DMAAPHOST ENV NOT SET!! PUBLISH WILL NOT BE SUPPORTED"
fi