diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a8edf9dc4..6aabf5ca68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Added +- Moved all parts of app config to helm charts to be fully configurable - Helmignore config params for wrong values.yaml files - Home / Source URL in Helm Chart - Name Overrides in Helmchart for pgadmin, irs-helm and tractusx-connector diff --git a/charts/traceability-foss/charts/backend/templates/deployment.yaml b/charts/traceability-foss/charts/backend/templates/deployment.yaml index dd43c0b02d..3cdc45e42e 100644 --- a/charts/traceability-foss/charts/backend/templates/deployment.yaml +++ b/charts/traceability-foss/charts/backend/templates/deployment.yaml @@ -80,6 +80,24 @@ spec: value: {{ .Values.edc.apiKey | quote }} - name: EDC_PROVIDER_URL value: {{ .Values.edc.providerUrl | quote }} + - name: IRS_URL + value: {{ .Values.irs.baseUrl | quote }} + - name: REGISTRY_URL_WITH_PATH + value: {{ .Values.registry.urlWithPath | quote }} + - name: PORTAL_URL + value: {{ .Values.portal.baseUrl | quote }} + - name: EDC_CALLBACK_URL + value: {{ .Values.edc.callbackUrl | quote }} + - name: EDC_CALLBACK_URL_EDC_CLIENT + value: {{ .Values.edc.callbackUrlEdcClient | quote }} + - name: ALLOWED_CORS_ORIGIN_FIRST + value: {{ .Values.config.allowedCorsOriginFirst | quote }} + - name: ALLOWED_CORS_ORIGIN_SECOND + value: {{ .Values.config.allowedCorsOriginSecond | quote }} + - name: EDC_DATA_ENDPOINT_URL + value: {{ .Values.edc.dataEndpointUrl | quote }} + - name: DISCOVERY_FINDER_URL_WITH_PATH + value: {{ .Values.discoveryfinder.baseUrl | quote }} - name: JWT_RESOURCE_CLIENT value: {{ .Values.oauth2.resourceClient | quote }} - name: SPRING_DATASOURCE_URL diff --git a/charts/traceability-foss/charts/backend/values.yaml b/charts/traceability-foss/charts/backend/values.yaml index aba9fa3b08..6a0fd3c6bc 100644 --- a/charts/traceability-foss/charts/backend/values.yaml +++ b/charts/traceability-foss/charts/backend/values.yaml @@ -153,3 +153,20 @@ oauth2: edc: apiKey: "" # providerUrl: "" # + callbackUrl: "https://replace.me" + callbackUrlEdcClient: "https://replace.me" + dataEndpointUrl: "https://replace.me" + +discoveryfinder: + baseUrl: "https://replace.me" + +irs: + baseUrl: "https://replace.me" +registry: + urlWithPath: "https://replace.me" +portal: + baseUrl: "https://replace.me" + +config: + allowedCorsOriginFirst: "https://replace.me" + allowedCorsOriginSecond: "https://replace.me" diff --git a/charts/traceability-foss/values.yaml b/charts/traceability-foss/values.yaml index 8dfd9881d7..93c0116d02 100644 --- a/charts/traceability-foss/values.yaml +++ b/charts/traceability-foss/values.yaml @@ -304,7 +304,23 @@ backend: - hosts: - "https://replace.me" secretName: tls-secret - + callbackUrl: "https://replace.me" + callbackUrlEdcClient: "https://replace.me" + dataEndpointUrl: "https://replace.me" + + discoveryfinder: + baseUrl: "https://replace.me" + + irs: + baseUrl: "https://replace.me" + registry: + urlWithPath: "https://replace.me" + portal: + baseUrl: "https://replace.me" + + config: + allowedCorsOriginFirst: "https://replace.me" + allowedCorsOriginSecond: "https://replace.me" ######################### # PG Admin configuration # diff --git a/dev/README.md b/dev/README.md index 4b314f648e..cb054cfc12 100644 --- a/dev/README.md +++ b/dev/README.md @@ -30,25 +30,25 @@ In order to upload data to EDC Provider, please use [IRS project script](https:/ Sample invocation (DEV) ``` -python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.5.json -s https://tracex-submodel-server.dev.demo.catena-x.net -edc https://trace-x-edc.dev.demo.catena-x.net -a https://trace-x-registry.dev.demo.catena-x.net/semantics/registry/api/v3.0 -p id-3.0-trace -k --aas3 +python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.6.json -s https://tracex-submodel-server.dev.demo.catena-x.net -edc https://trace-x-edc.dev.demo.catena-x.net -a https://trace-x-registry.dev.demo.catena-x.net/semantics/registry/api/v3.0 -p id-3.0-trace -k --aas3 ``` Sample invocation (TEST) ``` -python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.5.json -s https://tracex-submodel-server-test.dev.demo.catena-x.net -edc https://trace-x-test-edc.dev.demo.catena-x.net -a https://trace-x-registry-test.dev.demo.catena-x.net/semantics/registry/api/v3.0 -p id-3.0-trace -k --aas3 +python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.6.json -s https://tracex-submodel-server-test.dev.demo.catena-x.net -edc https://trace-x-test-edc.dev.demo.catena-x.net -a https://trace-x-registry-test.dev.demo.catena-x.net/semantics/registry/api/v3.0 -p id-3.0-trace -k --aas3 ``` Sample invocation (E2E A) ``` -python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.5.json -s https://tracex-submodel-server-e2e-a.dev.demo.catena-x.net -edc https://trace-x-edc-e2e-a.dev.demo.catena-x.net -a https://trace-x-registry-e2e-a.dev.demo.catena-x.net/semantics/registry/api/v3.0 -p id-3.0-trace -k --aas3 +python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.6.json -s https://tracex-submodel-server-e2e-a.dev.demo.catena-x.net -edc https://trace-x-edc-e2e-a.dev.demo.catena-x.net -a https://trace-x-registry-e2e-a.dev.demo.catena-x.net/semantics/registry/api/v3.0 -p id-3.0-trace -k --aas3 ``` Sample invocation (E2E B) ``` -python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.5.json -s https://tracex-submodel-server-e2e-b.dev.demo.catena-x.net -edc https://trace-x-edc-e2e-b.dev.demo.catena-x.net -a https://trace-x-registry-e2e-b.dev.demo.catena-x.net/semantics/registry/api/v3.0 -p id-3.0-trace -k --aas3 +python transform-and-upload.py -f CX_Testdata_MessagingTest_v0.0.6.json -s https://tracex-submodel-server-e2e-b.dev.demo.catena-x.net -edc https://trace-x-edc-e2e-b.dev.demo.catena-x.net -a https://trace-x-registry-e2e-b.dev.demo.catena-x.net/semantics/registry/api/v3.0 -p id-3.0-trace -k --aas3 ``` where: @@ -108,30 +108,6 @@ curl --request POST \ - ``` -- Make sure bpn mapping for the instances exists: - -DEV & Test: -[ -{ -"bpn": "BPNL00000003CML1", -"url": "https://tracex-consumer-controlplane.dev.demo.catena-x.net" -}, { -"bpn": "BPNL00000003CNKC", -"url": "https://tracex-test-consumer-controlplane.dev.demo.catena-x.net" -} -] - -E2E A & E2E B: -[ -{ -"bpn": "BPNL00000003CML1", -"url": "https://tracex-consumer-controlplane-e2e-a.dev.demo.catena-x.net" -}, { -"bpn": "BPNL00000003CNKC", -"url": "https://tracex-consumer-controlplane-e2e-b.dev.demo.catena-x.net" -} -] - ## Documentation of Testdata https://confluence.catena-x.net/display/BDPQ/%28TRF%29+%5BTRACEFOSS-1278%5D+%3A+Setup+Trace-X+Instances+as+own+virtual+companies+in+DEV+and+INT+environment diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java index 2da29e91c1..d847252695 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/infrastructure/edc/properties/EdcProperties.java @@ -63,6 +63,7 @@ public class EdcProperties { private String assetsPath; @NotBlank + @Value("${edc.provider-edc-url}") private String providerEdcUrl; @NotBlank diff --git a/tx-backend/src/main/resources/application-dev.yml b/tx-backend/src/main/resources/application-dev.yml index 0092831426..c6b77fd006 100644 --- a/tx-backend/src/main/resources/application-dev.yml +++ b/tx-backend/src/main/resources/application-dev.yml @@ -18,24 +18,3 @@ # # SPDX-License-Identifier: Apache-2.0 ################################################################################ - -feign: - irsApi: - url: https://tracex-irs.dev.demo.catena-x.net - registryApi: - url: https://trace-x-registry.dev.demo.catena-x.net/semantics/registry/api/v3.0 - portalApi: - url: https://portal-backend.dev.demo.catena-x.net/api - -edc: - callback-urls: http://tracex-irs:8181/internal/endpoint-data-reference - -irs-edc-client: - callback-url: "https://traceability.dev.demo.catena-x.net/api/internal/endpoint-data-reference" - controlplane: - endpoint: - data: "https://tracex-consumer-controlplane.dev.demo.catena-x.net/management" - -digitalTwinRegistryClient: - type: "decentral" - discoveryFinderUrl: "https://tracex-discovery-mock-dev.dev.demo.catena-x.net/api/administration/connectors/discovery/search" # required if type is "decentral" diff --git a/tx-backend/src/main/resources/application-e2e-a.yml b/tx-backend/src/main/resources/application-e2e-a.yml index 722d378b47..bc97c3400d 100644 --- a/tx-backend/src/main/resources/application-e2e-a.yml +++ b/tx-backend/src/main/resources/application-e2e-a.yml @@ -16,23 +16,3 @@ # # SPDX-License-Identifier: Apache-2.0 ################################################################################ - -feign: - irsApi: - url: https://tx-irs-e2e-a.dev.demo.catena-x.net - registryApi: - url: https://trace-x-registry-e2e-a.dev.demo.catena-x.net/semantics/registry/api/v3.0 - portalApi: - url: https://portal-backend.dev.demo.catena-x.net/api -edc: - callback-urls: http://tx-irs-e2e-a:8181/internal/endpoint-data-reference - -irs-edc-client: - callback-url: "https://traceability-e2e-a.dev.demo.catena-x.net/api/internal/endpoint-data-reference" - controlplane: - endpoint: - data: "https://tx-edc-consumer-e2e-a-controlplane.dev.demo.catena-x.net/management" - -digitalTwinRegistryClient: - type: "decentral" - discoveryFinderUrl: "https://tracex-discovery-mock-e2e-a.dev.demo.catena-x.net/api/administration/connectors/discovery/search" # required if type is "decentral" diff --git a/tx-backend/src/main/resources/application-e2e-b.yml b/tx-backend/src/main/resources/application-e2e-b.yml index 402ab43fd8..bc97c3400d 100644 --- a/tx-backend/src/main/resources/application-e2e-b.yml +++ b/tx-backend/src/main/resources/application-e2e-b.yml @@ -16,23 +16,3 @@ # # SPDX-License-Identifier: Apache-2.0 ################################################################################ - -feign: - irsApi: - url: https://tx-irs-e2e-b.dev.demo.catena-x.net - registryApi: - url: https://trace-x-registry-e2e-b.dev.demo.catena-x.net/semantics/registry/api/v3.0 - portalApi: - url: https://portal-backend.dev.demo.catena-x.net/api - -edc: - callback-urls: http://tx-irs-e2e-b:8181/internal/endpoint-data-reference - -irs-edc-client: - callback-url: "https://traceability-e2e-b.dev.demo.catena-x.net/api/internal/endpoint-data-reference" - controlplane: - endpoint: - data: "https://tx-edc-consumer-e2e-b-controlplane.dev.demo.catena-x.net/management" -digitalTwinRegistryClient: - type: "decentral" - discoveryFinderUrl: "https://tracex-discovery-mock-e2e-b.dev.demo.catena-x.net/api/administration/connectors/discovery/search" # required if type is "decentral" diff --git a/tx-backend/src/main/resources/application-int-a.yml b/tx-backend/src/main/resources/application-int-a.yml index 75c75a3dff..43908ffd3c 100644 --- a/tx-backend/src/main/resources/application-int-a.yml +++ b/tx-backend/src/main/resources/application-int-a.yml @@ -17,20 +17,3 @@ # SPDX-License-Identifier: Apache-2.0 ################################################################################ -feign: - irsApi: - url: https://tracex-irs.int.demo.catena-x.net - registryApi: - url: https://semantics.int.demo.catena-x.net/registry/api/v3.0 - portalApi: - url: https://portal-backend.int.demo.catena-x.net/api - -edc: - callback-urls: http://tracex-irs:8181/internal/endpoint-data-reference - -cors: - origins: > - https://traceability-portal-int-a.int.demo.catena-x.net/ -digitalTwinRegistryClient: - type: "decentral" - discoveryFinderUrl: "https://tracex-discovery-mock-test.dev.demo.catena-x.net/api/administration/connectors/discovery/search" # required if type is "decentral" diff --git a/tx-backend/src/main/resources/application-int-b.yml b/tx-backend/src/main/resources/application-int-b.yml index 1169ab4007..bc97c3400d 100644 --- a/tx-backend/src/main/resources/application-int-b.yml +++ b/tx-backend/src/main/resources/application-int-b.yml @@ -16,22 +16,3 @@ # # SPDX-License-Identifier: Apache-2.0 ################################################################################ - -feign: - irsApi: - url: https://tracex-irs.int.demo.catena-x.net - registryApi: - url: https://semantics.int.demo.catena-x.net/registry/api/v3.0 - portalApi: - url: https://portal-backend.int.demo.catena-x.net/api - -edc: - callback-urls: http://tracex-irs:8181/internal/endpoint-data-reference - -cors: - origins: > - https://traceability-portal-int-b.int.demo.catena-x.net/ - -digitalTwinRegistryClient: - type: "decentral" - discoveryFinderUrl: "https://tracex-discovery-mock-test.dev.demo.catena-x.net/api/administration/connectors/discovery/search" # required if type is "decentral" diff --git a/tx-backend/src/main/resources/application-int.yml b/tx-backend/src/main/resources/application-int.yml index f21b13b02f..c6b77fd006 100644 --- a/tx-backend/src/main/resources/application-int.yml +++ b/tx-backend/src/main/resources/application-int.yml @@ -18,17 +18,3 @@ # # SPDX-License-Identifier: Apache-2.0 ################################################################################ - -feign: - irsApi: - url: https://tracex-irs.int.demo.catena-x.net - registryApi: - url: https://semantics.int.demo.catena-x.net/registry/api/v3.0 - portalApi: - url: https://portal-backend.int.demo.catena-x.net/api - -edc: - callback-urls: http://tracex-irs:8181/internal/endpoint-data-reference -digitalTwinRegistryClient: - type: "decentral" - discoveryFinderUrl: "https://tracex-discovery-mock-test.dev.demo.catena-x.net/api/administration/connectors/discovery/search" # required if type is "decentral" diff --git a/tx-backend/src/main/resources/application-integration.yml b/tx-backend/src/main/resources/application-integration.yml index 82e4878f29..b061614e39 100644 --- a/tx-backend/src/main/resources/application-integration.yml +++ b/tx-backend/src/main/resources/application-integration.yml @@ -67,3 +67,19 @@ logging: org.springframework.web.client.RestTemplate: INFO org.springframework.security: INFO org.springframework: INFO + +digitalTwinRegistryClient: + discoveryFinderUrl: "" + + descriptorEndpoint: "" # required if type is "central", must contain the placeholder {aasIdentifier} + shellLookupEndpoint: "" # required if type is "central", must contain the placeholder {assetIds} +feign: + irsApi: + url: "" + registryApi: + url: "" + portalApi: + url: "" +cors: + origins: > + "https://localhost:4200" diff --git a/tx-backend/src/main/resources/application-test.yml b/tx-backend/src/main/resources/application-test.yml index 722e6af713..c6b77fd006 100644 --- a/tx-backend/src/main/resources/application-test.yml +++ b/tx-backend/src/main/resources/application-test.yml @@ -18,21 +18,3 @@ # # SPDX-License-Identifier: Apache-2.0 ################################################################################ - -feign: - irsApi: - url: https://tracex-irs-test.dev.demo.catena-x.net - registryApi: - url: https://trace-x-registry-test.dev.demo.catena-x.net/semantics/registry/api/v3.0 - portalApi: - url: https://portal-backend.dev.demo.catena-x.net/api - -edc: - callback-urls: http://tracex-test-irs:8181/internal/endpoint-data-reference - -irs-edc-client: - callback-url: "https://traceability-test.dev.demo.catena-x.net/api/internal/endpoint-data-reference" - -digitalTwinRegistryClient: - type: "decentral" - discoveryFinderUrl: "https://tracex-discovery-mock-test.dev.demo.catena-x.net/api/administration/connectors/discovery/search" # required if type is "decentral" diff --git a/tx-backend/src/main/resources/application.yml b/tx-backend/src/main/resources/application.yml index 4eb093d6d6..e23e028abc 100644 --- a/tx-backend/src/main/resources/application.yml +++ b/tx-backend/src/main/resources/application.yml @@ -41,12 +41,14 @@ edc: api-auth-key: ${EDC_API_KEY} bpn-provider-url-mappings: { } provider-edc-url: ${EDC_PROVIDER_URL} + callback-urls: ${EDC_CALLBACK_URL} irs-edc-client: + callback-url: ${EDC_CALLBACK_URL_EDC_CLIENT} controlplane: request-ttl: PT10M # How long to wait for an async EDC negotiation request to finish, ISO 8601 Duration endpoint: - data: "https://tracex-consumer-controlplane.dev.demo.catena-x.net/management" # URL of the EDC consumer controlplane data endpoint + data: ${EDC_DATA_ENDPOINT_URL} catalog: /v2/catalog/request # EDC consumer controlplane catalog path contract-negotiation: /v2/contractnegotiations # EDC consumer controlplane contract negotiation path transfer-process: /v2/transferprocesses # EDC consumer controlplane transfer process path @@ -117,6 +119,12 @@ jwt: resource-client: ${JWT_RESOURCE_CLIENT} feign: + irsApi: + url: ${IRS_URL} + registryApi: + url: ${REGISTRY_URL_WITH_PATH} + portalApi: + url: ${PORTAL_URL} okhttp: enabled: true hystrix: @@ -135,15 +143,8 @@ cache: cors: origins: > - http://localhost:4200/, - https://traceability-portal.dev.demo.catena-x.net/, - https://traceability-portal-test.dev.demo.catena-x.net/, - https://traceability-portal-pen.dev.demo.catena-x.net/, - https://traceability-portal.int.demo.catena-x.net/, - https://traceability-portal-test.int.demo.catena-x.net/, - https://traceability-portal.pre-prod.demo.catena-x.net/, - https://traceability-portal-e2e-a.dev.demo.catena-x.net/, - https://traceability-portal-e2e-b.dev.demo.catena-x.net/ + ${ALLOWED_CORS_ORIGIN_FIRST}, + ${ALLOWED_CORS_ORIGIN_SECOND} resilience4j: retry: @@ -164,9 +165,8 @@ irs: policyId: "ID 3.1 Trace" ttl: "2023-09-30T23:59:59.99Z" digitalTwinRegistryClient: - type: "decentral" # or "decentral" - - discoveryFinderUrl: "https://tracex-discovery-mock.dev.demo.catena-x.net/api/administration/connectors/discovery/search" # required if type is "decentral" + type: "decentral" + discoveryFinderUrl: ${DISCOVERY_FINDER_URL_WITH_PATH} descriptorEndpoint: "" # required if type is "central", must contain the placeholder {aasIdentifier} shellLookupEndpoint: "" # required if type is "central", must contain the placeholder {assetIds}