Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
#
# Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# 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
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

---
name: "Run E2E Tests"

on:
push:
pull_request:

workflow_run:
workflows: [ "Draft Release" ]
types:
- completed

schedule:
- cron: '0 3 * * *' # Run at 3am UTC every day

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:
E2E-Tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: eclipse-edc/.github/.github/actions/setup-build@main

- name: "Setup Kubectl"
uses: azure/setup-kubectl@v4

- name: "Build runtime images"
run: |
./gradlew dockerize
docker buildx build -f launchers/postgres/Dockerfile -t ghcr.io/metaform/jad/postgres:wal2json launchers/postgres

- name: "Create k8s Kind Cluster"
uses: helm/kind-action@v1.12.0
with:
config: kind.config.yaml
cluster_name: jad

- name: "Load runtime images into KinD"
run: |
kind load docker-image -n jad ghcr.io/metaform/jad/postgres:wal2json \
ghcr.io/metaform/jad/controlplane:latest \
ghcr.io/metaform/jad/dataplane:latest \
ghcr.io/metaform/jad/identity-hub:latest \
ghcr.io/metaform/jad/issuerservice:latest \


- name: "Install nginx ingress controller"
run: |-
kubectl apply -f https://kind.sigs.k8s.io/examples/ingress/deploy-ingress-nginx.yaml
kubectl wait --namespace ingress-nginx \
--for=condition=ready pod \
--selector=app.kubernetes.io/component=controller \
--timeout=90s

- name: "Deploy JAD infrastructure"
run: |
# deploying the infrastructure first, wait for it to finish and deploying the applications afterwards is
# the safest way to avoid race conditions between apps and infra, e.g. vault.

kubectl apply -f k8s/base
kubectl wait --for=condition=Ready pods --all -n edc-v --timeout=90s

- name: "Deploy JAD applications"
run: |-
# this is crucial - without it, KinD would take the prebuilt images from GHCR
grep -rlZ "imagePullPolicy:.*Always" . | xargs sed -i "s/imagePullPolicy:.*Always/imagePullPolicy: Never/g"

kubectl apply -f k8s/apps
kubectl wait --namespace edc-v \
--for=condition=ready pod \
--selector=type=edcv-app \
--timeout=90s

- name: "Run E2E Test"
run: |
./gradlew test -DincludeTags="EndToEndTest"

- name: "Print log if test failed"
if: failure()
run: |-
kubectl logs deployment/controlplane -n edc-v
kubectl logs deployment/dataplane -n edc-v

- name: "Destroy the KinD cluster"
run: >-
kind delete cluster -n jad
10 changes: 0 additions & 10 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,3 @@ jobs:
run: |
./gradlew shadowJar
./gradlew test -DincludeTags="PostgresqlIntegrationTest"

e2e-Tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: eclipse-edc/.github/.github/actions/setup-build@main
- name: End to End Integration Tests
run: |
./gradlew shadowJar
./gradlew test -DincludeTags="EndToEndTest"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ Create another environment to suit your setup:

### Update deployment manifests

in [keycloak.yaml](k8s/keycloak.yaml) and [vault.yaml](k8s/vault.yaml), update the `host` fields in the `Ingress`
in [keycloak.yaml](k8s/base/keycloak.yaml) and [vault.yaml](k8s/base/vault.yaml), update the `host` fields in the `Ingress`
resources to match your DNS:

```yaml
Expand All @@ -204,7 +204,7 @@ spec:
http:
```

