Skip to content

Commit 0cdbb66

Browse files
committed
Merge branch 'develop' into feature/persistence-investigation
2 parents 759a1c7 + 64c418d commit 0cdbb66

16 files changed

+487
-56
lines changed

.github/workflows/continious_integration.yml

+13-2
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,28 @@ env:
77
REGISTRY: ghcr.io
88
REGISTRY_NAMESPACE: possible-x
99
K8S_NAMESPACE: ${{ github.ref == 'refs/heads/main' && 'mvd-001-demo' || 'edc-dev' }}
10+
POSTGRES_USER: postgres
11+
POSTGRES_PASSWORD: postgres
12+
POSTGRES_DB: postgres
1013
jobs:
1114
build-and-push-image:
1215
runs-on: ubuntu-latest
1316
permissions:
1417
contents: read
1518
packages: write
16-
19+
services:
20+
postgres:
21+
image: postgres:16
22+
env:
23+
POSTGRES_USER: ${{ env.POSTGRES_USER }}
24+
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
25+
POSTGRES_DB: ${{ env.POSTGRES_DB }}
26+
ports:
27+
- 5432:5432
28+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
1729
steps:
1830
- name: Checkout repository
1931
uses: actions/checkout@v3
20-
2132
- name: Set up JDK 17
2233
uses: actions/setup-java@v4
2334
with:

connector/build.gradle.kts

+29-30
Original file line numberDiff line numberDiff line change
@@ -43,50 +43,49 @@ val edcVersion: String by project
4343

4444

4545
dependencies {
46-
implementation("${edcGroup}:boot:${edcVersion}")
47-
implementation("${edcGroup}:connector-core:${edcVersion}")
4846

47+
implementation("${edcGroup}:boot:${edcVersion}")
48+
implementation("${edcGroup}:control-plane-core:${edcVersion}")
49+
implementation("${edcGroup}:control-plane-api:${edcVersion}")
50+
implementation("${edcGroup}:control-plane-api-client:${edcVersion}")
4951
implementation("${edcGroup}:api-observability:${edcVersion}")
5052
implementation("${edcGroup}:configuration-filesystem:${edcVersion}")
5153

52-
implementation("${edcGroup}:iam-mock:${edcVersion}")
53-
implementation("${edcGroup}:http:${edcVersion}")
54-
55-
implementation("${edcGroup}:control-plane-api-client:${edcVersion}")
56-
implementation("${edcGroup}:control-plane-api:${edcVersion}")
57-
implementation("${edcGroup}:control-plane-core:${edcVersion}")
58-
implementation("${edcGroup}:dsp:${edcVersion}")
5954
implementation("${edcGroup}:auth-tokenbased:${edcVersion}")
60-
implementation("${edcGroup}:management-api:${edcVersion}")
61-
implementation("${edcGroup}:data-plane-http:${edcVersion}")
55+
implementation("${edcGroup}:management-api:${edcVersion}")
6256

57+
//implementation("${edcGroup}:iam-mock:${edcVersion}")
58+
59+
implementation("${edcGroup}:oauth2-service:${edcVersion}")
60+
implementation("${edcGroup}:oauth2-daps:${edcVersion}")
61+
implementation("${edcGroup}:vault-filesystem:${edcVersion}")
62+
63+
implementation("${edcGroup}:dsp:${edcVersion}")
64+
//file-transfer
6365
implementation("${edcGroup}:data-plane-core:${edcVersion}")
64-
implementation("${edcGroup}:data-plane-api:${edcVersion}")
65-
implementation("${edcGroup}:data-plane-http:${edcVersion}")
6666
implementation("${edcGroup}:data-plane-client:${edcVersion}")
67-
implementation("${edcGroup}:data-plane-selector-core:${edcVersion}")
6867
implementation("${edcGroup}:data-plane-selector-client:${edcVersion}")
69-
implementation("${edcGroup}:data-plane-selector-api:${edcVersion}")
70-
implementation("${edcGroup}:data-plane-client:${edcVersion}")
71-
68+
implementation("${edcGroup}:data-plane-selector-core:${edcVersion}")
7269
implementation("${edcGroup}:transfer-data-plane:${edcVersion}")
73-
implementation("${edcGroup}:transfer-pull-http-dynamic-receiver:${edcVersion}")
74-
implementation("${edcGroup}:validator-data-address-http-data:${edcVersion}")
75-
76-
implementation("${edcGroup}:asset-index-sql:${edcVersion}")
77-
implementation("${edcGroup}:contract-definition-store-sql:${edcVersion}")
78-
implementation("${edcGroup}:contract-negotiation-store-sql:${edcVersion}")
79-
implementation("${edcGroup}:policy-definition-store-sql:${edcVersion}")
80-
implementation("${edcGroup}:policy-monitor-store-sql:${edcVersion}")
81-
implementation("${edcGroup}:sql-lease:${edcVersion}")
82-
implementation("${edcGroup}:sql-pool-apache-commons:${edcVersion}")
83-
implementation("${edcGroup}:transaction-local:$edcVersion")
84-
implementation("${edcGroup}:transaction-datasource-spi:$edcVersion")
70+
implementation("${edcGroup}:data-plane-http:${edcVersion}")
71+
implementation("${edcGroup}:http:${edcVersion}")
72+
73+
implementation(project(":policy-extension"))
8574

75+
//IONOS
8676
implementation ("com.ionoscloud.edc:provision-ionos-s3:v2.2.0")
8777
implementation ("com.ionoscloud.edc:data-plane-ionos-s3:v2.2.0")
8878

89-
implementation ("org.postgresql:postgresql:42.7.2")
79+
implementation("${edcGroup}:asset-index-sql:${edcVersion}")
80+
implementation("${edcGroup}:contract-definition-store-sql:${edcVersion}")
81+
implementation("${edcGroup}:contract-negotiation-store-sql:${edcVersion}")
82+
implementation("${edcGroup}:policy-definition-store-sql:${edcVersion}")
83+
implementation("${edcGroup}:policy-monitor-store-sql:${edcVersion}")
84+
implementation("${edcGroup}:sql-lease:${edcVersion}")
85+
implementation("${edcGroup}:sql-pool-apache-commons:${edcVersion}")
86+
implementation("${edcGroup}:transaction-local:$edcVersion")
87+
implementation("${edcGroup}:transaction-datasource-spi:$edcVersion")
88+
implementation ("org.postgresql:postgresql:42.7.2")
9089
}
9190

