PM-Mapper CSIT image pulls enhancements 50/121550/13
authorRemigiusz Janeczek <remigiusz.janeczek@nokia.com>
Wed, 26 May 2021 15:58:44 +0000 (17:58 +0200)
committerTomasz Wrobel <tomasz.wrobel@nokia.com>
Tue, 1 Jun 2021 07:12:31 +0000 (09:12 +0200)
- Add nexus3.onap.org repository to external images
to avoid dockerhub pull limits.
- Remove repository from PM-Mapper image to force use
of image built earlier with maven.
.gitignore update.
- Add DMaaP healthcheck to setup.sh scripts

Issue-ID: DCAEGEN2-2796
Issue-ID: DCAEGEN2-2799
Change-Id: Ie98336b91b37d61767049d4857b016fb618e4e8e
Signed-off-by: Remigiusz Janeczek <remigiusz.janeczek@nokia.com>
csit/.gitignore
csit/plans/filesprocessingconfigpmmapper/setup.sh
csit/plans/pmmapper/docker-compose.yml
csit/plans/pmmapper/setup.sh
csit/tests/filesprocessingconfigpmmapper/filesprocessingconfigpmmapper.robot
csit/tests/filesprocessingconfigpmmapper/libraries/DockerContainerManager.pyc [deleted file]
csit/tests/filesprocessingconfigpmmapper/libraries/EnvsReader.pyc [deleted file]
csit/tests/filesprocessingconfigpmmapper/libraries/LogReader.pyc [deleted file]

index c8865c2..3a900d8 100644 (file)
@@ -1,2 +1,3 @@
 env.properties
 archives/
+*.pyc
index 5f0b41b..0a86c0a 100644 (file)
@@ -78,6 +78,18 @@ for i in {1..5}; do
 done
 [ "$containers_ok" = "false" ] && echo "Error: required container not running." && exit 1
 
+#Data Router healthcheck
+for i in $(seq 10); do
+  curl -sf 'http://localhost:8080/internal/prov' -o /dev/null
+  curl_status=$?
+  if [ curl_status -eq 0 ]; then
+      break
+    else
+      sleep 2
+  fi
+done
+
+
 # Data Router Configuration.
 docker exec -i datarouter-prov sh -c \
     "curl -k  -X PUT https://$DR_PROV_IP:8443/internal/api/NODES?val=dmaap-dr-node\|$GATEWAY_IP"
index d612de2..ad671d2 100644 (file)
@@ -46,7 +46,7 @@ services:
       - "dcae-pm-mapper:$PMMAPPER_IP"
 
   node:
-    image: node:10-slim
+    image: nexus3.onap.org:10001/node:10-slim
     container_name: mr-simulator
     volumes:
       - /var/tmp/mrserver.js:/tmp/mrserver.js
@@ -57,7 +57,7 @@ services:
         ipv4_address: $NODE_IP
 
   mariadb:
-    image: mariadb:10.2.14
+    image: nexus3.onap.org:10001/mariadb:10.2.14
     container_name: mariadb
     ports:
       - "3306:3306"
index 918b7f6..258b99e 100644 (file)
@@ -71,6 +71,17 @@ for i in {1..5}; do
 done
 [ "$containers_ok" = "false" ] && echo "Error: required container not running." && exit 1
 
+#Data Router healthcheck
+for i in $(seq 10); do
+  curl -sf 'http://localhost:8080/internal/prov' -o /dev/null
+  curl_status=$?
+  if [ curl_status -eq 0 ]; then
+      break
+    else
+      sleep 2
+  fi
+done
+
 # Data Router Configuration.
 docker exec -i datarouter-prov sh -c \
     "curl -k  -X PUT https://$DR_PROV_IP:8443/internal/api/NODES?val=dmaap-dr-node\|$GATEWAY_IP"
index 9648ef8..5f026d1 100644 (file)
@@ -15,7 +15,7 @@ ${NR_VALID_METADATA_PATH}                ${ASSETS_PATH}/valid_metadata.json
 ${CLI_EXEC_CLI_PM_LOG_CLEAR}             docker exec pmmapper /bin/sh -c "echo -n "" > /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log"
 ${PUBLISH_NODE_URL}                      https://${DR_NODE_IP}:8443/publish/1
 ${CLI_EXEC_LOGS_LIST}                    docker exec datarouter-node /bin/sh -c "ls /opt/app/datartr/logs"
-${DOCKER_CLIENT_IMAGE}                   nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-mapper:latest
+${DOCKER_CLIENT_IMAGE}                   onap/org.onap.dcaegen2.services.pm-mapper:latest
 ${CLIENT_CONTAINER_NAME}                 pmmapper
 ${FILE_PATH}                             ${ASSETS_PATH}/ABigFile.xml
 ${CONFIG_ENVS_1_1}                       ${ASSETS_PATH}/config_1_1.env
@@ -122,6 +122,7 @@ GetLogsOutput
                                       ${exec}=                         Catenate                                  docker exec datarouter-node /bin/sh -c      ${file_path}
                                       ${single_file}=                  Run Process                               ${exec}         shell=yes
                                       ${output}=                       Catenate                                  SEPARATOR=\n         ${output}                  ${single_file.stdout}
+                                      Log                              ${output}
     END
     [Return]                          ${output}
 
diff --git a/csit/tests/filesprocessingconfigpmmapper/libraries/DockerContainerManager.pyc b/csit/tests/filesprocessingconfigpmmapper/libraries/DockerContainerManager.pyc
deleted file mode 100644 (file)
index 2bf62c3..0000000
Binary files a/csit/tests/filesprocessingconfigpmmapper/libraries/DockerContainerManager.pyc and /dev/null differ
diff --git a/csit/tests/filesprocessingconfigpmmapper/libraries/EnvsReader.pyc b/csit/tests/filesprocessingconfigpmmapper/libraries/EnvsReader.pyc
deleted file mode 100644 (file)
index 831aa34..0000000
Binary files a/csit/tests/filesprocessingconfigpmmapper/libraries/EnvsReader.pyc and /dev/null differ
diff --git a/csit/tests/filesprocessingconfigpmmapper/libraries/LogReader.pyc b/csit/tests/filesprocessingconfigpmmapper/libraries/LogReader.pyc
deleted file mode 100644 (file)
index d8e936c..0000000
Binary files a/csit/tests/filesprocessingconfigpmmapper/libraries/LogReader.pyc and /dev/null differ