Skip to content

Commit

Permalink
Merge pull request #1013 from catenax-ng/main
Browse files Browse the repository at this point in the history
Submodel Server Extraction
  • Loading branch information
ds-mwesener authored May 29, 2024
2 parents 91c8449 + fd6483b commit 6122726
Show file tree
Hide file tree
Showing 15 changed files with 87 additions and 40 deletions.
22 changes: 22 additions & 0 deletions .github/argo/argo_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ DELETE_DEV_TEST_RESOURCES=(
"$ARGO_TEST_REGISTRY/resource?force=false&orphan=false&resourceName=data-tracex-dt-registry-test-postgresql-0&version=v1&kind=PersistentVolumeClaim&namespace=product-traceability-foss"
"$ARGO_TEST_REGISTRY/resource?group=apps&force=true&orphan=false&resourceName=tracex-dt-registry-test-postgresql&version=v1&kind=StatefulSet&namespace=product-traceability-foss"
"$ARGO_TEST_REGISTRY/resource?group=apps&force=false&orphan=false&resourceName=tracex-registry-test&version=v1&kind=Deployment&namespace=product-traceability-foss"
"$ARGO_TEST_SUBMODELSERVER/resource?group=apps&force=false&orphan=false&resourceName=tracex-test-submodelserver-submodelservers&version=v1&kind=Deployment&namespace=product-traceability-foss"

"$ARGO_DEV_TRACE_X_INSTANCE/resource?force=false&orphan=false&resourceName=data-tx-backend-postgresql-dev-0&version=v1&kind=PersistentVolumeClaim&namespace=product-traceability-foss"
"$ARGO_DEV_TRACE_X_INSTANCE/resource?group=apps&force=true&orphan=false&resourceName=tx-backend-postgresql-dev&version=v1&kind=StatefulSet&namespace=product-traceability-foss"
Expand All @@ -45,6 +46,8 @@ DELETE_DEV_TEST_RESOURCES=(
"$ARGO_DEV_REGISTRY/resource?force=false&orphan=false&resourceName=data-tracex-dt-registry-dev-postgresql-0&version=v1&kind=PersistentVolumeClaim&namespace=product-traceability-foss"
"$ARGO_DEV_REGISTRY/resource?group=apps&force=true&orphan=false&resourceName=tracex-dt-registry-dev-postgresql&version=v1&kind=StatefulSet&namespace=product-traceability-foss"
"$ARGO_DEV_REGISTRY/resource?group=apps&force=false&orphan=false&resourceName=tracex-registry-dev&version=v1&kind=Deployment&namespace=product-traceability-foss"
"$ARGO_DEV_SUBMODELSERVER/resource?group=apps&force=false&orphan=false&resourceName=tracex-dev-submodelserver-submodelservers&version=v1&kind=Deployment&namespace=product-traceability-foss"

)

DELETE_E2E_RESOURCES=(
Expand All @@ -62,6 +65,8 @@ DELETE_E2E_RESOURCES=(
"$ARGO_E2E_A_REGISTRY/resource?force=false&orphan=false&resourceName=data-tracex-dt-registry-e2e-a-postgresql-0&version=v1&kind=PersistentVolumeClaim&namespace=product-traceability-foss"
"$ARGO_E2E_A_REGISTRY/resource?group=apps&force=true&orphan=false&resourceName=tracex-dt-registry-e2e-a-postgresql&version=v1&kind=StatefulSet&namespace=product-traceability-foss"
"$ARGO_E2E_A_REGISTRY/resource?group=apps&force=false&orphan=false&resourceName=tracex-registry-e2e-a&version=v1&kind=Deployment&namespace=product-traceability-foss"
"$ARGO_E2E_A_SUBMODELSERVER/resource?group=apps&force=false&orphan=false&resourceName=tracex-e2e-a-submodelserver-submodelservers&version=v1&kind=Deployment&namespace=product-traceability-foss"


"$ARGO_E2E_B_TRACE_X_INSTANCE/resource?force=false&orphan=false&resourceName=data-tx-backend-postgresql-e2e-b-0&version=v1&kind=PersistentVolumeClaim&namespace=product-traceability-foss"
"$ARGO_E2E_B_TRACE_X_INSTANCE/resource?group=apps&force=true&orphan=false&resourceName=tx-backend-postgresql-e2e-b&version=v1&kind=StatefulSet&namespace=product-traceability-foss"
Expand All @@ -77,6 +82,8 @@ DELETE_E2E_RESOURCES=(
"$ARGO_E2E_B_REGISTRY/resource?force=false&orphan=false&resourceName=data-tracex-dt-registry-e2e-b-postgresql-0&version=v1&kind=PersistentVolumeClaim&namespace=product-traceability-foss"
"$ARGO_E2E_B_REGISTRY/resource?group=apps&force=true&orphan=false&resourceName=tracex-dt-registry-e2e-b-postgresql&version=v1&kind=StatefulSet&namespace=product-traceability-foss"
"$ARGO_E2E_B_REGISTRY/resource?group=apps&force=false&orphan=false&resourceName=tracex-registry-e2e-b&version=v1&kind=Deployment&namespace=product-traceability-foss"
"$ARGO_E2E_B_SUBMODELSERVER/resource?group=apps&force=false&orphan=false&resourceName=tracex-e2e-b-submodelserver-submodelservers&version=v1&kind=Deployment&namespace=product-traceability-foss"

)
DELETE_INT_RESOURCES=(
"$ARGO_INT_A_TRACE_X_INSTANCE/resource?force=false&orphan=false&resourceName=data-tx-backend-postgresql-int-a-0&version=v1&kind=PersistentVolumeClaim&namespace=product-traceability-foss"
Expand All @@ -93,6 +100,7 @@ DELETE_INT_RESOURCES=(
"$ARGO_INT_A_REGISTRY/resource?force=false&orphan=false&resourceName=data-tx-registry-int-a-postgresql-0&version=v1&kind=PersistentVolumeClaim&namespace=product-traceability-foss"
"$ARGO_INT_A_REGISTRY/resource?group=apps&force=true&orphan=false&resourceName=tx-registry-int-a-postgresql&version=v1&kind=StatefulSet&namespace=product-traceability-foss"
"$ARGO_INT_A_REGISTRY/resource?group=apps&force=false&orphan=false&resourceName=tracex-registry-int-a&version=v1&kind=Deployment&namespace=product-traceability-foss"
"$ARGO_INT_A_SUBMODELSERVER/resource?group=apps&force=false&orphan=false&resourceName=tracex-int-a-submodelserver-submodelservers&version=v1&kind=Deployment&namespace=product-traceability-foss"

"$ARGO_INT_B_TRACE_X_INSTANCE/resource?force=false&orphan=false&resourceName=data-tx-backend-postgresql-int-b-0&version=v1&kind=PersistentVolumeClaim&namespace=product-traceability-foss"
"$ARGO_INT_B_TRACE_X_INSTANCE/resource?group=apps&force=true&orphan=false&resourceName=tx-backend-postgresql-int-b&version=v1&kind=StatefulSet&namespace=product-traceability-foss"
Expand All @@ -108,60 +116,74 @@ DELETE_INT_RESOURCES=(
"$ARGO_INT_B_REGISTRY/resource?force=false&orphan=false&resourceName=data-tx-registry-int-b-postgresql-0&version=v1&kind=PersistentVolumeClaim&namespace=product-traceability-foss"
"$ARGO_INT_B_REGISTRY/resource?group=apps&force=true&orphan=false&resourceName=tx-registry-int-b-postgresql&version=v1&kind=StatefulSet&namespace=product-traceability-foss"
"$ARGO_INT_B_REGISTRY/resource?group=apps&force=false&orphan=false&resourceName=tracex-registry-int-b&version=v1&kind=Deployment&namespace=product-traceability-foss"
"$ARGO_INT_B_SUBMODELSERVER/resource?group=apps&force=false&orphan=false&resourceName=tracex-int-b-submodelserver-submodelservers&version=v1&kind=Deployment&namespace=product-traceability-foss"

)
SYNC_DEV_TEST_RESOURCES=(
"$ARGO_TEST_REGISTRY/sync"
"$ARGO_TEST_EDC_PROVIDER/sync"
"$ARGO_TEST_SUBMODELSERVER/sync"
"$ARGO_TEST_TRACE_X_INSTANCE/sync"

"$ARGO_DEV_REGISTRY/sync"
"$ARGO_DEV_EDC_PROVIDER/sync"
"$ARGO_DEV_SUBMODELSERVER/sync"
"$ARGO_DEV_TRACE_X_INSTANCE/sync"
)
SYNC_E2E_RESOURCES=(
"$ARGO_E2E_A_REGISTRY/sync"
"$ARGO_E2E_A_EDC_PROVIDER/sync"
"$ARGO_E2E_A_TRACE_X_INSTANCE/sync"
"$ARGO_E2E_A_SUBMODELSERVER/sync"

"$ARGO_E2E_B_REGISTRY/sync"
"$ARGO_E2E_B_EDC_PROVIDER/sync"
"$ARGO_E2E_B_SUBMODELSERVER/sync"
"$ARGO_E2E_B_TRACE_X_INSTANCE/sync"
)
SYNC_INT_RESOURCES=(
"$ARGO_INT_A_REGISTRY/sync"
"$ARGO_INT_A_EDC_PROVIDER/sync"
"$ARGO_INT_A_SUBMODELSERVER/sync"
"$ARGO_INT_A_TRACE_X_INSTANCE/sync"

"$ARGO_INT_B_REGISTRY/sync"
"$ARGO_INT_B_EDC_PROVIDER/sync"
"$ARGO_INT_B_SUBMODELSERVER/sync"
"$ARGO_INT_B_TRACE_X_INSTANCE/sync"
)
DEV_TEST_RESOURCES=(
"$ARGO_TEST_REGISTRY"
"$ARGO_TEST_EDC_PROVIDER"
"$ARGO_TEST_TRACE_X_INSTANCE"
"$ARGO_TEST_SUBMODELSERVER"

"$ARGO_DEV_REGISTRY"
"$ARGO_DEV_EDC_PROVIDER"
"$ARGO_DEV_TRACE_X_INSTANCE"
"$ARGO_DEV_SUBMODELSERVER"
)
E2E_RESOURCES=(
"$ARGO_E2E_A_REGISTRY"
"$ARGO_E2E_A_EDC_PROVIDER"
"$ARGO_E2E_A_TRACE_X_INSTANCE"
"$ARGO_E2E_A_SUBMODELSERVER"

"$ARGO_E2E_B_REGISTRY"
"$ARGO_E2E_B_EDC_PROVIDER"
"$ARGO_E2E_B_TRACE_X_INSTANCE"
"$ARGO_E2E_B_SUBMODELSERVER"
)
INT_RESOURCES=(
"$ARGO_INT_A_REGISTRY"
"$ARGO_INT_A_EDC_PROVIDER"
"$ARGO_INT_A_TRACE_X_INSTANCE"
"$ARGO_INT_A_SUBMODELSERVER"

"$ARGO_INT_B_REGISTRY"
"$ARGO_INT_B_EDC_PROVIDER"
"$ARGO_INT_B_TRACE_X_INSTANCE"
"$ARGO_INT_B_SUBMODELSERVER"
)


20 changes: 14 additions & 6 deletions .github/workflows/argo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,31 +66,39 @@ env:
ARGO_TEST_REGISTRY: "https://argo.dev.demo.catena-x.net/api/v1/applications/tracex-dt-registry-test"
ARGO_TEST_EDC_PROVIDER: "https://argo.dev.demo.catena-x.net/api/v1/applications/tracex-test-edc-provider"
ARGO_TEST_TRACE_X_INSTANCE: "https://argo.dev.demo.catena-x.net/api/v1/applications/traceability-foss-test"
ARGO_TEST_SUBMODELSERVER: "https://argo.dev.demo.catena-x.net/api/v1/applications/tracex-test-submodelserver"
ARGO_TEST_RegistryReload: "https://traceability-test.dev.demo.catena-x.net/api/registry/reload"

ARGO_DEV_REGISTRY: "https://argo.dev.demo.catena-x.net/api/v1/applications/tracex-dt-registry-dev"
ARGO_DEV_EDC_PROVIDER: "https://argo.dev.demo.catena-x.net/api/v1/applications/tracex-edc-provider"
ARGO_DEV_TRACE_X_INSTANCE: "https://argo.dev.demo.catena-x.net/api/v1/applications/traceability-foss-dev"
ARGO_DEV_SUBMODELSERVER: "https://argo.dev.demo.catena-x.net/api/v1/applications/tracex-dev-submodelserver"
ARGO_DEV_RegistryReload: "https://traceability.dev.demo.catena-x.net/api/registry/reload"

ARGO_E2E_A_REGISTRY: "https://argo.dev.demo.catena-x.net/api/v1/applications/tracex-dt-registry-e2e-a"
ARGO_E2E_A_EDC_PROVIDER: "https://argo.dev.demo.catena-x.net/api/v1/applications/tracex-edc-provider-e2e-a"
ARGO_E2E_A_TRACE_X_INSTANCE: "https://argo.dev.demo.catena-x.net/api/v1/applications/traceability-foss-e2e-a"
ARGO_E2E_A_SUBMODELSERVER: "https://argo.dev.demo.catena-x.net/api/v1/applications/tracex-e2e-a-submodelserver"
ARGO_E2E_A_RegistryReload: "https://traceability-e2e-a.dev.demo.catena-x.net/api/registry/reload"

ARGO_E2E_B_REGISTRY: "https://argo.dev.demo.catena-x.net/api/v1/applications/tracex-dt-registry-e2e-b"
ARGO_E2E_B_EDC_PROVIDER: "https://argo.dev.demo.catena-x.net/api/v1/applications/tracex-edc-provider-e2e-b"
ARGO_E2E_B_TRACE_X_INSTANCE: "https://argo.dev.demo.catena-x.net/api/v1/applications/traceability-foss-e2e-b"
ARGO_E2E_B_SUBMODELSERVER: "https://argo.dev.demo.catena-x.net/api/v1/applications/tracex-e2e-b-submodelserver"
ARGO_E2E_B_RegistryReload: "https://traceability-e2e-b.dev.demo.catena-x.net/api/registry/reload"

ARGO_INT_A_REGISTRY: "https://argo.int.demo.catena-x.net/api/v1/applications/tx-registry-int-a"
ARGO_INT_A_EDC_PROVIDER: "https://argo.int.demo.catena-x.net/api/v1/applications/tx-edc-provider-int-a"
ARGO_INT_A_TRACE_X_INSTANCE: "https://argo.int.demo.catena-x.net/api/v1/applications/traceability-foss-int-a"
ARGO_INT_A_SUBMODELSERVER: "https://argo.int.demo.catena-x.net/api/v1/applications/tracex-int-a-submodelserver"

ARGO_INT_A_RegistryReload: "https://traceability-int-a.int.demo.catena-x.net/api/registry/reload"

ARGO_INT_B_REGISTRY: "https://argo.int.demo.catena-x.net/api/v1/applications/tx-registry-int-b"
ARGO_INT_B_EDC_PROVIDER: "https://argo.int.demo.catena-x.net/api/v1/applications/tx-edc-provider-int-b"
ARGO_INT_B_TRACE_X_INSTANCE: "https://argo.int.demo.catena-x.net/api/v1/applications/traceability-foss-int-b"
ARGO_INT_B_SUBMODELSERVER: "https://argo.int.demo.catena-x.net/api/v1/applications/tracex-int-b-submodelserver"

ARGO_INT_B_RegistryReload: "https://traceability-int-b.int.demo.catena-x.net/api/registry/reload"

jobs:
Expand Down Expand Up @@ -378,19 +386,19 @@ jobs:
curl -o transform-and-upload.py https://raw.githubusercontent.com/eclipse-tractusx/item-relationship-service/main/local/testing/testdata/transform-and-upload.py
if [ "${{ github.event.inputs.testdata_upload }}" == "true" ]; then
if [ "${{ github.event.inputs.environment }}" == "Dev/Test" ]; then
python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability-test.dev.demo.catena-x.net/api/submodel/data -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 -d https://trace-x-test-edc-dataplane.dev.demo.catena-x.net -p traceability-core -k ${{ secrets.TRACE_X_API_KEY_DEV }} --aas3 --edcBPN BPNL00000003CNKC --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC
python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://tracex-test-submodel-server.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 -d https://trace-x-test-edc-dataplane.dev.demo.catena-x.net -p traceability-core -k ${{ secrets.TRACE_X_API_KEY_DEV }} --aas3 --edcBPN BPNL00000003CNKC --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC
sleep 10
python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability.dev.demo.catena-x.net/api/submodel/data -edc https://trace-x-edc.dev.demo.catena-x.net -a https://trace-x-registry-dev.dev.demo.catena-x.net/semantics/registry/api/v3 -d https://trace-x-edc-dataplane.dev.demo.catena-x.net -p traceability-core -k ${{ secrets.TRACE_X_API_KEY_DEV }} --aas3 --edcBPN BPNL00000003CML1 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC
python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://tracex-dev-submodel-server.dev.demo.catena-x.net -edc https://trace-x-edc.dev.demo.catena-x.net -a https://trace-x-registry-dev.dev.demo.catena-x.net/semantics/registry/api/v3 -d https://trace-x-edc-dataplane.dev.demo.catena-x.net -p traceability-core -k ${{ secrets.TRACE_X_API_KEY_DEV }} --aas3 --edcBPN BPNL00000003CML1 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC
sleep 10
elif [ "${{ github.event.inputs.environment }}" == "E2E-A/E2E-B" ]; then
python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability-e2e-a.dev.demo.catena-x.net/api/submodel/data -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 -d https://trace-x-edc-e2e-a-dataplane.dev.demo.catena-x.net -p traceability-core -k ${{ secrets.TRACE_X_API_KEY_DEV }} --aas3 --edcBPN BPNL00000003CML1 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC
python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://tracex-e2e-a-submodel-server.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 -d https://trace-x-edc-e2e-a-dataplane.dev.demo.catena-x.net -p traceability-core -k ${{ secrets.TRACE_X_API_KEY_DEV }} --aas3 --edcBPN BPNL00000003CML1 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC
sleep 10
python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability-e2e-b.dev.demo.catena-x.net/api/submodel/data -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 -d https://trace-x-edc-e2e-b-dataplane.dev.demo.catena-x.net -p traceability-core -k ${{ secrets.TRACE_X_API_KEY_DEV }} --aas3 --edcBPN BPNL00000003CNKC --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC
python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://tracex-e2e-b-submodel-server.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 -d https://trace-x-edc-e2e-b-dataplane.dev.demo.catena-x.net -p traceability-core -k ${{ secrets.TRACE_X_API_KEY_DEV }} --aas3 --edcBPN BPNL00000003CNKC --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC
sleep 10
elif [ "${{ github.event.inputs.environment }}" == "int-a/int-b" ]; then
python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability-int-a.int.demo.catena-x.net/api/submodel/data -edc https://trace-x-edc-int-a.int.demo.catena-x.net -a https://trace-x-registry-int-a.int.demo.catena-x.net/semantics/registry/api/v3 -d https://trace-x-edc-int-a-dataplane.int.demo.catena-x.net -p traceability-core -k ${{ secrets.TRACE_X_API_KEY_INT_A }} --aas3 --edcBPN BPNL00000003CML1 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC BPNL00000003AZQP BPNL00000003CSGV
python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://tracex-int-a-submodel-server.int.demo.catena-x.net -edc https://trace-x-edc-int-a.int.demo.catena-x.net -a https://trace-x-registry-int-a.int.demo.catena-x.net/semantics/registry/api/v3 -d https://trace-x-edc-int-a-dataplane.int.demo.catena-x.net -p traceability-core -k ${{ secrets.TRACE_X_API_KEY_INT_A }} --aas3 --edcBPN BPNL00000003CML1 --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC BPNL00000003AZQP BPNL00000003CSGV
sleep 10
python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://traceability-int-b.int.demo.catena-x.net/api/submodel/data -edc https://trace-x-edc-int-b.int.demo.catena-x.net -a https://trace-x-registry-int-b.int.demo.catena-x.net/semantics/registry/api/v3 -d https://trace-x-edc-int-b-dataplane.int.demo.catena-x.net -p traceability-core -k ${{ secrets.TRACE_X_API_KEY_INT_B }} --aas3 --edcBPN BPNL00000003CNKC --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC BPNL00000003AZQP BPNL00000003CSGV
python transform-and-upload.py -f ./tx-backend/testdata/CX_Testdata_MessagingTest_v${{ github.event.inputs.testdata_version }}.json -s https://tracex-int-b-submodel-server.int.demo.catena-x.net -edc https://trace-x-edc-int-b.int.demo.catena-x.net -a https://trace-x-registry-int-b.int.demo.catena-x.net/semantics/registry/api/v3 -d https://trace-x-edc-int-b-dataplane.int.demo.catena-x.net -p traceability-core -k ${{ secrets.TRACE_X_API_KEY_INT_B }} --aas3 --edcBPN BPNL00000003CNKC --allowedBPNs BPNL00000003CML1 BPNL00000003CNKC BPNL00000003AZQP BPNL00000003CSGV
sleep 10
fi
elif [ "${{ github.event.inputs.testdata_upload }}" == "false" ]; then
Expand Down
Loading

0 comments on commit 6122726

Please sign in to comment.