Skip to content

Commit

Permalink
fix: Adapt MVD to current version of Data Dashboard (#180)
Browse files Browse the repository at this point in the history
* Update repository name

* Update Docker Compose version and removed unused Job

* Use current version of dashboard and update Terraform providers

* Use of relative paths as the use of the environment variable is not required

* app configuration adapted to current dashboard

* Using Compose as part of Docker
  • Loading branch information
MichaelSteinert authored Sep 4, 2023
1 parent 85311e5 commit c0c3fbe
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 49 deletions.
4 changes: 1 addition & 3 deletions .github/actions/gradle-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ description: "Setup Gradle"
runs:
using: "composite"
steps:

- name: Checkout EDC Data Dashboard
uses: actions/checkout@v3
with:
repository: eclipse-dataspaceconnector/DataDashboard
repository: eclipse-edc/DataDashboard
path: system-tests/DataDashboard
ref: ab1b6fd0870fa5ec8c170915a2b44fae63d576bd

# Install Java and cache MVD Gradle build.
- uses: actions/setup-java@v3
Expand Down
35 changes: 5 additions & 30 deletions .github/workflows/run_azure_dataspace_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/gradle-setup

- name: 'Copy IdentityHub and RegistrationService CLI Jars'
- name: 'Copy IdentityHub and RegistrationService CLI JARs'
run: |
./gradlew getJarsForLocalTest getJarsForAzureTest
working-directory: .
Expand All @@ -58,21 +58,16 @@ jobs:
./gradlew shadowJar
working-directory: .

- name: 'Create Dataspace with Terraform'
- name: 'Create dataspace with Terraform'
run: |
./create_azure_dataspace.sh
az storage blob upload --overwrite -c $TERRAFORM_STATE_CONTAINER --account-name $TERRAFORM_STATE_STORAGE_ACCOUNT -f terraform/terraform.tfvars -n terraform.tfvars
- name: 'Upgrade docker-compose (for --wait option)'
- name: 'Run dataspace in Docker'
run: |
sudo curl -L https://github.com/docker/compose/releases/download/v2.6.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker compose -f docker/docker-compose.yml up --build --wait
- name: 'Run Dataspace in Docker'
run: |
docker-compose -f docker/docker-compose.yml up --build --wait
- name: 'Seed Credentials and master data'
- name: 'Seed credentials and master data'
run: |
./seed_dataspace.sh
Expand All @@ -89,23 +84,3 @@ jobs:
run: |
az storage blob delete -c ${{ env.TERRAFORM_STATE_CONTAINER }} -n ${{ env.RESOURCES_PREFIX }} --account-name ${{ env.TERRAFORM_STATE_STORAGE_ACCOUNT }}
az storage blob delete -c ${{ env.TERRAFORM_STATE_CONTAINER }} -n terraform.tfvars --account-name ${{ env.TERRAFORM_STATE_STORAGE_ACCOUNT }}
# Destroy-Dataspace:
# if: ${{ always() && needs.SetResourcesPrefix.result == 'success' && needs.Check-Cloud-Environments.outputs.has-azure == 'true'}}
# runs-on: ubuntu-latest
# needs:
# - SetResourcesPrefix
# - Deploy
# - Check-Cloud-Environments
# defaults:
# run:
# working-directory: deployment/azure
# steps:
# - uses: actions/checkout@v3
# - uses: ./.github/actions/gradle-setup
#
# - name: 'Destroy Dataspace with Terraform'
# run: |
# ./shutdown_azure_dataspace.sh

18 changes: 8 additions & 10 deletions deployment/azure/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
version: "3"
name: "mvd-with-azure"
version: "3.9"
services:

# EDC Connector to simulate a dataspace participant acting as a data provider which is located in EU.
company1:
container_name: company1
build:
context: ../../launchers/connector
context: ../../../launchers/connector
args:
JVM_ARGS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
env_file:
Expand All @@ -25,7 +24,7 @@ services:
company2:
container_name: company2
build:
context: ../../launchers/connector
context: ../../../launchers/connector
args:
JVM_ARGS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5006"
env_file:
Expand All @@ -44,7 +43,7 @@ services:
company3:
container_name: company3
build:
context: ../../launchers/connector
context: ../../../launchers/connector
args:
JVM_ARGS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5007"
env_file:
Expand All @@ -59,12 +58,11 @@ services:
volumes:
- ../resources/self-description/company3:/resources


# Dataspace registration service authority.
registration-service:
container_name: registration-service
build:
#e.g. /home/user/RegistrationService/launcher
# e.g. /home/user/RegistrationService/launcher
context: ../../../launchers/registrationservice
args:
JVM_ARGS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5008"
Expand All @@ -82,7 +80,7 @@ services:
company1-datadashboard:
container_name: company1-datadashboard
build:
context: ${MVD_UI_PATH}
context: ../../system-tests/DataDashboard
volumes:
- ../resources/appconfig/company1:/usr/share/nginx/html/assets/config
depends_on:
Expand All @@ -97,7 +95,7 @@ services:
company2-datadashboard:
container_name: company2-datadashboard
build:
context: ${MVD_UI_PATH}
context: ../../system-tests/DataDashboard
volumes:
- ../resources/appconfig/company2:/usr/share/nginx/html/assets/config
depends_on:
Expand All @@ -111,7 +109,7 @@ services:
company3-datadashboard:
container_name: company3-datadashboard
build:
context: ${MVD_UI_PATH}
context: ../../system-tests/DataDashboard
volumes:
- ../resources/appconfig/company3:/usr/share/nginx/html/assets/config
depends_on:
Expand Down
8 changes: 5 additions & 3 deletions resources/setup_azure_ad/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@ terraform {
required_providers {
azuread = {
source = "hashicorp/azuread"
version = ">=2.26.1"
version = ">=2.41.0"
}
azurerm = {
source = "hashicorp/azurerm"
version = ">=3.16.0"
version = ">=3.71.0"
}
github = {
source = "integrations/github"
version = ">=4.28.0"
version = ">=5.34.0"
}
}
}

provider "azurerm" {
features {
}
}

provider "azuread" {
tenant_id = var.tenant_id
}
Expand Down
1 change: 1 addition & 0 deletions system-tests/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: "3.9"
services:

# EDC Connector to simulate a dataspace participant acting as a data provider which is located in EU.
Expand Down
3 changes: 2 additions & 1 deletion system-tests/resources/appconfig/company1/app.config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"apiKey": "ApiKeyDefaultValue",
"dataManagementApiUrl": "http://localhost:9191/api/management",
"managementApiUrl": "http://localhost:9191/api/management",
"catalogUrl": "http://localhost:9191/api/management",
"storageAccount": "company1assets",
"storageExplorerLinkTemplate": "storageexplorer://v=1",
"theme": "theme-1"
Expand Down
3 changes: 2 additions & 1 deletion system-tests/resources/appconfig/company2/app.config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"apiKey": "ApiKeyDefaultValue",
"dataManagementApiUrl": "http://localhost:9192/api/management",
"managementApiUrl": "http://localhost:9192/api/management",
"catalogUrl": "http://localhost:9192/api/management",
"storageAccount": "company2assets",
"storageExplorerLinkTemplate": "storageexplorer://v=1",
"theme": "theme-2"
Expand Down
3 changes: 2 additions & 1 deletion system-tests/resources/appconfig/company3/app.config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"apiKey": "ApiKeyDefaultValue",
"dataManagementApiUrl": "http://localhost:9193/api/management",
"managementApiUrl": "http://localhost:9193/api/management",
"catalogUrl": "http://localhost:9193/api/management",
"storageAccount": "company3assets",
"storageExplorerLinkTemplate": "storageexplorer://v=1",
"theme": "theme-3"
Expand Down

0 comments on commit c0c3fbe

Please sign in to comment.