Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker example and how-to #67

Merged
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
12 changes: 4 additions & 8 deletions edc-extension4aas/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,10 @@ dependencies {
repositories {
mavenCentral()
}

tasks.test {
useJUnitPlatform()
}

tasks.jacocoTestReport {
dependsOn(tasks.test) // tests are required to run before generating the report
}
tasks.compileJava {options.encoding = "UTF-8"}
tasks.compileTestJava {options.encoding = "UTF-8"}
tasks.test {useJUnitPlatform()}
tasks.jacocoTestReport {dependsOn(tasks.test)}

// FA³ST dependency needs the following
configurations.all {
Expand Down
6 changes: 3 additions & 3 deletions example/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ WORKDIR /app
# Copy FA³ST config
# COPY ./resources/demoConfig.json /app/demoConfig.json
# Copy config
COPY ./configurations /configurations
COPY ./resources /resources
# COPY ./configurations /configurations
# COPY ./resources /resources
# Copy jar
COPY ./build/libs/dataspace-connector.jar /app

ENV EDC_FS_CONFIG=$EDC_FS_CONFIG

ENTRYPOINT java -jar dataspace-connector.jar
ENTRYPOINT ["java", "-jar", "dataspace-connector.jar"]
11 changes: 7 additions & 4 deletions example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,15 @@ java "-Dedc.fs.config=./example/configurations/provider.properties" -jar ./examp

### Alternative: docker & docker-compose


After building the extension as seen above, a docker image can be built with

```sh
cd ./example
docker build -t edc-aas-extension:latest .
```
0. `cd ./example`
1. `docker build -t edc-aas-extension:latest .`
2. `mkdir workdir`
2. Create configuration under `./workdir/config.properties`
3. Add additional files under `./workdir` (Fitting to your paths in config.properties)
4. Run with `docker run -i -v $PWD/workdir:/workdir/ -e EDC_FS_CONFIG=/workdir/config.properties edc-extension4aas:latest`

This docker image can be run individually or **inside a docker-compose file**:

Expand Down
34 changes: 34 additions & 0 deletions example/configurations/workdir/config.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# AAS Extension specific
# Supply AAS model + (port XOR AAS service config) for an AAS service internally started by the extension
edc.aas.localAASModelPath=/workdir/demoAAS.json
edc.aas.localAASServicePort=8080
# edc.aas.localAASServiceConfigPath = /app/demoConfig.json
# Provide a URL of an already running AAS service (such as FA³ST, BaSyx)
# edc.aas.remoteAasLocation = http://example.com/aas
# Period of synchronizing the EDC assetStore with the connected AAS services (in seconds)
edc.aas.syncPeriod=100
# Path to a default access policy definition file
# edc.aas.defaultAccessPolicyDefinitionPath = ...
# Path to a default contract policy definition file
# edc.aas.defaultContractPolicyDefinitionPath = ...
# EDC specific, mostly default values
# Port and path for custom http services such as SelfDescription
web.http.port=8181
web.http.path=/api
# Port and path for requesting an EDC to communicate with another EDC by IDS messages (consumer-provider)
web.http.management.port=8182
web.http.management.path=/management
# Port and path for IDS messages (from another EDC)
web.http.protocol.port=8282
web.http.protocol.path=/dsp
edc.dsp.callback.address=http://provider:8282/dsp
edc.transfer.functions.enabled.protocols=http
# Connector hostname, which e.g. is used in referer urls
edc.hostname=provider
# Auth key for using internal EDC api (header key: x-api-key)
edc.api.auth.key=password
# GUI configuration (enable DataDashboard to communicate with EDC)
edc.web.rest.cors.enabled=true
edc.web.rest.cors.origins=*
edc.web.rest.cors.headers=x-api-key, content-type
edc.web.rest.cors.methods=GET, POST, DELETE, PUT, OPTIONS
Loading