9291
repositories {

connector/resources/consumer-configuration.properties

+20-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
edc.participant.id=consumer
2-
edc.dsp.callback.address=http://localhost:29194/protocol
31
web.http.port=29191
42
web.http.path=/api
53
web.http.management.port=29193
@@ -10,17 +8,29 @@ web.http.public.port=29291
108
web.http.public.path=/public
119
web.http.control.port=29192
1210
web.http.control.path=/control
13-
web.http.data.port=9196
14-
web.http.data.path=/data
11+
12+
edc.dsp.callback.address=http://localhost:29194/protocol
13+
edc.participant.id=20:1D:9C:04:0A:71:B9:E7:8C:28:9D:70:A6:84:43:59:2D:BA:E8:B3:keyid:20:1D:9C:04:0A:71:B9:E7:8C:28:9D:70:A6:84:43:59:2D:BA:E8:B3
1514
edc.api.auth.key=password
16-
possible.connector.edcVersion=0.4.1
15+
edc.vault=/app/vault.properties
16+
edc.dataplane.token.validation.endpoint=http://localhost:4567/token
17+
1718

1819
edc.ionos.endpoint =https://s3-eu-central-2.ionoscloud.com
19-
ids.webhook.address=http://localhost:8282
20-
edc.vault.hashicorp.url=http://localhost:8200
21-
edc.vault.hashicorp.token=test-token
22-
edc.vault.hashicorp.timeout.seconds=30
23-
edc.dataplane.token.validation.endpoint=http://localhost:8184/control/token
20+
21+
#edc.mock.client.id="1234"
22+
23+
#edc.mock.region=us
24+
25+
edc.oauth.token.url=http://localhost:4567/token
26+
edc.oauth.certificate.alias=1
27+
edc.oauth.private.key.alias=1
28+
edc.oauth.client.id=20:1D:9C:04:0A:71:B9:E7:8C:28:9D:70:A6:84:43:59:2D:BA:E8:B3:keyid:20:1D:9C:04:0A:71:B9:E7:8C:28:9D:70:A6:84:43:59:2D:BA:E8:B3
29+
edc.oauth.provider.jwks.url=http://localhost:4567/jwks.json
30+
edc.oauth.provider.audience=idsc:IDS_CONNECTORS_ALL
31+
edc.iam.token.scope=idsc:IDS_CONNECTOR_ATTRIBUTES_ALL
32+
edc.keystore=/home/possible/workspace/localdeployment/initial_data/edc/consumer.pfx
33+
edc.keystore.password=zw9Eie7ztAqpl0Rbd/GEatmvzEREXEzL
2434

2535
edc.datasource.default.url=jdbc:postgresql://localhost:5432/edcconsumer
2636
edc.datasource.default.user=postgres

connector/resources/provider-configuration.properties

+19-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
edc.participant.id=provider
2-
edc.dsp.callback.address=http://localhost:19194/protocol
31
web.http.port=19191
42
web.http.path=/api
53
web.http.management.port=19193
@@ -10,18 +8,28 @@ web.http.public.port=19291
108
web.http.public.path=/public
119
web.http.control.port=19192
1210
web.http.control.path=/control
13-
edc.dataplane.api.public.baseurl=http://localhost:19291/public
14-
web.http.data.port=8186
15-
web.http.data.path=/data
11+
12+
edc.dsp.callback.address=http://localhost:19194/protocol
13+
edc.participant.id=59:0B:DD:26:41:AC:57:D7:ED:76:D5:84:F8:BC:AC:8E:4C:C7:56:70:keyid:59:0B:DD:26:41:AC:57:D7:ED:76:D5:84:F8:BC:AC:8E:4C:C7:56:70
1614
edc.api.auth.key=password
17-
possible.connector.edcVersion=0.4.1
15+
edc.vault=/app/vault.properties
16+
edc.dataplane.token.validation.endpoint=http://localhost:4567/token
1817

1918
edc.ionos.endpoint =https://s3-eu-central-2.ionoscloud.com
20-
ids.webhook.address=http://localhost:8282
21-
edc.vault.hashicorp.url=http://localhost:8200
22-
edc.vault.hashicorp.token=test-token
23-
edc.vault.hashicorp.timeout.seconds=30
24-
edc.dataplane.token.validation.endpoint=http://localhost:8184/control/token
19+
20+
#edc.mock.client.id="5678"
21+
22+
#edc.mock.region=eu
23+
24+
edc.oauth.token.url=http://localhost:4567/token
25+
edc.oauth.certificate.alias=1
26+
edc.oauth.private.key.alias=1
27+
edc.oauth.client.id=59:0B:DD:26:41:AC:57:D7:ED:76:D5:84:F8:BC:AC:8E:4C:C7:56:70:keyid:59:0B:DD:26:41:AC:57:D7:ED:76:D5:84:F8:BC:AC:8E:4C:C7:56:70
28+
edc.oauth.provider.jwks.url=http://localhost:4567/jwks.json
29+
edc.oauth.provider.audience=idsc:IDS_CONNECTORS_ALL
30+
edc.iam.token.scope=idsc:IDS_CONNECTOR_ATTRIBUTES_ALL
31+
edc.keystore=/home/possible/workspace/localdeployment/initial_data/edc/provider.pfx
32+
edc.keystore.password=F4HKbkgAORZWwzWasY10RhsxHt99LaoE
2533

2634
edc.datasource.default.url=jdbc:postgresql://localhost:5432/edcprovider
2735
edc.datasource.default.user=postgres

deployment/helm/possible-x-edc/templates/configmap.yaml

+11-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,14 @@ data:
2929
edc.dsp.callback.address={{ .Values.edc.dsp.callback.address }}
3030
edc.receiver.http.endpoint={{ .Values.edc.receiver.http.endpoint }}/receiver/{{ .Values.edc.ids.id }}/callback
3131
edc.public.key.alias={{ .Values.edc.public.key.alias }}
32-
edc.dataplane.token.validation.endpoint={{ .Values.edc.dataplane.token.validation.endpoint }}{{ .Values.web.http.control.path }}/token
32+
edc.dataplane.token.validation.endpoint={{ .Values.edc.dataplane.token.validation.endpoint }}
33+
edc.oauth.token.url={{ .Values.edc.oauth.token.url }}
34+
edc.oauth.certificate.alias={{ .Values.edc.oauth.certificate.alias }}
35+
edc.oauth.private.key.alias={{ .Values.edc.oauth.private.key.alias }}
36+
edc.oauth.client.id={{ .Values.edc.oauth.client.id }}
37+
edc.oauth.provider.jwks.url={{ .Values.edc.oauth.provider.jwks.url }}
38+
edc.oauth.provider.audience={{ .Values.edc.oauth.provider.audience }}
39+
edc.iam.token.scope={{ .Values.edc.iam.token.scope }}
40+
edc.keystore={{ .Values.edc.keystore.path }}
41+
edc.keystore.password={{ .Values.edc.keystore.password }}
42+
edc.vault={{ .Values.edc.vault.path }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
{{- if .Values.persistence.db.enabled -}}
3+
apiVersion: v1
4+
kind: Service
5+
metadata:
6+
name: {{ include "possible-x-edc.fullname" . }}-postgres
7+
spec:
8+
ports:
9+
- port: 5432
10+
name: postgres
11+
selector:
12+
app: {{ include "possible-x-edc.fullname" . }}-postgres
13+
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{{- if .Values.persistence.db.enabled -}}
2+
apiVersion: apps/v1
3+
kind: StatefulSet
4+
metadata:
5+
name: {{ include "possible-x-edc.fullname" . }}-postgres
6+
labels:
7+
app: {{ include "possible-x-edc.fullname" . }}-postgres
8+
spec:
9+
serviceName: "{{ include "possible-x-edc.fullname" . }}-postgres"
10+
replicas: 1
11+
selector:
12+
matchLabels:
13+
app: {{ include "possible-x-edc.fullname" . }}-postgres
14+
template:
15+
metadata:
16+
labels:
17+
app: {{ include "possible-x-edc.fullname" . }}-postgres
18+
spec:
19+
containers:
20+
- name: postgres
21+
image: "{{ .Values.persistence.db.image.repository }}:{{ .Values.persistence.db.image.tag }}"
22+
imagePullPolicy: {{ .Values.persistence.db.image.pullPolicy }}
23+
ports:
24+
- containerPort: 5432
25+
name: postgres
26+
env:
27+
- name: POSTGRES_DB
28+
value: "{{ .Values.persistence.db.databaseName }}"
29+
- name: POSTGRES_USER
30+
value: "{{ .Values.persistence.db.databaseUser }}"
31+
- name: POSTGRES_PASSWORD
32+
valueFrom:
33+
secretKeyRef:
34+
name: {{ .Values.persistence.db.databasePasswordSecretName }}
35+
key: POSTGRES_PASSWORD
36+
volumeMounts:
37+
- name: {{ include "possible-x-edc.fullname" . }}-postgres-storage
38+
mountPath: /var/lib/postgresql
39+
volumeClaimTemplates:
40+
- metadata:
41+
name: {{ include "possible-x-edc.fullname" . }}-postgres-storage
42+
spec:
43+
accessModes: ["ReadWriteOnce"]
44+
resources:
45+
requests:
46+
storage: 1Gi
47+
{{- end }}

deployment/helm/possible-x-edc/templates/deployment.yaml

+32-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,29 @@ spec:
2727
serviceAccountName: {{ include "possible-x-edc.serviceAccountName" . }}
2828
securityContext:
2929
{{- toYaml .Values.podSecurityContext | nindent 8 }}
30+
initContainers:
31+
- name: daps-init-container
32+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
33+
command: ["/bin/sh", "-c"]
34+
args:
35+
- |
36+
echo "path: $DAPS_KEY_PATH"
37+
echo "store: $DAPS_KEY_STORE"
38+
if ! [ -d $(dirname $DAPS_KEY_PATH) ] ; then mkdir -p $(dirname $DAPS_KEY_PATH) ; else echo "exists!"; fi
39+
echo "$DAPS_KEY_STORE" | base64 -d > $DAPS_KEY_PATH
40+
touch $VAULT_FILE
41+
volumeMounts:
42+
- name: keystore
43+
mountPath: /resources/keystore
44+
- name: vault
45+
mountPath: /resources/vault
46+
env:
47+
- name: DAPS_KEY_PATH
48+
value: {{ .Values.edc.keystore.path }}
49+
- name: DAPS_KEY_STORE
50+
value: {{ .Values.edc.keystore.content }}
51+
- name: VAULT_FILE
52+
value: {{ .Values.edc.vault.path }}
3053
containers:
3154
- name: {{ .Chart.Name }}
3255
securityContext:
@@ -37,7 +60,7 @@ spec:
3760
- name: EDC_FS_CONFIG
3861
value: "/resources/config.properties"
3962
- name: EDC_VAULT
40-
value: "/resources/config.properties"
63+
value: {{ .Values.edc.vault.path | default "/resources/vault/vault.properties" }}
4164
ports:
4265
- name: api
4366
containerPort: {{ .Values.service.apiPort }}
@@ -72,6 +95,10 @@ spec:
7295
- name: config
7396
mountPath: /resources/config.properties
7497
subPath: config.properties
98+
- name: keystore
99+
mountPath: resources/keystore
100+
- name: vault
101+
mountPath: /resources/vault
75102
{{- with .Values.nodeSelector }}
76103
nodeSelector:
77104
{{- toYaml . | nindent 8 }}
@@ -88,3 +115,7 @@ spec:
88115
- name: config
89116
configMap:
90117
name: {{ include "possible-x-edc.fullname" . }}-config
118+
- name: keystore
119+
emptyDir: {}
120+
- name: vault
121+
emptyDir: {}

deployment/helm/possible-x-edc/values.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -179,3 +179,15 @@ possible:
179179
token: notnull
180180
connector:
181181
edcVersion: 0.1.2
182+
183+
persistence:
184+
db:
185+
enabled: false
186+
image:
187+
repository: postgres
188+
pullPolicy: IfNotPresent
189+
tag: latest
190+
databaseUser: "admin"
191+
databaseName: "edc"
192+
databasePasswordSecretName: ""
193+
storageSize: 1Gi

0 commit comments

Comments
 (0)