Skip to content

Commit

Permalink
feat: migrating to edc 0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Glaucio Jannotti committed Sep 13, 2024
1 parent e7a0afa commit 92f164b
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 41 deletions.
1 change: 1 addition & 0 deletions extensions/core-ionos-s3/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dependencies {
implementation("${edcGroup}:transfer-spi:${edcVersion}")
implementation("io.minio:minio:${minIOVersion}")

testImplementation("${edcGroup}:junit:${edcVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

package com.ionos.edc.extension.s3.schema;

import org.eclipse.edc.spi.types.domain.transfer.FlowType;

import static org.eclipse.edc.spi.constants.CoreConstants.EDC_NAMESPACE;

public interface IonosBucketSchema {
Expand All @@ -27,5 +29,7 @@ public interface IonosBucketSchema {
String ACCESS_KEY_ID = EDC_NAMESPACE + "accessKey";
String SECRET_ACCESS_KEY = EDC_NAMESPACE + "secretKey";

String PUSH_TRANSFER_TYPE = TYPE + "-" + FlowType.PUSH;

String STORAGE_NAME_DEFAULT = "https://s3-eu-central-1.ionoscloud.com";
}
1 change: 1 addition & 0 deletions extensions/provision-ionos-s3/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dependencies {

implementation(project(":extensions:core-ionos-s3"))

testImplementation("${edcGroup}:junit:${edcVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class IonosS3ConsumerResourceDefinitionGenerator implements ConsumerResou
Objects.requireNonNull(policy, "policy must always be provided");

var destination = transferProcess.getDataDestination();
Objects.requireNonNull(destination, "dataDestination must always be provided");

var path = destination.getStringProperty(IonosBucketSchema.PATH);
if ((path != null) && !path.endsWith("/")) {
Expand Down Expand Up @@ -64,7 +65,7 @@ public boolean canGenerate(TransferProcess transferProcess, Policy policy) {
Objects.requireNonNull(transferProcess, "transferProcess must always be provided");
Objects.requireNonNull(policy, "policy must always be provided");

return IonosBucketSchema.TYPE.equals(transferProcess.getDestinationType());
return IonosBucketSchema.PUSH_TRANSFER_TYPE.equals(transferProcess.getTransferType());
}

}
25 changes: 5 additions & 20 deletions launchers/base/connector/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,18 @@ plugins {
`java-library`
}

repositories {
maven {// while runtime-metamodel dependency is still a snapshot
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
mavenCentral()
mavenLocal()
}

val edcGroup: String by project
val edcVersion: String by project

dependencies {
// Core
implementation("${edcGroup}:boot:${edcVersion}")
implementation("${edcGroup}:connector-core:${edcVersion}")
implementation("${edcGroup}:http:${edcVersion}")
implementation("${edcGroup}:dsp:${edcVersion}")
implementation("${edcGroup}:configuration-filesystem:${edcVersion}")

// Management API
implementation("${edcGroup}:management-api:${edcVersion}")

// EDR API
implementation("${edcGroup}:edr-cache-api:${edcVersion}")
implementation("${edcGroup}:edr-store-core:${edcVersion}")
implementation("${edcGroup}:edr-store-receiver:${edcVersion}")
implementation("${edcGroup}:control-api-configuration:${edcVersion}")

// Control Plane
implementation("${edcGroup}:control-api-configuration:${edcVersion}")
implementation("${edcGroup}:control-plane-api-client:${edcVersion}")
implementation("${edcGroup}:control-plane-api:${edcVersion}")
implementation("${edcGroup}:control-plane-core:${edcVersion}")
Expand All @@ -59,8 +42,10 @@ dependencies {
implementation("${edcGroup}:data-plane-http:${edcVersion}")
implementation("${edcGroup}:transfer-data-plane-signaling:${edcVersion}")

// Vault
implementation("${edcGroup}:vault-hashicorp:${edcVersion}")
// EDR Cache
implementation("${edcGroup}:edr-cache-api:${edcVersion}")
implementation("${edcGroup}:edr-store-core:${edcVersion}")
implementation("${edcGroup}:edr-store-receiver:${edcVersion}")

// Validators
implementation("${edcGroup}:validator-data-address-http-data:${edcVersion}")
Expand Down
2 changes: 2 additions & 0 deletions launchers/dev/connector-consumer/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ val edcVersion: String by project
dependencies {
implementation(project(":launchers:base:connector"))

implementation("${edcGroup}:configuration-filesystem:${edcVersion}")
implementation("${edcGroup}:vault-hashicorp:${edcVersion}")
implementation("${edcGroup}:iam-mock:${edcVersion}")
}

Expand Down
8 changes: 5 additions & 3 deletions launchers/dev/connector-consumer/resources/config.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
edc.runtime.id=consumer
edc.participant.id=consumer
web.http.port=9191
web.http.path=/api
Expand All @@ -13,13 +12,16 @@ web.http.public.path=/public
edc.dsp.callback.address=http://localhost:9292/protocol
edc.dataplane.token.validation.endpoint=http://localhost:9293/control/token
edc.dataplane.api.public.baseurl=http://localhost:9393/public

edc.api.auth.key=password
edc.transfer.proxy.token.signer.privatekey.alias=edc.connector.private.key
edc.transfer.proxy.token.verifier.publickey.alias=edc.connector.public.key

edc.vault.hashicorp.url=http://localhost:8200
edc.vault.hashicorp.token=test-token
edc.vault.hashicorp.timeout.seconds=30

edc.ionos.access.key=<YOUR S3 KEY>
edc.ionos.secret.key=<YOUR S3 KEY SECRET>
edc.ionos.endpoint=https://s3-eu-central-1.ionoscloud.com
edc.ionos.token=<IONOS-TOKEN>
edc.ionos.endpoint=<IONOS-ENDPOINT>
edc.ionos.token=<IONOS-TOKEN>
2 changes: 2 additions & 0 deletions launchers/dev/connector-provider/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ val edcVersion: String by project
dependencies {
implementation(project(":launchers:base:connector"))

implementation("${edcGroup}:configuration-filesystem:${edcVersion}")
implementation("${edcGroup}:vault-hashicorp:${edcVersion}")
implementation("${edcGroup}:iam-mock:${edcVersion}")
}

Expand Down
6 changes: 4 additions & 2 deletions launchers/dev/connector-provider/resources/config.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
edc.runtime.id=provider
edc.participant.id=provider
web.http.port=8181
web.http.path=/api
Expand All @@ -13,12 +12,15 @@ web.http.public.path=/public
edc.dsp.callback.address=http://localhost:8282/protocol
edc.dataplane.token.validation.endpoint=http://localhost:8283/control/token
edc.dataplane.api.public.baseurl=http://localhost:8383/public

edc.api.auth.key=password
edc.transfer.proxy.token.signer.privatekey.alias=edc.connector.private.key
edc.transfer.proxy.token.verifier.publickey.alias=edc.connector.public.key

edc.vault.hashicorp.url=http://localhost:8200
edc.vault.hashicorp.token=test-token
edc.vault.hashicorp.timeout.seconds=30

edc.ionos.access.key=<YOUR S3 KEY>
edc.ionos.secret.key=<YOUR S3 KEY SECRET>
edc.ionos.endpoint=https://s3-eu-central-1.ionoscloud.com
edc.ionos.endpoint=<IONOS-ENDPOINT>
6 changes: 4 additions & 2 deletions launchers/prod/connector-persistence/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ val postgresVersion: String by project
dependencies {
implementation(project(":launchers:base:connector"))

implementation("${edcGroup}:configuration-filesystem:${edcVersion}")
implementation("${edcGroup}:vault-hashicorp:${edcVersion}")
implementation("${edcGroup}:iam-mock:${edcVersion}")

implementation("org.postgresql:postgresql:$postgresVersion")
implementation("${edcGroup}:sql-pool-apache-commons:$edcVersion")
implementation("${edcGroup}:transaction-local:$edcVersion")
Expand All @@ -35,8 +39,6 @@ dependencies {
implementation("${edcGroup}:contract-definition-store-sql:$edcVersion")
implementation("${edcGroup}:contract-negotiation-store-sql:$edcVersion")
implementation("${edcGroup}:transfer-process-store-sql:$edcVersion")

implementation("${edcGroup}:iam-mock:${edcVersion}")
}

application {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
edc.runtime.id=connector
edc.participant.id=connector
web.http.port=8181
web.http.path=/api
Expand All @@ -13,12 +12,11 @@ web.http.public.path=/public
edc.dsp.callback.address=http://localhost:8282/protocol
edc.dataplane.token.validation.endpoint=http://localhost:8283/control/token
edc.dataplane.api.public.baseurl=http://localhost:8383/public

edc.api.auth.key=password
edc.transfer.proxy.token.signer.privatekey.alias=edc.connector.private.key
edc.transfer.proxy.token.verifier.publickey.alias=edc.connector.public.key

edc.vault.clientid=company1
edc.vault.tenantid=1
edc.vault.certificate=/resources/
edc.vault.name=ionos
edc.vault.hashicorp.url=http://localhost:8200
edc.vault.hashicorp.token=test-token
edc.vault.hashicorp.timeout.seconds=30
Expand Down
4 changes: 3 additions & 1 deletion launchers/prod/connector/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ val edcVersion: String by project
dependencies {
implementation(project(":launchers:base:connector"))

implementation("${edcGroup}:iam-mock:${edcVersion}")
implementation("${edcGroup}:configuration-filesystem:${edcVersion}")
implementation("${edcGroup}:vault-hashicorp:${edcVersion}")
implementation("${edcGroup}:iam-mock:${edcVersion}")
}

application {
Expand Down
8 changes: 3 additions & 5 deletions launchers/prod/connector/resources/config.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
edc.runtime.id=connector
edc.participant.id=connector
web.http.port=8181
web.http.path=/api
Expand All @@ -13,12 +12,11 @@ web.http.public.path=/public
edc.dsp.callback.address=http://localhost:8282/protocol
edc.dataplane.token.validation.endpoint=http://localhost:8283/control/token
edc.dataplane.api.public.baseurl=http://localhost:8383/public

edc.api.auth.key=password
edc.transfer.proxy.token.signer.privatekey.alias=edc.connector.private.key
edc.transfer.proxy.token.verifier.publickey.alias=edc.connector.public.key

edc.vault.clientid=company1
edc.vault.tenantid=1
edc.vault.certificate=/resources/
edc.vault.name=ionos
edc.vault.hashicorp.url=http://localhost:8200
edc.vault.hashicorp.token=test-token
edc.vault.hashicorp.timeout.seconds=30
Expand Down
5 changes: 3 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@

dependencyResolutionManagement {
repositories {

mavenCentral()
mavenLocal()
}
versionCatalogs {
val group = providers.gradleProperty("edcGroup")
val version = providers.gradleProperty("edcVersion")
create("libs") {
from("org.eclipse.edc:edc-versions:0.1.2")
from(group.get() + ":edc-versions:" + version.get())
}
}
}
Expand Down

0 comments on commit 92f164b

Please sign in to comment.