[BUG] CPS NCMP management endpoints update 15/136315/5
authormpriyank <priyank.maheshwari@est.tech>
Wed, 25 Oct 2023 11:23:10 +0000 (12:23 +0100)
committerPriyank Maheshwari <priyank.maheshwari@est.tech>
Mon, 6 Nov 2023 12:42:19 +0000 (12:42 +0000)
- CPS and NCMP management endpoint updated from /manage to /actuator now
- The management port is same as application port now
- CSIT test cases update
- Update in Security params to allow the changed URL.
- Admin guid update
- Release notes updated
- Local docker-compose and prometheus updated

Issue-ID: CPS-1923
Change-Id: I013d35fd96d393dec8cf067bbeae0f92b6b8d8db
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
cps-application/src/main/resources/application.yml
csit/plans/cps/setup.sh
csit/plans/cps/test.properties
csit/tests/actuator/actuator.robot
docker-compose/docker-compose.yml
docker-compose/prometheus.yml
docs/admin-guide.rst
docs/release-notes.rst
test-tools/generate-metrics-report.sh

index 7beab2e..e84b193 100644 (file)
@@ -139,7 +139,7 @@ springdoc:
             - name: cps-ncmp-inventory
               url: /api-docs/cps-ncmp/openapi-inventory.yaml
 
