Skip to content

Commit

Permalink
feat: add connector BOM modules (#4533)
Browse files Browse the repository at this point in the history
* add BOM modules

* Update dist/bom/controlplane-dcp-bom/example.env

Co-authored-by: andrea bertagnolli <[email protected]>

* add smoke test

* use config extensions for test

* DEPENDENCIES

* fixed e2e tests

---------

Co-authored-by: andrea bertagnolli <[email protected]>
  • Loading branch information
paullatzelsperger and ndr-brt authored Oct 10, 2024
1 parent 84917d2 commit f0cb103
Show file tree
Hide file tree
Showing 18 changed files with 344 additions and 2 deletions.
36 changes: 35 additions & 1 deletion .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: eclipse-edc/.github/.github/actions/setup-build@main

- name: Component Tests
run: ./gradlew test -DincludeTags="ComponentTest"

Expand All @@ -97,3 +96,38 @@ jobs:
uses: eclipse-edc/.github/.github/workflows/verify-openapi.yml@main
secrets: inherit

Verify-BOM:
runs-on: ubuntu-latest
strategy:
fail-fast: false

# we can't test the "controlplane-oauth2-com" because it only starts successfully if the public key is already in the vault
matrix:
bom-directory: [ "dist/bom/dataplane-base-bom",
"dist/bom/controlplane-dcp-bom",
"dist/bom/sts-feature-bom" ]
steps:
- uses: actions/checkout@v4
- uses: eclipse-edc/.github/.github/actions/setup-build@main
- name: Build runtime
run: ./gradlew -p ${{ matrix.bom-directory }} build
- name: Smoke Test
timeout-minutes: 10
run: |
# Start the program in the background
java -Dedc.fs.config=${{ matrix.bom-directory }}/example.properties -cp "$(./gradlew -q -p ${{ matrix.bom-directory }} printClassPath)" org.eclipse.edc.boot.system.runtime.BaseRuntime > ${{ matrix.bom-directory }}/log.txt &
# Get the PID of the running command
PID=$!
# Monitor the output and kill the process when desired output is found
while :; do
# Capture the output of the command
cat ${{ matrix.bom-directory }}/log.txt 2>/dev/null | grep -q "Runtime .* ready" && break
sleep 1
done
# Kill the process once the output is detected
kill $PID
echo "Runtime ${{ matrix.bom-directory }} shutdown after ready signal detected."
rm ${{ matrix.bom-directory }}/log.txt
53 changes: 53 additions & 0 deletions dist/bom/controlplane-base-bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
*
*/

plugins {
`java-library`
}

dependencies {
// SPI dependencies
api(project(":spi:common:core-spi"))

// core dependencies
api(project(":core:common:boot"))
api(project(":core:common:connector-core"))
api(project(":core:control-plane:control-plane-core"))
api(project(":core:common:edr-store-core"))
api(project(":data-protocols:dsp"))
api(project(":core:data-plane-selector:data-plane-selector-core"))


// extension dependencies
api(project(":extensions:common:configuration:configuration-filesystem"))
api(project(":extensions:common:auth:auth-tokenbased"))
api(project(":extensions:common:auth:auth-configuration"))
api(project(":extensions:common:auth:auth-delegated"))
api(project(":extensions:control-plane:api:management-api"))
api(project(":extensions:data-plane-selector:data-plane-selector-api"))
api(project(":extensions:data-plane:data-plane-signaling:data-plane-signaling-client"))
api(project(":extensions:common:api:api-observability"))
api(project(":extensions:common:api:version-api"))
api(project(":extensions:common:http"))
api(project(":extensions:control-plane:callback:callback-event-dispatcher"))
api(project(":extensions:control-plane:callback:callback-http-dispatcher"))
api(project(":extensions:control-plane:edr:edr-store-receiver"))

// libs
api(project(":core:common:lib:transform-lib"))
}

edcBuild {

}
38 changes: 38 additions & 0 deletions dist/bom/controlplane-dcp-bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
*
*/

plugins {
`java-library`
}

dependencies {
// SPI dependencies
api(project(":dist:bom:controlplane-base-bom"))

// DCP dependencies, JWT and LDP
api(project(":spi:common:jwt-spi"))

api(project(":extensions:common:crypto:ldp-verifiable-credentials"))
api(project(":extensions:common:crypto:jwt-verifiable-credentials"))
api(project(":extensions:common:crypto:lib:jws2020-lib"))
api(project(":extensions:common:iam:identity-trust:identity-trust-core"))
api(project(":extensions:common:iam:identity-trust:identity-trust-issuers-configuration"))
api(project(":extensions:common:iam:identity-trust:identity-trust-service"))
api(project(":extensions:common:iam:identity-trust:identity-trust-transform"))
api(project(":extensions:common:iam:identity-trust:identity-trust-sts:identity-trust-sts-remote-client"))


api(project(":extensions:common:iam:decentralized-identity"))
api(project(":extensions:common:iam:oauth2:oauth2-client"))
}
7 changes: 7 additions & 0 deletions dist/bom/controlplane-dcp-bom/example.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
edc.iam.sts.oauth.token.url=https://sts.com/token
edc.iam.sts.oauth.client.id=test-client
edc.iam.sts.oauth.client.secret.alias=test-alias
web.http.port=8080
web.http.path=/api
web.http.management.port=8081
web.http.management.path=/api/management
39 changes: 39 additions & 0 deletions dist/bom/controlplane-feature-sql-bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
*
*/

plugins {
`java-library`
}

dependencies {
// entity stores
api(project(":extensions:control-plane:store:sql:asset-index-sql"))
api(project(":extensions:control-plane:store:sql:contract-definition-store-sql"))
api(project(":extensions:control-plane:store:sql:contract-negotiation-store-sql"))
api(project(":extensions:control-plane:store:sql:control-plane-sql"))
api(project(":extensions:control-plane:store:sql:policy-definition-store-sql"))
api(project(":extensions:control-plane:store:sql:transfer-process-store-sql"))
api(project(":extensions:common:store:sql:edr-index-sql"))
api(project(":extensions:data-plane-selector:store:sql:data-plane-instance-store-sql"))

// other SQL dependencies - not strictly necessary, but could come in handy for BOM users
api(project(":extensions:common:sql:sql-core"))
api(project(":extensions:common:sql:sql-bootstrapper"))
api(project(":extensions:common:sql:sql-lease"))
api(project(":extensions:common:sql:sql-pool"))
api(project(":extensions:common:transaction:transaction-local"))

// third-party deps
api(libs.postgres)
}
27 changes: 27 additions & 0 deletions dist/bom/controlplane-oauth2-bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
*
*/

plugins {
`java-library`
}

dependencies {
// SPI dependencies
api(project(":dist:bom:controlplane-base-bom"))

// DCP dependencies, JWT and LDP
api(project(":spi:common:jwt-spi"))

api(project(":extensions:common:iam:oauth2:oauth2-service"))
}
5 changes: 5 additions & 0 deletions dist/bom/controlplane-oauth2-bom/example.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
edc.oauth.token.url=https://oauth2.com/token
# this will require the public key alias to be present in the vault
edc.oauth.certificate.alias=test-alias
edc.oauth.private.key.alias=private-test-alias
edc.oauth.client.id=test-client
43 changes: 43 additions & 0 deletions dist/bom/dataplane-base-bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
*
*/

plugins {
`java-library`
}

dependencies {
// SPI dependencies
api(project(":spi:common:core-spi"))

// core dependencies
api(project(":core:common:boot"))
api(project(":core:common:connector-core"))
api(project(":core:data-plane:data-plane-core"))


// extension dependencies
api(project(":extensions:common:api:control-api-configuration"))
api(project(":extensions:common:configuration:configuration-filesystem"))
api(project(":extensions:common:json-ld"))
api(project(":extensions:control-plane:api:control-plane-api-client"))
api(project(":extensions:data-plane:data-plane-self-registration"))
api(project(":extensions:data-plane:data-plane-http"))
api(project(":extensions:data-plane:data-plane-http-oauth2"))
api(project(":extensions:data-plane:data-plane-public-api-v2"))
api(project(":extensions:data-plane:data-plane-signaling:data-plane-signaling-api"))
api(project(":extensions:data-plane:data-plane-iam"))
api(project(":extensions:data-plane-selector:data-plane-selector-client"))
api(project(":extensions:common:api:api-observability"))
api(project(":extensions:common:http"))
}
6 changes: 6 additions & 0 deletions dist/bom/dataplane-base-bom/example.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
edc.transfer.proxy.token.verifier.publickey.alias=test-alias
edc.transfer.proxy.token.signer.privatekey.alias=private-alias
edc.dpf.selector.url=http://test.com/selector
web.http.control.port=9091
web.http.control.path=/api/control
web.http.port=9090
35 changes: 35 additions & 0 deletions dist/bom/dataplane-feature-sql-bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
*
*/

plugins {
`java-library`
}

dependencies {
// entity stores
api(project(":extensions:data-plane-selector:store:sql:data-plane-instance-store-sql"))
api(project(":extensions:data-plane:store:sql:accesstokendata-store-sql"))
api(project(":extensions:data-plane:store:sql:data-plane-store-sql"))

// other SQL dependencies - not strictly necessary, but could come in handy for BOM users
api(project(":extensions:common:sql:sql-core"))
api(project(":extensions:common:sql:sql-bootstrapper"))
api(project(":extensions:common:sql:sql-lease"))
api(project(":extensions:common:sql:sql-pool"))
api(project(":extensions:common:transaction:transaction-local"))

// third-party deps
api(libs.postgres)

}
40 changes: 40 additions & 0 deletions dist/bom/sts-feature-bom/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation
*
*/

plugins {
`java-library`
application
}

dependencies {
// SPI dependencies
api(project(":spi:common:core-spi"))

// core dependencies
api(project(":core:common:boot"))
api(project(":core:common:connector-core"))


// extension dependencies
api(project(":extensions:common:http"))
api(project(":extensions:common:json-ld"))
api(project(":extensions:common:api:api-observability"))
api(project(":extensions:common:api:version-api"))
api(project(":extensions:common:configuration:configuration-filesystem"))

api(project(":extensions:common:iam:identity-trust:identity-trust-sts:identity-trust-sts-api"))
api(project(":extensions:common:iam:identity-trust:identity-trust-sts:identity-trust-sts-accounts-api"))
api(project(":extensions:common:iam:identity-trust:identity-trust-sts:identity-trust-sts-core"))
api(project(":extensions:common:iam:identity-trust:identity-trust-sts:identity-trust-sts-embedded"))
}
1 change: 1 addition & 0 deletions dist/bom/sts-feature-bom/example.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
edc.api.accounts.key=password
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ plugins {
dependencies {
api(project(":spi:common:identity-did-spi"))
api(project(":extensions:common:iam:decentralized-identity:identity-did-core"))
api(project(":extensions:common:iam:decentralized-identity:identity-did-web"))
}


Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ dependencies {
api(project(":extensions:common:iam:identity-trust:identity-trust-sts:identity-trust-sts-core"))
api(project(":extensions:common:iam:identity-trust:identity-trust-sts:identity-trust-sts-remote-client"))
api(project(":extensions:common:iam:identity-trust:identity-trust-sts:identity-trust-sts-api"))
api(project(":extensions:common:iam:identity-trust:identity-trust-sts:identity-trust-sts-accounts-api"))
api(project(":extensions:common:iam:identity-trust:identity-trust-sts:identity-trust-sts-client-configuration"))
api(project(":extensions:common:iam:identity-trust:identity-trust-sts:lib:identity-trust-sts-remote-lib"))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dependencies {
api(project(":extensions:control-plane:api:management-api:contract-agreement-api"))
api(project(":extensions:control-plane:api:management-api:contract-definition-api"))
api(project(":extensions:control-plane:api:management-api:contract-negotiation-api"))
api(project(":extensions:control-plane:api:management-api:edr-cache-api"))
api(project(":extensions:control-plane:api:management-api:policy-definition-api"))
api(project(":extensions:control-plane:api:management-api:transfer-process-api"))
}
Expand Down
Loading

0 comments on commit f0cb103

Please sign in to comment.