summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpriyank <priyank.maheshwari@est.tech>2023-10-25 12:23:10 +0100
committerPriyank Maheshwari <priyank.maheshwari@est.tech>2023-11-06 12:42:19 +0000
commit02b2d2ab93fdbe8c8465c1d3ea2a39cd4daea2c0 (patch)
tree1e27e277f98036f248eb8c4a1d04a6d81b42f54a
parent4fb19b0a6b3b2a17ffb78ef51091ea87ca9bc2e3 (diff)
[BUG] CPS NCMP management endpoints update
- 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>
-rw-r--r--cps-application/src/main/resources/application.yml5
-rwxr-xr-xcsit/plans/cps/setup.sh8
-rw-r--r--csit/plans/cps/test.properties2
-rw-r--r--csit/tests/actuator/actuator.robot2
-rw-r--r--docker-compose/docker-compose.yml2
-rw-r--r--docker-compose/prometheus.yml4
-rw-r--r--docs/admin-guide.rst12
-rwxr-xr-xdocs/release-notes.rst1
-rwxr-xr-xtest-tools/generate-metrics-report.sh4
9 files changed, 17 insertions, 23 deletions
diff --git a/cps-application/src/main/resources/application.yml b/cps-application/src/main/resources/application.yml
index 7beab2e7c9..e84b1937b6 100644
--- a/cps-application/src/main/resources/application.yml
+++ b/cps-application/src/main/resources/application.yml
@@ -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:
diff --git a/csit/plans/cps/setup.sh b/csit/plans/cps/setup.sh
index f997d28ac2..bba48794fe 100755
--- a/csit/plans/cps/setup.sh
+++ b/csit/plans/cps/setup.sh
@@ -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
diff --git a/csit/plans/cps/test.properties b/csit/plans/cps/test.properties
index b3dcf05fa7..f97ac1c40d 100644
--- a/csit/plans/cps/test.properties
+++ b/csit/plans/cps/test.properties
@@ -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
diff --git a/csit/tests/actuator/actuator.robot b/csit/tests/actuator/actuator.robot
index 80617a3f8c..9a9e59bf71 100644
--- a/csit/tests/actuator/actuator.robot
+++ b/csit/tests/actuator/actuator.robot
@@ -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 ***
diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml
index 2607385de7..b845840f49 100644
--- a/docker-compose/docker-compose.yml
+++ b/docker-compose/docker-compose.yml
@@ -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!}
diff --git a/docker-compose/prometheus.yml b/docker-compose/prometheus.yml
index 30f7c837f1..9640709089 100644
--- a/docker-compose/prometheus.yml
+++ b/docker-compose/prometheus.yml
@@ -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']
diff --git a/docs/admin-guide.rst b/docs/admin-guide.rst
index c2643f87cd..a4313c14eb 100644
--- a/docs/admin-guide.rst
+++ b/docs/admin-guide.rst
@@ -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
-----------------
diff --git a/docs/release-notes.rst b/docs/release-notes.rst
index e6b81fcbaf..3464060b41 100755
--- a/docs/release-notes.rst
+++ b/docs/release-notes.rst
@@ -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
--------
diff --git a/test-tools/generate-metrics-report.sh b/test-tools/generate-metrics-report.sh
index f1eac14719..7d94e5b49f 100755
--- a/test-tools/generate-metrics-report.sh
+++ b/test-tools/generate-metrics-report.sh
@@ -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"