diff --git a/README.md b/README.md index b90f2bf3db5747cf1b07c6d14adb64e97c257a47..74a32c286ad8d09fb78dc9b78aafa29c60fb826f 100644 --- a/README.md +++ b/README.md @@ -148,6 +148,7 @@ or http://:8083/ (if accessed from another host) ``` + # FAQ Documentation Frequently asked questions can be found here: [FAQ Directory] @@ -158,3 +159,4 @@ Frequently asked questions can be found here: [FAQ Directory] [Testing with Robot Framework]: ./docs/testing_with_robot/README.md "Testing with Robot Framework" [FAQ Directory]: https://ocf.etsi.org/documentation/latest/FAQ/ "FAQ Url" [OCF Documentation]: https://ocf.etsi.org/documentation/latest/ "OCF Documentation" + diff --git a/helm/capif/charts/ocf-api-invoker-management/templates/deployment.yaml b/helm/capif/charts/ocf-api-invoker-management/templates/deployment.yaml index 5b210cb25b01f71318975a84bd89256b11183b44..70508d9f3fdb01c2521e2760920a520ebeebb525 100644 --- a/helm/capif/charts/ocf-api-invoker-management/templates/deployment.yaml +++ b/helm/capif/charts/ocf-api-invoker-management/templates/deployment.yaml @@ -42,6 +42,8 @@ spec: env: - name: MONITORING value: {{ quote .Values.env.monitoring }} + - name: CAPIF_HOSTNAME + value: {{ quote .Values.env.capifHostname }} - name: VAULT_HOSTNAME value: {{ quote .Values.env.vaultHostname }} - name: VAULT_PORT diff --git a/helm/capif/charts/ocf-api-invoker-management/values.yaml b/helm/capif/charts/ocf-api-invoker-management/values.yaml index 4b19037c56ec6d37f26be431d5d12f467613942e..0fbda233bf45ad9626f951b90fc19bdc78c2190a 100644 --- a/helm/capif/charts/ocf-api-invoker-management/values.yaml +++ b/helm/capif/charts/ocf-api-invoker-management/values.yaml @@ -16,6 +16,7 @@ fullnameOverride: "" env: monitoring: "true" + capifHostname: capif vaultHostname: vault vaultPort: 8200 vaultAccessToken: dev-only-token diff --git a/helm/capif/charts/ocf-api-provider-management/templates/deployment.yaml b/helm/capif/charts/ocf-api-provider-management/templates/deployment.yaml index 7f95b9d602eb70ce4eeb5b34df18d506eef47d1b..b335dc75f4f201e91b8a807edd89e1433754b585 100644 --- a/helm/capif/charts/ocf-api-provider-management/templates/deployment.yaml +++ b/helm/capif/charts/ocf-api-provider-management/templates/deployment.yaml @@ -42,6 +42,8 @@ spec: env: - name: MONITORING value: {{ quote .Values.env.monitoring }} + - name: CAPIF_HOSTNAME + value: {{ quote .Values.env.capifHostname }} - name: VAULT_HOSTNAME value: {{ quote .Values.env.vaultHostname }} - name: VAULT_PORT diff --git a/helm/capif/charts/ocf-api-provider-management/values.yaml b/helm/capif/charts/ocf-api-provider-management/values.yaml index 18225264c8e6834eb437f67cc293fa428107e240..b38cb0fd5c342833e5fee04aa61d2b24d16f5ca7 100644 --- a/helm/capif/charts/ocf-api-provider-management/values.yaml +++ b/helm/capif/charts/ocf-api-provider-management/values.yaml @@ -16,6 +16,7 @@ fullnameOverride: "" env: monitoring: "true" + capifHostname: capif vaultHostname: vault vaultPort: 8200 vaultAccessToken: dev-only-token diff --git a/helm/capif/charts/ocf-auditing-api-logs/templates/deployment.yaml b/helm/capif/charts/ocf-auditing-api-logs/templates/deployment.yaml index 8248606b8385e819a3df8b58513685c2c5c004fd..32f3ac26fbfd88d1a4eb17eb7d808a4b686ea478 100644 --- a/helm/capif/charts/ocf-auditing-api-logs/templates/deployment.yaml +++ b/helm/capif/charts/ocf-auditing-api-logs/templates/deployment.yaml @@ -40,10 +40,10 @@ spec: containerPort: {{ .Values.service.port }} protocol: TCP env: - - name: MONITORING - value: {{ quote .Values.env.monitoring }} - - name: LOG_LEVEL - value: {{ quote .Values.env.logLevel }} + - name: MONITORING + value: {{ quote .Values.env.monitoring }} + - name: LOG_LEVEL + value: {{ quote .Values.env.logLevel }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }} readinessProbe: diff --git a/helm/capif/charts/ocf-events/templates/deployment.yaml b/helm/capif/charts/ocf-events/templates/deployment.yaml index 50b58cc909d0f3878268457fa6d6610066e0ceb9..90933d3bd8e9df788a83c8a296dc99cf7aff475a 100644 --- a/helm/capif/charts/ocf-events/templates/deployment.yaml +++ b/helm/capif/charts/ocf-events/templates/deployment.yaml @@ -40,10 +40,14 @@ spec: containerPort: {{ .Values.service.port }} protocol: TCP env: - - name: MONITORING - value: {{ quote .Values.env.monitoring }} - - name: LOG_LEVEL - value: {{ quote .Values.env.logLevel }} + - name: MONITORING + value: {{ quote .Values.env.monitoring }} + - name: CAPIF_HOSTNAME + value: {{ quote .Values.env.capifHostname }} + - name: LOG_LEVEL + value: {{ quote .Values.env.logLevel }} + - name: TIMEOUT + value: {{ quote .Values.env.timeout }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }} readinessProbe: diff --git a/helm/capif/charts/ocf-events/values.yaml b/helm/capif/charts/ocf-events/values.yaml index 9fb7b06d605f6af3a5556c2f890f6df9e8ffd3e0..56e03a9dedbc8b4c2f64b6669894f136f96e765d 100644 --- a/helm/capif/charts/ocf-events/values.yaml +++ b/helm/capif/charts/ocf-events/values.yaml @@ -16,9 +16,11 @@ fullnameOverride: "" env: monitoring: "true" + capifHostname: capif mongoInitdbRootUsername: root mongoInitdbRootPassword: example logLevel: "INFO" + timeout: "30" serviceAccount: # Specifies whether a service account should be created diff --git a/helm/capif/charts/ocf-publish-service-api/templates/deployment.yaml b/helm/capif/charts/ocf-publish-service-api/templates/deployment.yaml index ceced651510218511744d9148811ee35f07fa01d..7df0807dc807d8600acfd7aed2169410e5e211a2 100644 --- a/helm/capif/charts/ocf-publish-service-api/templates/deployment.yaml +++ b/helm/capif/charts/ocf-publish-service-api/templates/deployment.yaml @@ -40,10 +40,12 @@ spec: containerPort: {{ .Values.service.port }} protocol: TCP env: - - name: MONITORING - value: {{ quote .Values.env.monitoring }} - - name: LOG_LEVEL - value: {{ quote .Values.env.logLevel }} + - name: MONITORING + value: {{ quote .Values.env.monitoring }} + - name: CAPIF_HOSTNAME + value: {{ quote .Values.env.capifHostname }} + - name: LOG_LEVEL + value: {{ quote .Values.env.logLevel }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }} readinessProbe: diff --git a/helm/capif/charts/ocf-publish-service-api/values.yaml b/helm/capif/charts/ocf-publish-service-api/values.yaml index 0e243db2f0090d1736f96f62ef86f52ba71ad092..f22c2b285e5f7a15c51d182d7aa78e75403017aa 100644 --- a/helm/capif/charts/ocf-publish-service-api/values.yaml +++ b/helm/capif/charts/ocf-publish-service-api/values.yaml @@ -16,6 +16,7 @@ fullnameOverride: "" env: monitoring: "true" + capifHostname: capif mongoInitdbRootUsername: root mongoInitdbRootPassword: example logLevel: "INFO" diff --git a/helm/capif/charts/ocf-register/templates/deployment.yaml b/helm/capif/charts/ocf-register/templates/deployment.yaml index ffe49edce0681a847f4195ac4f90367f057106c1..23ef72cadd37d0b44c60c5b23627186683a74053 100644 --- a/helm/capif/charts/ocf-register/templates/deployment.yaml +++ b/helm/capif/charts/ocf-register/templates/deployment.yaml @@ -43,14 +43,16 @@ spec: containerPort: {{ .Values.service.port }} protocol: TCP env: - - name: VAULT_HOSTNAME - value: {{ quote .Values.env.vaultHostname }} - - name: VAULT_PORT - value: {{ quote .Values.env.vaultPort }} - - name: VAULT_ACCESS_TOKEN - value: {{ quote .Values.env.vaultAccessToken }} - - name: LOG_LEVEL - value: {{ quote .Values.env.logLevel }} + - name: VAULT_HOSTNAME + value: {{ quote .Values.env.vaultHostname }} + - name: VAULT_PORT + value: {{ quote .Values.env.vaultPort }} + - name: VAULT_ACCESS_TOKEN + value: {{ quote .Values.env.vaultAccessToken }} + - name: LOG_LEVEL + value: {{ quote .Values.env.logLevel }} + - name: TIMEOUT + value: {{ quote .Values.env.timeout }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }} readinessProbe: diff --git a/helm/capif/charts/ocf-register/values.yaml b/helm/capif/charts/ocf-register/values.yaml index 71b49d93a36fa46f8e6e110b5d2fbd25a10aa1e8..1773a6b875f55e783e1bba6520abccc5c52e72ad 100644 --- a/helm/capif/charts/ocf-register/values.yaml +++ b/helm/capif/charts/ocf-register/values.yaml @@ -22,6 +22,7 @@ env: vaultAccessToken: dev-only-token capifHostname: capif-test.example.int logLevel: "INFO" + timeout: "30" serviceAccount: # Specifies whether a service account should be created diff --git a/helm/capif/charts/ocf-security/templates/deployment.yaml b/helm/capif/charts/ocf-security/templates/deployment.yaml index 48ab76404d940062fcc5cfd0ba3f53224050535a..dd0805c6cf158679026ab9dcb8172615b4277016 100644 --- a/helm/capif/charts/ocf-security/templates/deployment.yaml +++ b/helm/capif/charts/ocf-security/templates/deployment.yaml @@ -52,6 +52,8 @@ spec: value: {{ quote .Values.env.vaultAccessToken }} - name: LOG_LEVEL value: {{ quote .Values.env.logLevel }} + - name: TIMEOUT + value: {{ quote .Values.env.timeout }} livenessProbe: {{- toYaml .Values.livenessProbe | nindent 12 }} readinessProbe: diff --git a/helm/capif/charts/ocf-security/values.yaml b/helm/capif/charts/ocf-security/values.yaml index cdccc7027d0f8e7a94568972040e05d749241a74..ab77f8128fa46ed51c94995f244d093f2bab34f4 100644 --- a/helm/capif/charts/ocf-security/values.yaml +++ b/helm/capif/charts/ocf-security/values.yaml @@ -23,6 +23,7 @@ env: mongoInitdbRootUsername: root mongoInitdbRootPassword: example logLevel: "INFO" + timeout: "30" serviceAccount: # Specifies whether a service account should be created diff --git a/helm/scripts/install_capif.sh b/helm/scripts/install_capif.sh index 11614cde8d8c1667ec2850cbf231fd8ed935178b..74b1146a28ff321a0b7fb20ee6c4843a8b841e1c 100755 --- a/helm/scripts/install_capif.sh +++ b/helm/scripts/install_capif.sh @@ -43,6 +43,7 @@ helm $KUBECONFIG upgrade --install -n $CAPIF_NAMESPACE $CAPIF_NAME_VERSION_CHART --set ocf-api-invoker-management.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-api-invoker-management-api \ --set ocf-api-invoker-management.image.tag=$CAPIF_IMAGE_TAG \ --set ocf-api-invoker-management.env.monitoring="true" \ +--set ocf-api-invoker-management.env.capifHostname=$CAPIF_HOSTNAME \ --set ocf-api-invoker-management.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ --set ocf-api-invoker-management.env.vaultPort=$VAULT_PORT \ --set ocf-api-invoker-management.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ @@ -50,6 +51,7 @@ helm $KUBECONFIG upgrade --install -n $CAPIF_NAMESPACE $CAPIF_NAME_VERSION_CHART --set ocf-api-provider-management.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-api-provider-management-api \ --set ocf-api-provider-management.image.tag=$CAPIF_IMAGE_TAG \ --set ocf-api-provider-management.env.monitoring="true" \ +--set ocf-api-provider-management.env.capifHostname=$CAPIF_HOSTNAME \ --set ocf-api-provider-management.env.vaultHostname=$VAULT_INTERNAL_HOSTNAME \ --set ocf-api-provider-management.env.logLevel="DEBUG" \ --set ocf-api-provider-management.env.vaultPort=$VAULT_PORT \ @@ -57,6 +59,7 @@ helm $KUBECONFIG upgrade --install -n $CAPIF_NAMESPACE $CAPIF_NAME_VERSION_CHART --set ocf-events.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-events-api \ --set ocf-events.image.tag=$CAPIF_IMAGE_TAG \ --set ocf-events.env.monitoring="true" \ +--set ocf-events.env.capifHostname=$CAPIF_HOSTNAME \ --set ocf-events.env.logLevel="DEBUG" \ --set ocf-routing-info.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-routing-info-api \ --set ocf-routing-info.image.tag=$CAPIF_IMAGE_TAG \ @@ -92,6 +95,7 @@ helm $KUBECONFIG upgrade --install -n $CAPIF_NAMESPACE $CAPIF_NAME_VERSION_CHART --set ocf-publish-service-api.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-publish-service-api \ --set ocf-publish-service-api.image.tag=$CAPIF_IMAGE_TAG \ --set ocf-publish-service-api.env.monitoring="true" \ +--set ocf-publish-service-api.env.capifHostname=$CAPIF_HOSTNAME \ --set ocf-publish-service-api.env.logLevel="DEBUG" \ --set ocf-discover-service-api.image.repository=$CAPIF_DOCKER_REGISTRY/ocf-discover-service-api \ --set ocf-discover-service-api.image.tag=$CAPIF_IMAGE_TAG \ diff --git a/services/TS29222_CAPIF_Events_API/capif_events/core/notifications.py b/services/TS29222_CAPIF_Events_API/capif_events/core/notifications.py index 37aab4b373171b579582319f488f681baa63eed0..6288c3386414bdc967a09cae787bb89bb79874c6 100644 --- a/services/TS29222_CAPIF_Events_API/capif_events/core/notifications.py +++ b/services/TS29222_CAPIF_Events_API/capif_events/core/notifications.py @@ -67,7 +67,7 @@ class Notifications(): def request_post(self, url, data): headers = {'content-type': 'application/json'} - return requests.post(url, json={'text': str(data.to_str())}, headers=headers, timeout=os.getenv("TIMEOUT")) + return requests.post(url, json={'text': str(data.to_str())}, headers=headers, timeout=os.getenv("TIMEOUT", "30")) async def send_request(self, url, data): async with aiohttp.ClientSession() as session: diff --git a/services/TS29222_CAPIF_Security_API/capif_security/core/notification.py b/services/TS29222_CAPIF_Security_API/capif_security/core/notification.py index 16618da56b28107dec0102b31bf5a5b3eb75fd09..607155924756f4b5088fa333e9e2a56b62befccd 100644 --- a/services/TS29222_CAPIF_Security_API/capif_security/core/notification.py +++ b/services/TS29222_CAPIF_Security_API/capif_security/core/notification.py @@ -11,4 +11,4 @@ class Notifications(): def request_post(self, url, data): headers = {'content-type': 'application/json'} - return requests.post(url, json={'text': str(data.to_str())}, headers=headers, timeout=int(os.getenv("TIMEOUT"))) \ No newline at end of file + return requests.post(url, json={'text': str(data.to_str())}, headers=headers, timeout=int(os.getenv("TIMEOUT", "30"))) diff --git a/services/register/register_service/core/register_operations.py b/services/register/register_service/core/register_operations.py index 7fa99ec61b208eecff55a08f530b3954b536ed8f..937ce0bd068af2e4281d4aab5835510668c8267b 100644 --- a/services/register/register_service/core/register_operations.py +++ b/services/register/register_service/core/register_operations.py @@ -73,10 +73,12 @@ class RegisterOperations: mycol = self.db.get_col_by_name(self.db.capif_users) try: - + current_app.logger.debug(f"Request Helper service to remove user related information") url = f"https://{self.config["ccf"]["url"]}{self.config["ccf"]["helper_remove_user"]}{uuid}" - requests.delete(url, cert=("certs/superadmin.crt", "certs/superadmin.key"), verify="certs/ca_root.crt", timeout=int(os.getenv("TIMEOUT"))) + current_app.logger.debug(f"Url {url}") + requests.delete(url, cert=("certs/superadmin.crt", "certs/superadmin.key"), verify="certs/ca_root.crt", timeout=int(os.getenv("TIMEOUT", "30"))) + current_app.logger.debug(f"Removing User with uuid {uuid} from db") mycol.delete_one({"uuid": uuid}) current_app.logger.debug(f"User with uuid {uuid} removed successfully") return jsonify(message="User removed successfully"), 204