aboutsummaryrefslogtreecommitdiffstats
path: root/plans/usecases/5G-bulkpm
diff options
context:
space:
mode:
authorLiamBurke <Liam.Burke@ericsson.com>2019-03-12 22:50:33 +0000
committerLiamBurke <liam.burke@ericsson.com>2019-03-12 22:53:16 +0000
commit3608af7aab43631c178ab454b213028960074af6 (patch)
tree373825d217979c019223c4f50c07a324f25159f2 /plans/usecases/5G-bulkpm
parent08dc6ff5d9404944ce0588bec1728294a61e73f4 (diff)
Updates for DFC new implentation
-Add Consul, CBS, Buscontroller Images Change-Id: I3f0771e119a8388f7a437256ba656f278385c316 Issue-ID: INT-832 Signed-off-by: LiamBurke <liam.burke@ericsson.com>
Diffstat (limited to 'plans/usecases/5G-bulkpm')
-rw-r--r--plans/usecases/5G-bulkpm/composefile/docker-compose-dfc.yml12
-rw-r--r--plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml30
-rw-r--r--plans/usecases/5G-bulkpm/setup.sh48
-rw-r--r--plans/usecases/5G-bulkpm/teardown.sh7
4 files changed, 80 insertions, 17 deletions
diff --git a/plans/usecases/5G-bulkpm/composefile/docker-compose-dfc.yml b/plans/usecases/5G-bulkpm/composefile/docker-compose-dfc.yml
new file mode 100644
index 00000000..aae77f71
--- /dev/null
+++ b/plans/usecases/5G-bulkpm/composefile/docker-compose-dfc.yml
@@ -0,0 +1,12 @@
+version: '2.1'
+services:
+ dfc:
+ container_name: dfc
+ image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:latest
+ ports:
+ - "8433:8433"
+ environment:
+ CONSUL_HOST: CONSUL_IP
+ CONSUL_PORT: 8500
+ extra_hosts:
+ - "dmaap-dr-node:DR_NODE_IP" \ No newline at end of file
diff --git a/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml b/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml
index d90f7b4d..e1e591d7 100644
--- a/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml
+++ b/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml
@@ -68,14 +68,32 @@ services:
- /host/upload:/home/admin
command: admin:admin:1001
- dfc:
- container_name: dfc
- image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:latest
- ports:
- - "8433:8433"
-
ves:
container_name: vescollector
image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.4.1
environment:
DMAAPHOST:
+
+ consul:
+ container_name: consul
+ image: nexus3.onap.org:10001/consul:latest
+
+ cbs:
+ container_name: cbs
+ image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app:latest
+ environment:
+ CONSUL_HOST:
+
+ buscontroller:
+ container_name: buscontroller
+ image: nexus3.onap.org:10001/onap/dmaap/dmaap-bc:1.1.1
+ ports:
+ - "18080:8080"
+ - "18443:8443"
+ extra_hosts:
+ - "dmaap-dr-prov:DMAAPDR"
+ - "message-router:DMAAPMR"
+ volumes:
+ - /tmp/docker-databus-controller.conf:/opt/app/config/conf
+ depends_on:
+ - datarouter-prov \ No newline at end of file
diff --git a/plans/usecases/5G-bulkpm/setup.sh b/plans/usecases/5G-bulkpm/setup.sh
index 5f3c4a3c..658a6c1e 100644
--- a/plans/usecases/5G-bulkpm/setup.sh
+++ b/plans/usecases/5G-bulkpm/setup.sh
@@ -70,6 +70,8 @@ cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/res
mkdir docker-compose
cd $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose
cp $WORKSPACE/plans/usecases/5G-bulkpm/composefile/docker-compose-e2e.yml $WORKSPACE/archives/dmaapdr/datarouter/datarouter-docker-compose/src/main/resources/docker-compose/docker-compose.yml
+cp $WORKSPACE/plans/dcaegen2-pmmapper/pmmapper/assets/docker-databus-controller.conf /tmp/
+sed -i 's/DMAAPMR/'$DMAAP_MR_IP'/g' /tmp/docker-databus-controller.conf
docker login -u docker -p docker nexus3.onap.org:10001
docker-compose up -d
@@ -77,6 +79,9 @@ echo "Disregard the message ERROR: for datarouter-node Container 1234456 is unh
docker kill datarouter-prov
docker kill datarouter-node
docker kill vescollector
+docker kill cbs
+CONSUL_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' consul )
+sed -i -e '/CONSUL_HOST:/ s/:.*/: '$CONSUL_IP'/' docker-compose.yml
HOST_IP=$(ip route get 8.8.8.8 | awk '/8.8.8.8/ {print $NF}')
sed -i -e '/DMAAPHOST:/ s/:.*/: '$HOST_IP'/' docker-compose.yml
MARIADB=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mariadb )
@@ -98,7 +103,6 @@ for i in {1..10}; do
done
sleep 5
-
# Get IP address of datarrouger-prov, datarouter-node, fileconsumer-node.
DR_PROV_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-prov)
DR_NODE_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' datarouter-node)
@@ -127,6 +131,27 @@ export VESC_IP=${VESC_IP}
export HOST_IP=${HOST_IP}
export DMAAP_MR_IP=${DMAAP_MR_IP}
+docker kill buscontroller
+sed -i 's/DMAAPDR/'$DR_PROV_IP'/g' docker-compose.yml
+sed -i 's/DMAAPMR/'$DMAAP_MR_IP'/g' docker-compose.yml
+docker-compose up -d
+sed -i 's/DMAAPDR/'$DR_PROV_IP'/g' /tmp/docker-databus-controller.conf
+
+# Wait for initialization of Docker container for datarouter-node, datarouter-prov and mariadb, Consul, CBS, Buscontroller
+for i in {1..10}; do
+ if [ $(docker inspect --format '{{ .State.Running }}' consul) ] && \
+ [ $(docker inspect --format '{{ .State.Running }}' cbs) ] && \
+ [ $(docker inspect --format '{{ .State.Running }}' buscontroller) ]
+ then
+ echo "Data Router, Consul, Config Binding Service, Buscontroller Services Running"
+ break
+ else
+ echo sleep $i
+ sleep $i
+ fi
+done
+sleep 10
+
#Pass any variables required by Robot test suites in ROBOT_VARIABLES
ROBOT_VARIABLES="-v DR_PROV_IP:${DR_PROV_IP} -v DR_NODE_IP:${DR_NODE_IP} -v DMAAP_MR_IP:${DMAAP_MR_IP} -v VESC_IP:${VESC_IP} -v VESC_PORT:${VESC_PORT} -v DR_SUBSCIBER_IP:${DR_SUBSCIBER_IP}"
@@ -135,21 +160,26 @@ pip install jsonschema uuid
sleep 2
# Data File Collector configuration :
-docker cp dfc:/config/datafile_endpoints.json /tmp/
-echo data_endpoints.json from DFC containter
-cat /tmp/datafile_endpoints.json
+mkdir /tmp/docker-compose
+cd /tmp/docker-compose
+cp $WORKSPACE/plans/usecases/5G-bulkpm/composefile/docker-compose-dfc.yml /tmp/docker-compose/docker-compose.yml
+sed -i 's/DR_NODE_IP/'$DR_NODE_IP'/g' /tmp/docker-compose/docker-compose.yml
cp $WORKSPACE/plans/usecases/5G-bulkpm/assets/datafile_endpoints.json /tmp/
sed -i 's/dmaapmrhost/'${DMAAP_MR_IP}'/g' /tmp/datafile_endpoints.json
sed -i 's/dmaapdrhost/'${DR_PROV_IP}'/g' /tmp/datafile_endpoints.json
-echo data_endpoints.json copied onto the DFC containter
+echo data_endpoints.json to be copied onto the DFC containter
cat /tmp/datafile_endpoints.json
-docker cp /tmp/datafile_endpoints.json dfc:/config/
+docker-compose up -d
+sleep 2
+docker cp dfc:/opt/app/datafile/config/datafile_endpoints.json /tmp/datafile_endpoints.json.fromcontainer
+echo data_endpoints.json from DFC containter
+cat /tmp/datafile_endpoints.json.fromcontainer
+docker cp /tmp/datafile_endpoints.json dfc:/opt/app/datafile/config/
#Increase Logging
-docker exec dfc /bin/sh -c " sed -i 's/org.onap.dcaegen2.collectors.datafile: ERROR/org.onap.dcaegen2.collectors.datafile: TRACE/g' /config/application.yaml"
+docker exec dfc /bin/sh -c " sed -i 's/org.onap.dcaegen2.collectors.datafile: ERROR/org.onap.dcaegen2.collectors.datafile: TRACE/g' /opt/app/datafile/config/application.yaml"
docker restart dfc
-docker exec dfc /bin/sh -c "echo '${DR_NODE_IP}' dmaap-dr-node >> /etc/hosts"
+sleep 2
-# SFTP Configuration:
# Update the File Ready Notification with actual sftp ip address and copy pm files to sftp server.
cp $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
sed -i 's/sftpserver/'${SFTP_IP}'/g' $WORKSPACE/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json
diff --git a/plans/usecases/5G-bulkpm/teardown.sh b/plans/usecases/5G-bulkpm/teardown.sh
index a69dc358..7a99941b 100644
--- a/plans/usecases/5G-bulkpm/teardown.sh
+++ b/plans/usecases/5G-bulkpm/teardown.sh
@@ -1,6 +1,6 @@
#!/bin/bash
echo "Starting teardown script"
-docker exec dfc /bin/sh -c "less /opt/log/application.log" > /tmp/dfc_docker.log
+docker exec dfc /bin/sh -c "less /var/log/ONAP/application.log" > /tmp/dfc_docker.log
cat /tmp/dfc_docker.log
sleep 3
rm /tmp/dfc_docker.log.robot
@@ -13,4 +13,7 @@ kill-instance.sh datarouter-prov
kill-instance.sh fileconsumer-node
kill-instance.sh mariadb
kill-instance.sh dfc
-kill-instance.sh sftp \ No newline at end of file
+kill-instance.sh sftp
+kill-instance.sh cbs
+kill-instance.sh consul
+kill-instance.sh buscontroller \ No newline at end of file