-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: revisit transfer samples (#140)
* extracting negotiation tests * implementing Transfer02consumerPullTest * implementing Transfer03providerPushTest.java * implementing Transfer04eventConsumerTest.java * moving open telemetry to 'advanced' directory * reworking download of open telemetry jar inside gradle build file * checkStyle fixes * fix: clean up and merge * fix: added libs.edc.control.plane.api to build file * fix: fixed event consumer test * fix: resolving pr comments * refactor: move http-request-logger-wrapper.yaml to test directory * refactor: using docker image instead of docker compose for http request logger container * fix: fixing check style issues * fix: removing unnecessary stuff * refactor: removing HttpRequestLoggerUtil.java * fix: setting http-request-logger.jar archiveFilename explicitly
- Loading branch information
Showing
105 changed files
with
1,909 additions
and
3,097 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Advanced samples | ||
|
||
The samples in this scope teach advanced topics about the EDC framework. | ||
|
||
> Before starting with these samples, be sure to check out the [basic](../basic/README.md) and [transfer](../transfer/README.md) samples! | ||
## Samples | ||
|
||
### [Open Telemetry 01](./advanced-01-open-telemetry/README.md) Telemetry with OpenTelemetry and Micrometer | ||
|
||
In this sample you will learn how to generate traces with [OpenTelemetry](https://opentelemetry.io) | ||
and collect and visualize them with [Jaeger](https://www.jaegertracing.io/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
version: "3.8" | ||
|
||
services: | ||
|
||
consumer: | ||
build: | ||
context: ../.. | ||
dockerfile: advanced/advanced-01-open-telemetry/open-telemetry-consumer/Dockerfile | ||
volumes: | ||
- ./:/open-telemetry | ||
- ../../transfer/transfer-00-prerequisites/:/prerequisites | ||
ports: | ||
- "29193:29193" | ||
- "29194:29194" | ||
environment: | ||
EDC_HOSTNAME: consumer | ||
OTEL_SERVICE_NAME: consumer | ||
OTEL_TRACES_EXPORTER: jaeger | ||
OTEL_EXPORTER_JAEGER_ENDPOINT: http://jaeger:14250 | ||
OTEL_METRICS_EXPORTER: prometheus | ||
WEB_HTTP_PORT: 29191 | ||
WEB_HTTP_PATH: /api | ||
WEB_HTTP_PUBLIC_PORT: 29291 | ||
WEB_HTTP_PUBLIC_PATH: /public | ||
WEB_HTTP_CONTROL_PORT: 29192 | ||
WEB_HTTP_CONTROL_PATH: /control | ||
WEB_HTTP_MANAGEMENT_PORT: 29193 | ||
WEB_HTTP_MANAGEMENT_PATH: /management | ||
WEB_HTTP_PROTOCOL_PORT: 29194 | ||
WEB_HTTP_PROTOCOL_PATH: /protocol | ||
EDC_CONTROL_ENDPOINT: http://consumer:29192/control | ||
EDC_DSP_CALLBACK_ADDRESS: http://consumer:29194/protocol | ||
EDC_PARTICIPANT_ID: consumer | ||
EDC_API_AUTH_KEY: password | ||
EDC_KEYSTORE: /prerequisites/resources/certs/cert.pfx | ||
EDC_KEYSTORE_PASSWORD: 123456 | ||
EDC_VAULT: /prerequisites/resources/configuration/provider-vault.properties | ||
EDC_FS_CONFIG: /prerequisites/resources/configuration/provider-configuration.properties | ||
entrypoint: java | ||
-javaagent:/app/opentelemetry-javaagent.jar | ||
-Djava.util.logging.config.file=/open-telemetry/resources/logging.properties | ||
-jar /app/connector.jar | ||
|
||
provider: | ||
build: | ||
context: ../.. | ||
dockerfile: advanced/advanced-01-open-telemetry/open-telemetry-provider/Dockerfile | ||
volumes: | ||
- ./:/open-telemetry | ||
- ../../transfer/transfer-00-prerequisites/:/prerequisites | ||
ports: | ||
- "19193:19193" | ||
- "19192:19192" | ||
environment: | ||
EDC_HOSTNAME: provider | ||
OTEL_SERVICE_NAME: provider | ||
OTEL_TRACES_EXPORTER: jaeger | ||
OTEL_EXPORTER_JAEGER_ENDPOINT: http://jaeger:14250 | ||
WEB_HTTP_PORT: 19191 | ||
WEB_HTTP_PATH: /api | ||
WEB_HTTP_PUBLIC_PORT: 19291 | ||
WEB_HTTP_PUBLIC_PATH: /public | ||
WEB_HTTP_CONTROL_PORT: 19192 | ||
WEB_HTTP_CONTROL_PATH: /control | ||
WEB_HTTP_MANAGEMENT_PORT: 19193 | ||
WEB_HTTP_MANAGEMENT_PATH: /management | ||
WEB_HTTP_PROTOCOL_PORT: 19194 | ||
WEB_HTTP_PROTOCOL_PATH: /protocol | ||
EDC_CONTROL_ENDPOINT: http://provider:19192/control | ||
EDC_DSP_CALLBACK_ADDRESS: http://provider:19194/protocol | ||
EDC_PARTICIPANT_ID: provider | ||
EDC_API_AUTH_KEY: password | ||
EDC_KEYSTORE: /prerequisites/resources/certs/cert.pfx | ||
EDC_KEYSTORE_PASSWORD: 123456 | ||
EDC_VAULT: /prerequisites/resources/configuration/consumer-vault.properties | ||
EDC_FS_CONFIG: /prerequisites/resources/configuration/consumer-configuration.properties | ||
EDC_SAMPLES_TRANSFER_01_ASSET_PATH: /open-telemetry/README.md | ||
entrypoint: java | ||
-javaagent:/app/opentelemetry-javaagent.jar | ||
-Djava.util.logging.config.file=/open-telemetry/resources/logging.properties | ||
-jar /app/connector.jar | ||
|
||
jaeger: | ||
image: jaegertracing/all-in-one | ||
ports: | ||
- "16686:16686" | ||
|
||
prometheus: | ||
image: prom/prometheus:v2.30.3 | ||
volumes: | ||
- ./prometheus/:/etc/prometheus/ | ||
ports: | ||
- "9090:9090" |
11 changes: 11 additions & 0 deletions
11
advanced/advanced-01-open-telemetry/open-telemetry-consumer/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM gradle:jdk17 AS build | ||
|
||
WORKDIR /home/gradle/project/ | ||
COPY --chown=gradle:gradle . /home/gradle/project/ | ||
RUN gradle advanced:advanced-01-open-telemetry:open-telemetry-consumer:build | ||
|
||
FROM openjdk:17-slim | ||
|
||
WORKDIR /app | ||
COPY --from=build /home/gradle/project/advanced/advanced-01-open-telemetry/open-telemetry-consumer/build/libs/opentelemetry-javaagent-*.jar /app/opentelemetry-javaagent.jar | ||
COPY --from=build /home/gradle/project/advanced/advanced-01-open-telemetry/open-telemetry-consumer/build/libs/consumer.jar /app/connector.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
advanced/advanced-01-open-telemetry/open-telemetry-provider/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM gradle:jdk17 AS build | ||
|
||
WORKDIR /home/gradle/project/ | ||
COPY --chown=gradle:gradle . /home/gradle/project/ | ||
RUN gradle advanced:advanced-01-open-telemetry:open-telemetry-provider:build | ||
|
||
FROM openjdk:17-slim | ||
|
||
WORKDIR /app | ||
COPY --from=build /home/gradle/project/advanced/advanced-01-open-telemetry/open-telemetry-provider/build/libs/opentelemetry-javaagent-*.jar /app/opentelemetry-javaagent.jar | ||
COPY --from=build /home/gradle/project/advanced/advanced-01-open-telemetry/open-telemetry-provider/build/libs/provider.jar /app/connector.jar |
Oops, something went wrong.