[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>
diff --git a/cps-application/src/main/resources/application.yml b/cps-application/src/main/resources/application.yml
index 7beab2e..e84b193 100644
--- a/cps-application/src/main/resources/application.yml
+++ b/cps-application/src/main/resources/application.yml
@@ -139,7 +139,7 @@
- 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 @@
# 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 f997d28..bba4879 100755
--- a/csit/plans/cps/setup.sh
+++ b/csit/plans/cps/setup.sh
@@ -32,7 +32,7 @@
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 @@
###################### 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 b3dcf05..f97ac1c 100644
--- a/csit/plans/cps/test.properties
+++ b/csit/plans/cps/test.properties
@@ -9,7 +9,6 @@
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_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 80617a3..9a9e59b 100644
--- a/csit/tests/actuator/actuator.robot
+++ b/csit/tests/actuator/actuator.robot
@@ -23,7 +23,7 @@
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 2607385..b845840 100644
--- a/docker-compose/docker-compose.yml
+++ b/docker-compose/docker-compose.yml
@@ -37,7 +37,6 @@
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 @@
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 30f7c83..9640709 100644
--- a/docker-compose/prometheus.yml
+++ b/docker-compose/prometheus.yml
@@ -4,7 +4,7 @@
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 c2643f8..a4313c1 100644
--- a/docs/admin-guide.rst
+++ b/docs/admin-guide.rst
@@ -52,7 +52,7 @@
.. 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 @@
.. 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 @@
.. 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 @@
.. code::
- http://<cps-component-service-name>:8081/manage/info/
+ http://<cps-component-service-name>:8080/actuator/info/
Health
------
@@ -183,7 +183,7 @@
.. code::
- http://<cps-component-service-name>:8081/manage/health/
+ http://<cps-component-service-name>:8080/actuator/health/
Metrics
-------
@@ -192,7 +192,7 @@
.. 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 e6b81fc..3464060 100755
--- a/docs/release-notes.rst
+++ b/docs/release-notes.rst
@@ -39,6 +39,7 @@
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 f1eac14..7d94e5b 100755
--- a/test-tools/generate-metrics-report.sh
+++ b/test-tools/generate-metrics-report.sh
@@ -25,7 +25,7 @@
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 @@
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"