Next, in the [controlplane-config.yaml](./k8s/controlplane-config.yaml) change the expected issuer URL to match your
Next, in the [controlplane-config.yaml](k8s/apps/controlplane-config.yaml) change the expected issuer URL to match your
DNS:
```yaml
edc.iam.oauth2.issuer: "http://keycloak.localhost/realms/edcv" # change to "http://auth.yourdomain.com/realms/edcv"
Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ subprojects {
val dockerContextDir = project.projectDir
dockerFile.set(file("$dockerContextDir/src/main/docker/Dockerfile"))
images.add("ghcr.io/metaform/jad/${project.name}:${project.version}")
images.add("ghcr.io/metaform/jad/${project.name}:latest")

//images.add("${project.name}:latest")
// specify platform with the -Dplatform flag:
Expand Down
92 changes: 0 additions & 92 deletions dependabot.yml

This file was deleted.

10 changes: 10 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
format.version = "1.1"

[versions]
awaitility = "4.3.0"
edc = "0.15.0-SNAPSHOT"
edc-build = "1.1.4"
jackson = "2.20.1"
jackson-annotations = "2.20"
restAssured = "5.5.6"
bouncyCastle-jdk18on = "1.83"

[libraries]
Expand All @@ -20,6 +24,7 @@ edc-core-participantcontext-config = { module = "org.eclipse.edc:participant-con
edc-core-edrstore = { module = "org.eclipse.edc:edr-store-core", version.ref = "edc" }
edc-dcp = { module = "org.eclipse.edc:decentralized-claims-service", version.ref = "edc" }
edc-api-observability = { module = "org.eclipse.edc:api-observability", version.ref = "edc" }
edc-junit = { module = "org.eclipse.edc:junit", version.ref = "edc" }
edc-dataplane-v2 = { module = "org.eclipse.edc:data-plane-public-api-v2", version.ref = "edc" }
edc-core-dataplane-selector = { module = "org.eclipse.edc:data-plane-selector-core", version.ref = "edc" }
edc-core-dataplane-signaling-client = { module = "org.eclipse.edc:data-plane-signaling-client", version.ref = "edc" }
Expand Down Expand Up @@ -64,6 +69,7 @@ edc-spi-edrstore = { module = "org.eclipse.edc:edr-store-spi", version.ref = "ed

# identityhub SPI modules
edc-ih-spi-credentials = { module = "org.eclipse.edc:verifiable-credential-spi", version.ref = "edc" }
edc-ih-spi-participantcontext = { module = "org.eclipse.edc:participant-context-spi", version.ref = "edc" }
edc-ih-spi = { module = "org.eclipse.edc:identity-hub-spi", version.ref = "edc" }

# identityhub API modules
Expand All @@ -84,9 +90,13 @@ edc-bom-issuerservice = { module = "org.eclipse.edc:issuerservice-bom", version.
edc-bom-issuerservice-sql = { module = "org.eclipse.edc:issuerservice-feature-sql-bom", version.ref = "edc" }

# Third party deps
awaitility = { module = "org.awaitility:awaitility", version.ref = "awaitility" }
bouncyCastle-bcprovJdk18on = { module = "org.bouncycastle:bcprov-jdk18on", version.ref = "bouncyCastle-jdk18on" }
jackson-annotations = { module = "com.fasterxml.jackson.core:jackson-annotations", version.ref = "jackson-annotations" }
jackson-databind = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "jackson" }
tink = { module = "com.google.crypto.tink:tink", version = "1.19.0" }
nats-client = { module = "io.nats:jnats", version = "2.24.1" }
restAssured = { module = "io.rest-assured:rest-assured", version.ref = "restAssured" }

[bundles]
dcp = [
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions k8s/controlplane.yaml → k8s/apps/controlplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spec:
labels:
app: controlplane
platform: edcv
type: edcv-app
spec:
containers:
- name: controlplane
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions k8s/dataplane.yaml → k8s/apps/dataplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spec:
labels:
app: dataplane
platform: edcv
type: edcv-app
spec:
containers:
- name: dataplane
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions k8s/identityhub.yaml → k8s/apps/identityhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spec:
labels:
app: identityhub
platform: edcv
type: edcv-app
spec:
containers:
- name: identityhub
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions k8s/issuerservice.yaml → k8s/apps/issuerservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spec:
labels:
app: issuerservice
platform: edcv
type: edcv-app
spec:
containers:
- name: issuerservice
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions k8s/vault.yaml → k8s/base/vault.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ spec:
{
"role_type": "jwt",
"user_claim": "participant_context_id",
"bound_issuer": "http://auth.vps.beardyinc.com/realms/edcv",
"bound_issuer": "http://vault.localhost/realms/edcv",
"bound_claims": {
"role": "participant"
},
Expand Down Expand Up @@ -163,8 +163,7 @@ metadata:
namespace: edc-v
spec:
rules:
# - host: vault.localhost
- host: vault.vps.beardyinc.com
- host: vault.localhost
http:
paths:
- path: /
Expand Down
26 changes: 13 additions & 13 deletions k8s/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
#

resources:
- edcv-namespace.yaml
- postgres.yaml
- nats.yaml
- keycloak.yaml
- vault.yaml
- controlplane-config.yaml
- controlplane.yaml
- dataplane-config.yaml
- dataplane.yaml
- issuerservice-config.yaml
- issuerservice.yaml
- identityhub-config.yaml
- identityhub.yaml
- base/edcv-namespace.yaml
- base/postgres.yaml
- base/nats.yaml
- base/keycloak.yaml
- base/vault.yaml
- apps/controlplane-config.yaml
- apps/controlplane.yaml
- apps/dataplane-config.yaml
- apps/dataplane.yaml
- apps/issuerservice-config.yaml
- apps/issuerservice.yaml
- apps/identityhub-config.yaml
- apps/identityhub.yaml

Loading