-permit-uri: /manage/**,/swagger-ui.html,/swagger-ui/**,/swagger-resources/**,/api-docs/**
+permit-uri: /actuator/**,/swagger-ui.html,/swagger-ui/**,/swagger-resources/**,/api-docs/**
 
 security:
     # comma-separated uri patterns which do not require authorization
@@ -149,11 +149,8 @@ security:
 
 # Actuator
 management:
-    server:
-        port: 8081
     endpoints:
         web:
-            base-path: /manage
             exposure:
                 include: info,health,loggers,prometheus
     endpoint:
index f997d28..bba4879 100755 (executable)
@@ -32,7 +32,7 @@ check_health()
 
   while [ "$TICKER" -le "$TIME_OUT" ]; do
 
-    RESPONSE=$(curl --location --request GET 'http://'$1'/manage/health/readiness')
+    RESPONSE=$(curl --location --request GET 'http://'$1'/actuator/health/readiness')
 
     if [[ "$RESPONSE" == *"UP"* ]]; then
       echo "$2 started in $TICKER"
@@ -121,12 +121,12 @@ done
 
 ###################### verify ncmp-cps health ##########################
 
-check_health $CPS_CORE_HOST:$CPS_CORE_MANAGEMENT_PORT 'cps-ncmp'
+check_health $CPS_CORE_HOST:$CPS_CORE_PORT 'cps-ncmp'
 
 ###################### verify dmi health ##########################
 
-check_health $DMI_HOST:$DMI_MANAGEMENT_PORT 'dmi-plugin'
+check_health $DMI_HOST:$DMI_PORT 'dmi-plugin'
 
 ###################### ROBOT Configurations ##########################
 # Pass variables required for Robot test suites in ROBOT_VARIABLES
-ROBOT_VARIABLES="-v CPS_CORE_HOST:$CPS_CORE_HOST -v CPS_CORE_PORT:$CPS_CORE_PORT -v DMI_HOST:$LOCAL_IP -v DMI_PORT:$DMI_PORT -v DMI_CSIT_STUB_HOST:$LOCAL_IP -v DMI_CSIT_STUB_PORT:$DMI_DEMO_STUB_PORT -v DMI_AUTH_ENABLED:$DMI_AUTH_ENABLED -v CPS_CORE_MANAGEMENT_PORT:$CPS_CORE_MANAGEMENT_PORT -v DATADIR:$WORKSPACE/data -v DATADIR_SUBS_NOTIFICATION:$WORKSPACE/data/subscription-notification --exitonfailure"
\ No newline at end of file
+ROBOT_VARIABLES="-v CPS_CORE_HOST:$CPS_CORE_HOST -v CPS_CORE_PORT:$CPS_CORE_PORT -v DMI_HOST:$LOCAL_IP -v DMI_PORT:$DMI_PORT -v DMI_CSIT_STUB_HOST:$LOCAL_IP -v DMI_CSIT_STUB_PORT:$DMI_DEMO_STUB_PORT -v DMI_AUTH_ENABLED:$DMI_AUTH_ENABLED -v DATADIR:$WORKSPACE/data -v DATADIR_SUBS_NOTIFICATION:$WORKSPACE/data/subscription-notification --exitonfailure"
\ No newline at end of file
index b3dcf05..f97ac1c 100644 (file)
@@ -9,7 +9,6 @@ SDNC_PASSWORD=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
 
 CPS_CORE_HOST=$LOCAL_IP
 CPS_CORE_PORT=8883
-CPS_CORE_MANAGEMENT_PORT=8887
 CPS_CORE_USERNAME=cpsuser
 CPS_CORE_PASSWORD=cpsr0cks!
 
@@ -17,7 +16,6 @@ DMI_HOST=$LOCAL_IP
 DMI_PORT=8783
 DMI_USERNAME=cpsuser
 DMI_PASSWORD=cpsr0cks!
-DMI_MANAGEMENT_PORT=8787
 DMI_SERVICE_URL=http://$LOCAL_IP:$DMI_PORT
 
 DOCKER_REPO=nexus3.onap.org:10003
index 80617a3..9a9e59b 100644 (file)
@@ -23,7 +23,7 @@ Documentation         CPS - Actuator endpoints
 Library               Collections
 Library               RequestsLibrary
 
-Suite Setup           Create Session    MANAGEMENT_URL    http://${CPS_CORE_HOST}:${CPS_CORE_MANAGEMENT_PORT}/manage
+Suite Setup           Create Session    MANAGEMENT_URL    http://${CPS_CORE_HOST}:${CPS_CORE_PORT}/actuator
 
 *** Variables ***
 
index 2607385..b845840 100644 (file)
@@ -37,7 +37,6 @@ services:
     image: ${DOCKER_REPO:-nexus3.onap.org:10003}/onap/cps-and-ncmp:${CPS_VERSION:-latest}
     ports:
       - ${CPS_CORE_PORT:-8883}:8080
-      - ${CPS_CORE_MANAGEMENT_PORT:-8887}:8081
       - ${CPS_CORE_DEBUG_PORT:-5005}:5005
     environment:
       CPS_USERNAME: ${CPS_CORE_USERNAME:-cpsuser}
@@ -86,7 +85,6 @@ services:
     image: ${DOCKER_REPO:-nexus3.onap.org:10003}/onap/ncmp-dmi-plugin:${DMI_VERSION:-1.4.0-SNAPSHOT-latest}
     ports:
       - ${DMI_PORT:-8783}:8080
-      - ${DMI_MANAGEMENT_PORT:-8787}:8081
     environment:
       CPS_USERNAME: ${CPS_CORE_USERNAME:-cpsuser}
       CPS_PASSWORD: ${CPS_CORE_PASSWORD:-cpsr0cks!}
index 30f7c83..9640709 100644 (file)
@@ -4,7 +4,7 @@ global:
 
 scrape_configs:
   - job_name: 'cps-and-ncm'
-    metrics_path: '/manage/prometheus'
+    metrics_path: '/actuator/prometheus'
     scrape_interval: 5s
     static_configs:
-      - targets: ['cps-and-ncmp:8081']
+      - targets: ['cps-and-ncmp:8080']
index c2643f8..a4313c1 100644 (file)
@@ -52,7 +52,7 @@ Change logging level
 
 .. code-block:: bash
 
-    curl --location --request GET 'http://{cps-service-name:cps-management-port}/manage/loggers/org.onap.cps' \
+    curl --location --request GET 'http://{cps-service-name:cps-port}/actuator/loggers/org.onap.cps' \
     --header 'Content-Type: application/json; charset=utf-8'
 
     Response body : HTTP Status 200
@@ -70,7 +70,7 @@ Change logging level
 
 .. code-block:: bash
 
-    curl --location --request POST 'http://{cps-service-name:cps-management-port}/manage/loggers/org.onap.cps' \
+    curl --location --request POST 'http://{cps-service-name:cps-port}/actuator/loggers/org.onap.cps' \
     --header 'Content-Type: application/json; charset=utf-8' \
     --data-raw '{
                     "configuredLevel": "DEBUG"
@@ -82,7 +82,7 @@ Change logging level
 
 .. code-block:: bash
 
-    curl --location --request GET 'http://{cps-service-name:cps-management-port}/manage/loggers/org.onap.cps' \
+    curl --location --request GET 'http://{cps-service-name:cps-port}/actuator/loggers/org.onap.cps' \
     --header 'Content-Type: application/json; charset=utf-8'
 
     Response body : HTTP Status 200
@@ -173,7 +173,7 @@ Once CPS-Core is deployed, information related to the running instance of the ap
 
 .. code::
 
-    http://<cps-component-service-name>:8081/manage/info/
+    http://<cps-component-service-name>:8080/actuator/info/
 
 Health
 ------
@@ -183,7 +183,7 @@ This also includes both the liveliness state and readiness state.
 
 .. code::
 
-    http://<cps-component-service-name>:8081/manage/health/
+    http://<cps-component-service-name>:8080/actuator/health/
 
 Metrics
 -------
@@ -192,7 +192,7 @@ Prometheus Metrics can be checked at the following endpoint
 
 .. code::
 
-    http://<cps-component-service-name>:8081/manage/prometheus
+    http://<cps-component-service-name>:8080/actuator/prometheus
 
 Naming Validation
 -----------------
index e6b81fc..3464060 100755 (executable)
@@ -39,6 +39,7 @@ Release Data
 Bug Fixes
 ---------
 3.3.9
+    - `CPS-1923 <https://jira.onap.org/browse/CPS-1923>`_ CPS and NCMP changed management endpoint and port from /manage to /actuator and port same as cps application port.
 
 Features
 --------
index f1eac14..7d94e5b 100755 (executable)
@@ -25,7 +25,7 @@ function script_usage() {
 Usage:
      -h|--help              Displays this help
      -u|--metrics-url=URL   URL to Prometheus metrics
-                            Default: http://localhost:8887/manage/prometheus
+                            Default: http://localhost:8883/actuator/prometheus
      -o|--output=FILE       Path to output file
                             Default: metrics-reports/metrics-[timestamp].tsv
 EOF
@@ -33,7 +33,7 @@ EOF
 
 function parse_params() {
   # Set parameter defaults
-  METRICS_URL="http://localhost:8887/manage/prometheus"
+  METRICS_URL="http://localhost:8883/actuator/prometheus"
   OUTFILE="metrics-reports/metrics-$(date --iso-8601=seconds).tsv"
   TEMP_DIR="/tmp/cps-metrics"