diff --git a/mxd/ingress.tf b/mxd/ingress.tfignore similarity index 100% rename from mxd/ingress.tf rename to mxd/ingress.tfignore diff --git a/mxd/keycloak.tf b/mxd/keycloak.tf index 3c390ff0..60cb9426 100644 --- a/mxd/keycloak.tf +++ b/mxd/keycloak.tf @@ -17,6 +17,14 @@ # SPDX-License-Identifier: Apache-2.0 # +module "keycloak-postgres" { + source = "./modules/postgres" + database-name = "keycloak" + database-username = "keycloak" + database-password = "keycloak" + database-port = var.postgres-port +} + resource "kubernetes_deployment" "keycloak" { metadata { name = "keycloak" @@ -109,20 +117,21 @@ resource "kubernetes_config_map" "keycloak_env" { data = { KC_DB = "postgres" KC_DB_SCHEMA = "public" - KC_DB_PASSWORD = local.kc-pg-pwd - KC_DB_USERNAME = var.keycloak-db-user - KC_DB_URL = "jdbc:postgresql://${local.pg-host}/${var.keycloak-database}" + KC_DB_PASSWORD = module.keycloak-postgres.database-password + KC_DB_USERNAME = module.keycloak-postgres.database-username + KC_DB_URL = "jdbc:postgresql://${module.keycloak-postgres.database-url}/${module.keycloak-postgres.database-name}" KEYCLOAK_MIW_PUBLIC_CLIENT = "miw_public" KEYCLOAK_ADMIN = "admin" KEYCLOAK_ADMIN_PASSWORD = "admin" # the KC_HOSTNAME must be known in advance, so that Keycloak's token contain valid `iss` claims - KC_HOSTNAME = local.keycloak-ip - KC_HEALTH_ENABLED = true - MIW_BPN = var.miw-bpn - ALICE_BPN = var.alice-bpn - BOB_BPN = var.bob-bpn - TRUDY_BPN = var.trudy-bpn + KC_HOSTNAME = local.keycloak-ip + KC_HEALTH_ENABLED = true + MIW_BPN = var.miw-bpn + ALICE_BPN = var.alice-bpn + BOB_BPN = var.bob-bpn + TRUDY_BPN = var.trudy-bpn + PROXY_ADDRESS_FORWARDING = true } } @@ -146,6 +155,6 @@ resource "kubernetes_service" "keycloak" { } locals { - keycloak-ip = "10.96.103.80" - keycloak-url = "${local.keycloak-ip}:${var.keycloak-port}" + keycloak-ip = "100.104.103.180" + keycloak-url = "http://${local.keycloak-ip}:${var.keycloak-port}" } \ No newline at end of file diff --git a/mxd/keycloak/miw_test_realm.json b/mxd/keycloak/miw_test_realm.json index 4232c019..0c2f8bf1 100644 --- a/mxd/keycloak/miw_test_realm.json +++ b/mxd/keycloak/miw_test_realm.json @@ -26,7 +26,7 @@ "oauth2DeviceCodeLifespan": 600, "oauth2DevicePollingInterval": 5, "enabled": true, - "sslRequired": "external", + "sslRequired": "none", "registrationAllowed": false, "registrationEmailAsUsername": false, "rememberMe": false, diff --git a/mxd/main.tf b/mxd/main.tf index c726fd38..efdccdfb 100644 --- a/mxd/main.tf +++ b/mxd/main.tf @@ -29,7 +29,7 @@ terraform { keycloak = { source = "mrparkers/keycloak" - version = "4.3.1" + version = "4.4.0" } kubernetes = { source = "hashicorp/kubernetes" @@ -38,12 +38,14 @@ terraform { } provider "kubernetes" { - config_path = "~/.kube/config" + config_path = "~/.kube/config" + config_context = "shoot--edc-lpt--mxd" } provider "helm" { kubernetes { - config_path = "~/.kube/config" + config_path = "~/.kube/config" + config_context = "shoot--edc-lpt--mxd" } } @@ -52,11 +54,10 @@ module "alice-connector" { source = "./modules/connector" humanReadableName = "alice" participantId = var.alice-bpn - database-host = local.pg-ip database-name = "alice" database-credentials = { - user = "postgres" - password = "postgres" + user = "alice" + password = "alice" } ssi-config = { miw-url = "http://${kubernetes_service.miw.metadata.0.name}:${var.miw-api-port}" @@ -73,11 +74,10 @@ module "bob-connector" { source = "./modules/connector" humanReadableName = "bob" participantId = var.bob-bpn - database-host = local.pg-ip database-name = "bob" database-credentials = { - user = "postgres" - password = "postgres" + user = "bob" + password = "bob" } ssi-config = { miw-url = "http://${kubernetes_service.miw.metadata.0.name}:${var.miw-api-port}" diff --git a/mxd/miw.tf b/mxd/miw.tf index 3a1ad980..2175a687 100644 --- a/mxd/miw.tf +++ b/mxd/miw.tf @@ -17,6 +17,14 @@ # SPDX-License-Identifier: Apache-2.0 # +module "miw-postgres" { + source = "./modules/postgres" + database-name = "miw" + database-username = "miw" + database-password = "miw" + database-port = var.postgres-port +} + resource "kubernetes_deployment" "miw" { metadata { name = "miw" @@ -41,7 +49,7 @@ resource "kubernetes_deployment" "miw" { spec { container { name = "miw" - image = "tractusx/managed-identity-wallet:main" + image = "hemantxpatel/managed-identity-wallet:main" image_pull_policy = "Always" port { @@ -79,12 +87,12 @@ resource "kubernetes_config_map" "miw-config" { name = "miw-config" } data = { - DB_HOST = local.pg-ip - DB_PORT = var.postgres-port + DB_HOST = module.miw-postgres.database-host + DB_PORT = module.miw-postgres.database-port DB_USER = "postgres" - DB_NAME = var.miw-database - DB_USER_NAME = var.miw-db-user - DB_PASSWORD = local.miw-pg-pwd + DB_NAME = module.miw-postgres.database-name + DB_USER_NAME = module.miw-postgres.database-username + DB_PASSWORD = module.miw-postgres.database-password KEYCLOAK_CLIENT_ID = "miw_private_client" ENCRYPTION_KEY = "Woh9waid4Ei5eez0aitieghoow9so4oe" @@ -130,7 +138,7 @@ resource "kubernetes_service" "miw" { } locals { - miw-ip = "10.96.81.222" + miw-ip = "100.104.81.222" miw-url = "${local.miw-ip}:${var.miw-api-port}" keycloak-realm = "miw_test" } diff --git a/mxd/modules/connector/ingress.tf b/mxd/modules/connector/ingress.tf index a8ca02c8..08b0e076 100644 --- a/mxd/modules/connector/ingress.tf +++ b/mxd/modules/connector/ingress.tf @@ -28,6 +28,7 @@ resource "kubernetes_ingress_v1" "mxd-ingress" { spec { ingress_class_name = "nginx" rule { + host = "edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com" http { path { path = "/${var.humanReadableName}(/|$)(.*)" diff --git a/mxd/modules/connector/main.tf b/mxd/modules/connector/main.tf index 8799723e..338d4964 100644 --- a/mxd/modules/connector/main.tf +++ b/mxd/modules/connector/main.tf @@ -17,6 +17,15 @@ # SPDX-License-Identifier: Apache-2.0 # +module "postgres" { + source = "../postgres" + + database-name = var.database-name + database-username = var.database-credentials.user + database-password = var.database-credentials.password + database-port = var.database-port +} + resource "helm_release" "connector" { name = lower(var.humanReadableName) force_update = true @@ -27,6 +36,7 @@ resource "helm_release" "connector" { repository = "https://eclipse-tractusx.github.io/charts/dev" chart = "tractusx-connector" + version = "0.6.0" values = [ file("${path.module}/values.yaml"), @@ -37,7 +47,14 @@ resource "helm_release" "connector" { "postStart" : [ "sh", "-c", - "sleep 5 && /bin/vault kv put secret/client-secret content=${local.client_secret} && /bin/vault kv put secret/aes-keys content=${local.aes_key_b64} && /bin/vault kv put secret/${var.ssi-config.oauth-secretalias} content=${var.ssi-config.oauth-clientsecret}" + join(" && ", [ + "sleep 5", + "/bin/vault kv put secret/client-secret content=${local.client_secret}", + "/bin/vault kv put secret/aes-keys content=${local.aes_key_b64}", + "/bin/vault kv put secret/${var.ssi-config.oauth-secretalias} content=${var.ssi-config.oauth-clientsecret}", + "/bin/vault kv put secret/transferProxyTokenSignerPrivateKey content='${tls_private_key.transfer_proxy_privatekey.private_key_pem}'", + "/bin/vault kv put secret/transferProxyTokenSignerPublicKey content='${tls_private_key.transfer_proxy_privatekey.public_key_pem}'", + ]) ] } } @@ -47,6 +64,13 @@ resource "helm_release" "connector" { env : { "TX_SSI_ENDPOINT_AUDIENCE" : "http://${kubernetes_service.controlplane-service.metadata.0.name}:8084/api/v1/dsp" "EDC_DSP_CALLBACK_ADDRESS" : "http://${kubernetes_service.controlplane-service.metadata.0.name}:8084/api/v1/dsp" + "EDC_HOSTNAME" : "${var.humanReadableName}-tractusx-connector-controlplane" + "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_SOURCETYPES" : "HttpData,AmazonS3,AzureStorage" + "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_DESTINATIONTYPES" : "HttpProxy,AmazonS3,AzureStorage" + "EDC_DATASOURCE_POLICY-MONITOR_NAME" : "policy-monitor" + "EDC_DATASOURCE_POLICY-MONITOR_USER" : var.database-credentials.user + "EDC_DATASOURCE_POLICY-MONITOR_PASSWORD" : var.database-credentials.password + "EDC_DATASOURCE_POLICY-MONITOR_URL" : local.jdbcUrl } ssi : { miw : { @@ -109,8 +133,12 @@ resource "random_string" "aes_key_raw" { length = 16 } +resource "tls_private_key" "transfer_proxy_privatekey" { + algorithm = "ED25519" +} + locals { aes_key_b64 = base64encode(random_string.aes_key_raw.result) client_secret = base64encode(random_string.kc_client_secret.result) - jdbcUrl = "jdbc:postgresql://${var.database-host}:${var.database-port}/${var.database-name}" + jdbcUrl = "jdbc:postgresql://${module.postgres.database-url}/${var.database-name}" } \ No newline at end of file diff --git a/mxd/modules/connector/outputs.tf b/mxd/modules/connector/outputs.tf index 7de93be5..55011c65 100644 --- a/mxd/modules/connector/outputs.tf +++ b/mxd/modules/connector/outputs.tf @@ -28,14 +28,14 @@ output "database-name" { value = var.database-name } -output "urls" { - value = { - management = local.management_url - health = local.health_url - proxy = local.proxy_url - public = local.public_url - } -} +#output "urls" { +# value = { +# management = local.management_url +# health = local.health_url +# proxy = local.proxy_url +# public = local.public_url +# } +#} output "node-ip" { value = kubernetes_service.controlplane-service.spec.0.cluster_ip diff --git a/mxd/modules/connector/values.yaml b/mxd/modules/connector/values.yaml index 4328f6af..20ba30d3 100644 --- a/mxd/modules/connector/values.yaml +++ b/mxd/modules/connector/values.yaml @@ -34,7 +34,7 @@ controlplane: authKey: password image: pullPolicy: Never - tag: "latest" + #tag: "latest" # repository: "edc-controlplane-postgresql-hashicorp-vault" securityContext: # avoids some errors in the log: cannot write temp files of large multipart requests when R/O @@ -52,7 +52,7 @@ dataplane: port: 1044 image: pullPolicy: Never - tag: "latest" + #tag: "latest" # repository: "edc-dataplane-hashicorp-vault" securityContext: # avoids some errors in the log: cannot write temp files of large multipart requests when R/O @@ -78,6 +78,8 @@ vault: token: root secretNames: transferProxyTokenEncryptionAesKey: aes-keys + transferProxyTokenSignerPrivateKey: transferProxyTokenSignerPrivateKey + transferProxyTokenSignerPublicKey: transferProxyTokenSignerPublicKey # this must be set through CLI args: --set vault.secrets=$YOUR_VAULT_SECRETS where YOUR_VAULT_SECRETS should # # be a string in the format "key1:secret1;key2:secret2;..." secrets: diff --git a/mxd/modules/connector/variables.tf b/mxd/modules/connector/variables.tf index 73941f1f..c13e86fc 100644 --- a/mxd/modules/connector/variables.tf +++ b/mxd/modules/connector/variables.tf @@ -33,10 +33,6 @@ variable "participantId" { description = "Participant ID of the connector. In Catena-X, this MUST be the BPN" } -variable "database-host" { - description = "IP address (ClusterIP) or host name of the postgres database host" - -} variable "database-port" { default = 5432 description = "Port where the Postgres database is reachable, defaults to 5432." diff --git a/mxd/postgres.tf b/mxd/modules/postgres/main.tf similarity index 67% rename from mxd/postgres.tf rename to mxd/modules/postgres/main.tf index 36bd1b56..cf17b445 100644 --- a/mxd/postgres.tf +++ b/mxd/modules/postgres/main.tf @@ -19,9 +19,9 @@ resource "kubernetes_deployment" "postgres" { metadata { - name = "postgres" + name = local.app-name labels = { - App = "postgres" + App = local.app-name } } @@ -29,19 +29,19 @@ resource "kubernetes_deployment" "postgres" { replicas = 1 selector { match_labels = { - App = "postgres" + App = local.app-name } } template { metadata { labels = { - App = "postgres" + App = local.app-name } } spec { container { image = local.pg-image - name = "postgres" + name = local.app-name env_from { config_map_ref { @@ -92,7 +92,7 @@ resource "kubernetes_deployment" "postgres" { # ConfigMap that contains SQL statements to initialize the DB, create a "miw" DB, etc. resource "kubernetes_config_map" "postgres-config" { metadata { - name = "pg-initdb-config" + name = "${local.app-name}-initdb-config" } ## Create databases for keycloak and MIW, create users and assign privileges @@ -100,21 +100,11 @@ resource "kubernetes_config_map" "postgres-config" { POSTGRES_USER = "postgres" POSTGRES_PASSWORD = "postgres" "init.sql" = < ``` +4. To visualize aggregated result with regression analysis, use the following command: + ```python3 results_aggregation.py --regression ``` +5. Replace with the path to the folder containing your test results + + The expected folder structure for the is as follows: + - Test collection result folder + - Experiment 1 + - metadata file + - dashboard folder + - statistics file + - Experiment 2 + - metadata file + - dashboard folder + - statistics file +6. Replace with the desired name for the output HTML file. +7. Replace with desired operation name, e.g- 'OEM Query Catalog' + +#### Example +```python3 results_aggregation.py test-result output.html --regression 'OEM Query Catalog'``` + +### Test results +After executing the shell script, the test results can be viewed at /Output/measurement_interval/index.html. +Of relevance is the sub-item "Statistics" in index.html. This sub-item contains, among other things: + +| Naming | Explanation | +|------------------------------|------------------------------| +| Executions | Number of processes performed | +| Response Time (ms) | Number in milliseconds of how long it takes the EDC to respond | +| Throughput | Ratio of executions to response time | +| Network (KB/sec) | Data throughput of the EDC in KB | + +[See JMeter Dashboard Reference](https://jmeter.apache.org/usermanual/generating-dashboard.html) + +### Customizing the Experiments + +1. [OPTIONAL] Review and update the connectors properties in the three different .properties files. A brief explanation of all properties can be found in the User Guide of this document. +2. Execute the [run_experiment.sh](mxd-performance-evaluation/run_experiment.sh) script (Bash4 required). To do this, enter the corresponding arguments (two required), on which parameters the execution should be carried out and which of the two phases of the experiment (as described in the test design) should be executed. + +**.properties -files "-q": (First argument)** + +| Naming | Default Values | +|------------------------------|------------------------------| +| S = small_experiment.properties | Supplier/OEM Plants = 1, Initial cars/parts = 10000 | +| M = medium_experiment.properties | Supplier/OEM Plants = 5, Initial cars/parts = 100000 | +| L = medium_experiment.properties | Supplier/OEM Plants = 10, Initial cars/parts = 1000000 | + +**.jmx -files "-t": (Second argument)** + +| Letter | Execution of | +|------------------------------|------------------------------| +| S | setup.jmx | +| M | measurement.jmx | diff --git a/mxd/performance-tests/experiment_controller.sh b/mxd/performance-tests/experiment_controller.sh new file mode 100755 index 00000000..ea35a947 --- /dev/null +++ b/mxd/performance-tests/experiment_controller.sh @@ -0,0 +1,283 @@ +#!/bin/bash +# Run mxd performance tests + +# Constants +LOG_MESSAGE="Test Completed" +POD_NAME="mxd-performance-test" +GENERATED_OUTPUT_FILE="/opt/apache-jmeter-5.5/mxd-performance-evaluation/output.tar" +GENERATED_OUTPUT_SLIM_FILE="/opt/apache-jmeter-5.5/mxd-performance-evaluation/output_slim.tar" +CUSTOM_PROPERTIES="custom_experiment.properties" +TERRAFORM_LOGFILE="terraform_logs_$(date +%d-%m-%YT%H-%M-%S).logs" +TEST_CONFIGURATION_FILE_EXTENSION=".properties" + +#defaults +path_to_test_configuration="test-configurations/small_experiment.properties" +terraform_dir="$(dirname "$0")/.." +test_pod_context="kind-mxd" +test_environment_context="kind-mxd" +is_debug=true + + +#Override defaults with provided command line arguments +while getopts "f:t:x:y:d" opt; do + case $opt in + f) path_to_test_configuration=$OPTARG;; + t) terraform_dir=$OPTARG;; + x) test_pod_context=$OPTARG;; + y) test_environment_context=$OPTARG;; + d) is_debug=$OPTARG;; + \?) cat help.txt; exit 1;; + esac +done + + +# Prints an info message +print_info_log() { + echo -e "$(date +%d-%m-%Y) $(date +%H:%M:%S) \033[32m INFO \033[0m $@" +} + +# Prints a debug message +print_debug_log() { + read IN + if [[ $is_debug == true ]]; then + echo -e "$(date +%d-%m-%Y) $(date +%H:%M:%S) \033[33m DEBUG \033[0m $IN" + fi +} + +# Prints an error message +print_error_log() { + echo -e "$(date +%d-%m-%Y) $(date +%H:%M:%S) \033[31m ERROR \033[0m $@" +} + +# Prints error messages and exits with error code +print_error_log_and_exit() { + echo -e "$(date +%d-%m-%Y) $(date +%H:%M:%S) \033[31m ERROR \033[0m $@" + cleanup_test_environment + exit 1 +} + + +####################################### +# Sets up test environment +# Globals: +# CUSTOM_PROPERTIES +# TERRAFORM_LOGFILE +# POD_NAME +# terraform_dir +# test_pod_context +# test_environment_context +# Arguments: +# experiment_file - .properties file used as test configuration +# Outputs: +# Creates all the needed pods for running performance tests +####################################### +setup_test_environment() { + local experiment_file=$1 + + print_info_log "Adding ${experiment_file} on pod using custom-property configmap" + kubectl create configmap custom-property \ + --from-file="run_experiment.sh=mxd-performance-evaluation/run_experiment.sh" \ + --from-file="setup.jmx=mxd-performance-evaluation/setup.jmx" \ + --from-file="measurement_interval.jmx=mxd-performance-evaluation/measurement_interval.jmx" \ + --from-file="${CUSTOM_PROPERTIES}=${experiment_file}" \ + --context="${test_pod_context}" \ + | print_debug_log \ + || print_error_log_and_exit "Failed to create configmap with name custom-property" + + print_info_log "Init terraform" + terraform -chdir="${terraform_dir}" init \ + >> "${TERRAFORM_LOGFILE}" \ + || print_error_log_and_exit "Failed to initialize Terraform" + + print_info_log "Create namespace monitoring" + kubectl create namespace monitoring --context="${test_environment_context}" \ + | print_debug_log \ + || print_error_log_and_exit "Failed to create namespace monitoring" + + print_info_log "Deploy Prometheus" + kubectl apply -f prometheus --context="${test_environment_context}" \ + || print_error_log_and_exit "Failed to deploy Prometheus" + + print_info_log "Apply terraform" + terraform -chdir="${terraform_dir}" apply -auto-approve \ + >> "${TERRAFORM_LOGFILE}" \ + || print_error_log_and_exit "Failed to apply Terraform" + + print_info_log "Create performance tests pod" + kubectl apply -f performance-test.yaml --context="${test_pod_context}" \ + | print_debug_log \ + || print_error_log_and_exit "Failed to deploy Prometheus" + + print_info_log "Waiting for test pod ready state" + kubectl wait --for=condition=ready "pod/${POD_NAME}" --context="${test_pod_context}" \ + | print_debug_log \ + || print_error_log_and_exit "Test pod failed to reach ready state" +} + +####################################### +# Copies test result files to local machine +# Globals: +# POD_NAME +# LOG_MESSAGE +# GENERATED_OUTPUT_FILE +# GENERATED_OUTPUT_SLIM_FILE +# test_pod_context +# Arguments: +# experiment_file - .properties file used as test configuration +# Outputs: +# It's copying the 2 .tar files containing the test results +# form the test pod in the local /test-configurations folder +####################################### +copy_test_result_files() { + local experiment_file=$1 + local logs + + print_info_log "Waiting for the tests to finish ..." + while true; do + logs=$(kubectl logs --tail=5 "${POD_NAME}" --context="${test_pod_context}" 2>/dev/null) + + if echo "${logs}" | grep -q "${LOG_MESSAGE}"; then + + print_info_log "Log message found in the logs." + + kubectl cp --retries=-1 "${POD_NAME}:${GENERATED_OUTPUT_FILE}" \ + "${experiment_file}.tar" --context="${test_pod_context}" + print_info_log "Test Report downloaded with name output_${experiment_file}.tar" + + kubectl cp --retries=-1 "${POD_NAME}:${GENERATED_OUTPUT_SLIM_FILE}" \ + "${experiment_file}_slim.tar" --context="${test_pod_context}" + print_info_log "Test Report downloaded with name output_${experiment_file}_slim.tar" + + break + else + echo "Waiting for log message" | print_debug_log + sleep 5 + fi + done +} + +####################################### +# Cleans up test environment +# Globals: +# terraform_dir +# test_pod_context +# test_environment_context +# POD_NAME +# TERRAFORM_LOGFILE +# Arguments: - +# Outputs: +# Deletes all the pods and config maps and leaves a clean cluster +####################################### +cleanup_test_environment() { + + print_info_log "Destroying terraform" + terraform -chdir="${terraform_dir}" destroy -auto-approve \ + >> "${TERRAFORM_LOGFILE}" \ + || print_error_log "Failed to destroy Terraform" \ + + print_info_log "Destroying test pod" + kubectl delete pod "${POD_NAME}" --context="${test_pod_context}" \ + | print_debug_log \ + || print_error_log "Failed to delete test pod" + + print_info_log "Destroying configmap" + kubectl delete configmap custom-property --context="${test_pod_context}" \ + | print_debug_log \ + || print_error_log "Failed to delete configmap custom-property" + + print_info_log "Destroying Prometheus" + kubectl delete -f prometheus --context="${test_environment_context}" \ + | print_debug_log \ + || print_error_log "Failed to delete Prometheus" + + print_info_log "Deleting namespace monitoring" + kubectl delete namespace monitoring --context="${test_environment_context}" \ + | print_debug_log \ + || print_error_log "Failed to delete namespace monitoring" + + print_info_log "Waiting for the test pod to be deleted" + kubectl wait --for=delete "pod/${POD_NAME}" --context="${test_pod_context}" \ + | print_debug_log \ + || print_error_log "Failed to delete test pod" +} + +####################################### +# Starts test for a single file +# Globals: - +# Arguments: +# experiment_file - .properties file used as test configuration +# Outputs: +# Creates all the pods, runs tests, copies results and cleans afterwards +####################################### +start_test_for_a_single_file() { + local experiment_file=$1 + + print_info_log Start experiment for file $experiment_file + + setup_test_environment "$experiment_file" + copy_test_result_files "$experiment_file" + cleanup_test_environment +} + +####################################### +# Starts test for all files in the provided directory +# Globals: +# TEST_CONFIGURATION_FILE_EXTENSION +# Arguments: - +# Outputs: - +####################################### +start_test_for_all_files_in_directory() { + # Use an array to store the all properties file in provided folder + local files_array=() + + # Populate the array with all files in provided folder + while IFS= read -r -d '' file; do + files_array+=("$file") + done < <(find "${path_to_test_configuration}" -type f -name "*${TEST_CONFIGURATION_FILE_EXTENSION}" -print0) + + # Print files in provided folder + for file in "${files_array[@]}"; do + print_info_log "Detected following properties file: $file" + done + + # Start test for one file at a time + for file in "${files_array[@]}"; do + start_test_for_a_single_file "$file" + done +} + +####################################### +# Run test for the provided file or folder +# Globals: +# path_to_test_configuration +# Arguments: - +# Outputs: +# Runs a single file or all the files in the folder +####################################### +run_test_for_provided_file_or_folder() { + if [ -e "$path_to_test_configuration" ]; then + if [ -f "$path_to_test_configuration" ]; then + print_info_log "${path_to_test_configuration} is a file." + start_test_for_a_single_file "$path_to_test_configuration" + elif [ -d "$path_to_test_configuration" ]; then + print_info_log "${path_to_test_configuration} is a directory." + start_test_for_all_files_in_directory + else + print_info_log "${path_to_test_configuration} exists but is neither a file nor a directory." + fi + else + print_info_log "${path_to_test_configuration} does not exist." + fi +} + +# Cleans up resources and exit +cleanup_and_exit() { + cleanup_test_environment + exit 0 +} + +# Execute cleanup_test_environment when CONTROL+C is invoked +trap cleanup_and_exit INT + +# Script entry point +run_test_for_provided_file_or_folder diff --git a/mxd/performance-tests/graphics/Initial_Counter.svg b/mxd/performance-tests/graphics/Initial_Counter.svg new file mode 100644 index 00000000..baa3f200 --- /dev/null +++ b/mxd/performance-tests/graphics/Initial_Counter.svg @@ -0,0 +1,4 @@ + + + +
Test Driver
Consumer
Provider
Create Assets
1...initial
Setup Phase(setup.jmx)
Measurement phase
(measurement_interval.jmx)
Use Assets
1..n
Create Assets
initial+1..n
loop
Check for Assets
1..n
\ No newline at end of file diff --git a/mxd/performance-tests/graphics/Sources/Inital_Counter.drawio b/mxd/performance-tests/graphics/Sources/Inital_Counter.drawio new file mode 100644 index 00000000..6f480a40 --- /dev/null +++ b/mxd/performance-tests/graphics/Sources/Inital_Counter.drawio @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mxd/performance-tests/graphics/Sources/Supplier_OEM.drawio b/mxd/performance-tests/graphics/Sources/Supplier_OEM.drawio new file mode 100644 index 00000000..c9124b4c --- /dev/null +++ b/mxd/performance-tests/graphics/Sources/Supplier_OEM.drawio @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mxd/performance-tests/graphics/Sources/TestSetup.drawio b/mxd/performance-tests/graphics/Sources/TestSetup.drawio new file mode 100644 index 00000000..2219f2a4 --- /dev/null +++ b/mxd/performance-tests/graphics/Sources/TestSetup.drawio @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mxd/performance-tests/graphics/Sources/Test_Deployment.drawio b/mxd/performance-tests/graphics/Sources/Test_Deployment.drawio new file mode 100644 index 00000000..5a4b88ee --- /dev/null +++ b/mxd/performance-tests/graphics/Sources/Test_Deployment.drawio @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mxd/performance-tests/graphics/Supplier_OEM.svg b/mxd/performance-tests/graphics/Supplier_OEM.svg new file mode 100644 index 00000000..070506a3 --- /dev/null +++ b/mxd/performance-tests/graphics/Supplier_OEM.svg @@ -0,0 +1,3 @@ + + +
OEM Plants
OEM Plants
Supplier Fleet Managers
Supplier Fleet Managers
Parts produced per time interval (PARTS_PRODUCED_PER_INTERVALL)
Parts produced per time interval...
Cars requested per time interval
(CARS_REQUESTED_PER_INTERVALL)
Cars requested per time in...

Sources:
Factory-Icon: Flaticon (2024): fabrik_861164, in: https://www.flaticon.com/de/kostenloses-icon/fabrik_861164 (22.01.24)
Engine-Icon: Flaticon (2024): auto-motor_5557384, in: https://www.flaticon.com/de/kostenloses-icon/auto-motor_5557384 (22.01.24)
Bill-Icon: Flaticon (2024): rechnung_1449943, in: https://www.flaticon.com/de/kostenloses-icon/rechnung_1449943 (22.01.24)
Production-Line-Icon: Flaticon (2024): production-line_9420117, in: https://www.flaticon.com/de/kostenloses-icon/production-line_9420117 (22.01.24)
Office-Icon: Flaticon (2024): buro_1086562, in: https://www.flaticon.com/de/kostenloses-icon/buro_1086562 (22.01.24)

Sources:...
Cars produced per time interval (CARS_PRODUCED_PER_INTERVALL)
Cars produced per time interval (...
 Supplier Plants
 Supplier Plants
Number of OEM plants
(OEM_PLANTS)
Number of OEM plants...
Number of Supplier plants
(SUPPLIER_PLANTS)
Number of Supplier pl...
Number of Fleet Managers
(FLEET_MANAGERS)
Number of Fleet Manag...
Text is not SVG - cannot display
\ No newline at end of file diff --git a/mxd/performance-tests/graphics/TestSetup.svg b/mxd/performance-tests/graphics/TestSetup.svg new file mode 100644 index 00000000..50843e2f --- /dev/null +++ b/mxd/performance-tests/graphics/TestSetup.svg @@ -0,0 +1,3 @@ + + +
System Under Test
System Under Test
Part Twins
Part Twins
OEM
OEM
Control Plane
Control Plane
Data Plane
Data Plane
Car Twins
Car Twins
Supplier
Supplier
Control Plane
Control Plane
Data Plane
Data Plane
Workload Driver
Workload Driver
Text is not SVG - cannot display
\ No newline at end of file diff --git a/mxd/performance-tests/graphics/Test_Deployment.svg b/mxd/performance-tests/graphics/Test_Deployment.svg new file mode 100644 index 00000000..c9cfe009 --- /dev/null +++ b/mxd/performance-tests/graphics/Test_Deployment.svg @@ -0,0 +1,3 @@ + + +
Kubernetes Cluster
Kubernetes Cluster
Worker Node
Worker Node
OEM Pod
OEM Pod
OEM_EDC.jar
OEM_EDC.jar
OEM Container
OEM Container
JMeter Pod
JMeter Pod
JMeter Container
JMeter Container
Supplier Pod
Supplier Pod
Supplier_EDC.jar
Supplier_EDC.jar
Supplier Container
Supplier Container
JMeterScript
JMeterScript
Database Pod
Database Pod
Database Container
Database Container
OEM Postgres Database
OEM Postgres Database
Database Pod
Database Pod
Database Container
Database Container
Supplier Postgres Database
Supplier Postgres Da...
MIW Pod
MIW Pod
Managed Identity Wallet
Managed Identity Wal...
MIW Container
MIW Container
Database Pod
Database Pod
Database Container
Database Container
MIW Postgres Database
MIW Postgres Database
Text is not SVG - cannot display
\ No newline at end of file diff --git a/mxd/performance-tests/help.txt b/mxd/performance-tests/help.txt new file mode 100644 index 00000000..ca2ac8c7 --- /dev/null +++ b/mxd/performance-tests/help.txt @@ -0,0 +1,6 @@ +Help: + -f Set the path to file/folder with experiment files (default: "test-configurations/small_experiment.properties") + -t Set the Terraform directory (default: "parent folder") + -d Enable debug mode (default: true) + -x Test pod context (cluster used to host test pod) (default: kind-mxd) + -y Environment context (cluster used to host full-blown MXD environment) (default: kind-mxd) diff --git a/mxd/performance-tests/mxd-performance-evaluation/measurement_interval.jmx b/mxd/performance-tests/mxd-performance-evaluation/measurement_interval.jmx new file mode 100755 index 00000000..840be594 --- /dev/null +++ b/mxd/performance-tests/mxd-performance-evaluation/measurement_interval.jmx @@ -0,0 +1,1670 @@ + + + + + + + + EXPERIMENT_DURATION_SEC + ${__P(EXPERIMENT_DURATION_SEC, 60)} + = + + + EDC_NAMESPACE + = + ${__P(EDC_NAMESPACE, https://w3id.org/edc/v0.0.1/ns/)} + + + BACKEND_SERVICE + = + ${__P(BACKEND_SERVICE, https://requestbin.myworkato.com/z8zu6nz9)} + + + MAX_NEGOTIATION_POLL_COUNT + ${__P(MAX_NEGOTIATION_POLL_COUNT, 100)} + = + + + MAX_TRANSFER_POLL_COUNT + ${__P(MAX_TRANSFER_POLL_COUNT, 100)} + = + + + LOOP_COUNT + ${__P(LOOP_COUNT, 50)} + = + + + THREAD_COUNT + ${__P(THREAD_COUNT, 1)} + = + + + INTERVALS_PER_MINUTE + ${__P(INTERVALS_PER_MINUTE, 10)} + = + + + OEM_MANAGEMENT_URL + ${__P(OEM_MANAGEMENT_URL, http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/alice/management)} + = + + + OEM_PROTOCOL_URL + = + ${__P(OEM_PROTOCOL_URL, http://alice-controlplane:8084/api/v1/dsp)} + + + OEM_ID + = + ${__P(OEM_ID, BPNL000000000001)} + + + OEM_API_KEY + ${__P(OEM_API_KEY, password)} + = + + + OEM_PLANTS + ${__P(OEM_PLANTS, 2)} + = + + + OEM_CARS_INITIAL + ${__P(OEM_CARS_INITIAL, 1000)} + = + + + PARTS_PER_CAR + ${__P(PARTS_PER_CAR, 100)} + = + + + CARS_PRODUCED_PER_INTERVALL + ${__P(CARS_PRODUCED_PER_INTERVALL, 1)} + = + + + SUPPLIER_MANAGEMENT_URL + ${__P(SUPPLIER_MANAGEMENT_URL, http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/bob/management)} + = + + + SUPPLIER_PROTOCOL_URL + = + ${__P(SUPPLIER_PROTOCOL_URL, http://bob-controlplane:8084/api/v1/dsp)} + + + SUPPLIER_ID + = + ${__P(SUPPLIER_ID, BPNL000000000002)} + + + SUPPLIER_API_KEY + ${__P(SUPPLIER_API_KEY, password)} + = + + + SUPPLIER_PLANTS + ${__P(SUPPLIER_PLANTS, 2)} + = + + + PARTS_PRODUCED_PER_INTERVALL + ${__P(PARTS_PRODUCED_PER _INTERVALL, 50)} + = + + + SUPPLIER_FLEET_MANAGERS + ${__P(SUPPLIER_FLEET_MANAGERS, 1)} + = + + + SUPPLIER_PARTS_PLANTS_COUNT + ${__P(SUPPLIER_PARTS_PLANTS_COUNT)} + = + + + SUPPLIER_FLEET_COUNT + ${__P(SUPPLIER_FLEET_COUNT)} + = + + + CARS_REQUESTED_PER_INTERVALL + ${__P(CARS_REQUESTED_PER_INTERVALL, 1)} + = + + + SUPPLIER_PARTS_INITIAL + ${__P(SUPPLIER_PARTS_INITIAL, 1000)} + = + + + + + + + ${OEM_PLANTS} + ${EXPERIMENT_DURATION_SEC} + true + true + startnextloop + + -1 + false + + + + + false + true + false + + + + 0 + ${INTERVALS_PER_MINUTE} + + + + + + NEGOTIATION_ID + NEGOTIATION_STATE + TRANSFER_ID + TRANSFER_STATE + + + + + + + + + + true + Local Variables to be reset after each loop + + + + ${__intSum(1,${OEM_CARS_INITIAL})} + + 1 + PROVIDE_COUNTER + + false + + + + 1 + + 1 + CONSUME_COUNTER + + false + + + + 6 + ${OEM_MANAGEMENT_URL}/v3/assets + true + POST + true + true + + + + false + { + "@context": {}, + "@id": "${PROVIDE_COUNTER}", + "properties": { + "description": "Product EDC Demo Asset" + }, + "dataAddress": { + "@type": "DataAddress", + "type": "HttpData", + "baseUrl": "https://jsonplaceholder.typicode.com/todos" + } +} + = + + + + + + + + + X-Api-Key + ${OEM_API_KEY} + + + Content-Type + application/json + + + + + + + 200 + 409 + + + Assertion.response_code + true + 40 + + + + + 6 + ${OEM_MANAGEMENT_URL}/v2/policydefinitions + true + POST + true + true + + + + false + { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@type": "PolicyDefinitionRequestDto", + "@id": "${PROVIDE_COUNTER}", + "policy": { + "@type": "Policy", + "odrl:permission" : [{ + "odrl:action" : "USE", + "odrl:constraint" : { + "@type": "LogicalConstraint", + "odrl:or" : [{ + "@type" : "Constraint", + "odrl:leftOperand" : "BusinessPartnerNumber", + "odrl:operator" : { + "@id": "odrl:eq" + }, + "odrl:rightOperand" : "${SUPPLIER_ID}" + }] + } + }] + } +} + = + + + + + + + + + X-Api-Key + ${OEM_API_KEY} + + + Content-Type + application/json + + + + + + + 200 + 409 + + + Assertion.response_code + true + 40 + + + + + 6 + ${OEM_MANAGEMENT_URL}/v2/contractdefinitions + true + POST + true + true + + + + false + { + "@context": {}, + "@id": "${PROVIDE_COUNTER}", + "@type": "ContractDefinition", + "accessPolicyId": "${PROVIDE_COUNTER}", + "contractPolicyId": "${PROVIDE_COUNTER}", + "assetsSelector" : { + "@type" : "CriterionDto", + "operandLeft": "${EDC_NAMESPACE}id", + "operator": "=", + "operandRight": "${PROVIDE_COUNTER}" + } +} + = + + + + + + + + + X-Api-Key + ${OEM_API_KEY} + + + Content-Type + application/json + + + + + + + 200 + 409 + + + Assertion.response_code + true + 40 + + + + + 6 + ${SUPPLIER_MANAGEMENT_URL}/v3/assets/${CONSUME_COUNTER} + true + GET + true + false + + + + + + + + + X-Api-Key + ${SUPPLIER_API_KEY} + + + Content-Type + application/json + + + + + + + 6 + ${OEM_MANAGEMENT_URL}/v2/catalog/request + true + POST + true + + + + false + { + "@context": { + "@vocab": "https://w3id.org/edc/v0.0.1/ns/" + }, + "@type": "CatalogRequest", + "counterPartyAddress": "${SUPPLIER_PROTOCOL_URL}", + "protocol": "dataspace-protocol-http", + "querySpec": { + "offset": 0, + "limit": 10, + "filterExpression": { + "@type": "CriterionDto", + "operandLeft": "https://w3id.org/edc/v0.0.1/ns/id", + "operator": "=", + "operandRight": "${CONSUME_COUNTER}" + } + } +} + = + + + + + + + + + X-Api-Key + ${OEM_API_KEY} + + + Content-Type + application/json + + + + + + CONTRACT_OFFER_ID + ${__eval($['dcat:dataset'][?(@.id=="${CONSUME_COUNTER}")]['odrl:hasPolicy']['@id'])} + + + + + groovy + + + true + var offerId = vars.get("CONTRACT_OFFER_ID") + +if(offerId == null || offerId.isEmpty()) { + AssertionResult.setFailure(true) + AssertionResult.setFailureMessage("CONTRACT_OFFER_ID is missing") +} + + + + + + 6 + ${OEM_MANAGEMENT_URL}/v2/contractnegotiations + true + POST + true + true + + + + false + { + "@context": { + "@vocab": "https://w3id.org/edc/v0.0.1/ns/", + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@type": "https://w3id.org/edc/v0.0.1/ns/ContractRequest", + "counterPartyAddress": "${SUPPLIER_PROTOCOL_URL}", + "protocol": "dataspace-protocol-http", + "providerId": "${SUPPLIER_ID}", + "offer": { + "offerId": "${CONTRACT_OFFER_ID}", + "assetId": "${CONSUME_COUNTER}", + "policy": { + "@context": "http://www.w3.org/ns/odrl.jsonld", + "@type": "odrl:Set", + "@id": "${CONSUME_COUNTER}", + "odrl:permission" : { + "odrl:target" : "${CONSUME_COUNTER}", + "odrl:action": { + "odrl:type": "USE" + }, + "odrl:constraint" : { + "odrl:or" : { + "odrl:leftOperand" : "BusinessPartnerNumber", + "odrl:operator" : { + "@id": "odrl:eq" + }, + "odrl:rightOperand" : "${OEM_ID}" + } + } + }, + "odrl:prohibition": [], + "odrl:obligation": [], + "odrl:target": "${CONSUME_COUNTER}" + } + }, + "callbackAddresses": [] +} + = + + + + + + + + + X-Api-Key + ${OEM_API_KEY} + + + Content-Type + application/json + + + + + + NEGOTIATION_ID + $['@id'] + 1 + + + + + true + + + + ${__jexl3("${NEGOTIATION_STATE}" != "FINALIZED" && +${__jm__Negotiation_State_Loop__idx} < ${MAX_NEGOTIATION_POLL_COUNT})} + Loop while Negotiation State is FINALIZED + + + + 500 + + + + 6 + ${OEM_MANAGEMENT_URL}/v2/contractnegotiations/${NEGOTIATION_ID}/state + true + GET + true + false + + + + + + + + + X-Api-Key + ${OEM_API_KEY} + + + Content-Type + application/json + + + + + + NEGOTIATION_STATE + $['state'] + + + + + + + groovy + + + true + var currentState = vars.get("NEGOTIATION_STATE"); + +if(!"FINALIZED".equals( currentState)) { + SampleResult.setSuccessful(false); + SampleResult.setResponseData("Negotiation State is not 'FINALIZED' after ${vars.get('MAX_NEGOTIATION_POLL_COUNT')} attempts. Current State: ${currentState}"); +} + + + + + + 6 + ${OEM_MANAGEMENT_URL}/v2/contractnegotiations/${NEGOTIATION_ID} + true + GET + true + false + + + + + + + + + X-Api-Key + ${OEM_API_KEY} + + + Content-Type + application/json + + + + + + CONTRACT_AGREEMENT_ID + $['contractAgreementId'] + + + + + + 6 + ${OEM_MANAGEMENT_URL}/v2/transferprocesses + true + POST + true + true + + + + false + { + "@context": { + "@vocab": "https://w3id.org/edc/v0.0.1/ns/" + }, + "@type": "https://w3id.org/edc/v0.0.1/ns/TransferRequest", + "protocol": "dataspace-protocol-http", + "counterPartyAddress": "${SUPPLIER_PROTOCOL_URL}", + "connectorId": "${SUPPLIER_ID}", + "contractId": "${CONTRACT_AGREEMENT_ID}", + "assetId": "${CONSUME_COUNTER}", + "dataDestination": { + "type": "HttpProxy" + }, + "privateProperties": { + "receiverHttpEndpoint": "${BACKEND_SERVICE}" + }, + + "transferType": { + "contentType": "application/octet-stream", + "isFinite": true + } +} + = + + + + + + + + + X-Api-Key + ${OEM_API_KEY} + + + Content-Type + application/json + + + + + + TRANSFER_ID + $['@id'] + 1 + + + + + true + + + + ${__jexl3("${TRANSFER_STATE}" != "STARTED" && +${__jm__Transfer_State_Loop__idx} < ${MAX_TRANSFER_POLL_COUNT})} + Loop while Transfer State is STARTED + + + + 500 + + + + 6 + ${OEM_MANAGEMENT_URL}/v2/transferprocesses/${TRANSFER_ID}/state + true + GET + true + false + + + + + + + + + X-Api-Key + ${OEM_API_KEY} + + + Content-Type + application/json + + + + + + TRANSFER_STATE + $['state'] + + + + + + + groovy + + + true + var currentState = vars.get("TRANSFER_STATE"); + +if(!"STARTED".equals( currentState)) { + SampleResult.setSuccessful(false); + SampleResult.setResponseData("Transfer State is not 'COMPLETED' after ${vars.get('MAX_TRANSFER_POLL_COUNT')} attempts. Current State: ${currentState}"); +} + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + true + true + true + true + true + true + false + true + true + false + true + 0 + true + true + true + true + true + true + true + true + true + + + output/measurement_interval_oem_plants_errors.xml + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + SetUp OEM + + + + + ${SUPPLIER_PLANTS} + ${EXPERIMENT_DURATION_SEC} + true + true + startnextloop + + -1 + false + + + + + false + true + false + + + + 0 + ${INTERVALS_PER_MINUTE} + + + + + + NEGOTIATION_ID + NEGOTIATION_STATE + TRANSFER_ID + TRANSFER_STATE + + + + + + + + + + true + Local Variables to be reset after each loop + + + + ${__intSum(1,${SUPPLIER_PARTS_INITIAL})} + + 1 + ID + + false + + + + 6 + ${SUPPLIER_MANAGEMENT_URL}/v3/assets + true + POST + true + true + + + + false + { + "@context": {}, + "@id": "${ID}", + "properties": { + "description": "Product EDC Demo Asset" + }, + "dataAddress": { + "@type": "DataAddress", + "type": "HttpData", + "baseUrl": "https://jsonplaceholder.typicode.com/todos" + } +} + = + + + + + + + + + X-Api-Key + ${SUPPLIER_API_KEY} + + + Content-Type + application/json + + + + + + + 200 + 409 + + + Assertion.response_code + true + 40 + + + + + 6 + ${SUPPLIER_MANAGEMENT_URL}/v2/policydefinitions + true + POST + true + true + + + + false + { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@type": "PolicyDefinitionRequestDto", + "@id": "${ID}", + "policy": { + "@type": "Policy", + "odrl:permission" : [{ + "odrl:action" : "USE", + "odrl:constraint" : { + "@type": "LogicalConstraint", + "odrl:or" : [{ + "@type" : "Constraint", + "odrl:leftOperand" : "BusinessPartnerNumber", + "odrl:operator" : { + "@id": "odrl:eq" + }, + "odrl:rightOperand" : "${OEM_ID}" + }] + } + }] + } +} + = + + + + + + + + + X-Api-Key + ${SUPPLIER_API_KEY} + + + Content-Type + application/json + + + + + + + 200 + 409 + + + Assertion.response_code + true + 40 + + + + + 6 + ${SUPPLIER_MANAGEMENT_URL}/v2/contractdefinitions + true + POST + true + true + + + + false + { + "@context": {}, + "@id": "${ID}", + "@type": "ContractDefinition", + "accessPolicyId": "${ID}", + "contractPolicyId": "${ID}", + "assetsSelector" : { + "@type" : "CriterionDto", + "operandLeft": "${EDC_NAMESPACE}id", + "operator": "=", + "operandRight": "${ID}" + } +} + = + + + + + + + + + X-Api-Key + ${SUPPLIER_API_KEY} + + + Content-Type + application/json + + + + + + + 200 + 409 + + + Assertion.response_code + true + 40 + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + true + true + true + true + true + true + false + true + true + false + true + 0 + true + true + true + true + true + true + true + true + true + + + output/measurement_interval_supplier_plants_errors.xml + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + SetUp OEM + + + + + ${SUPPLIER_FLEET_MANAGERS} + ${EXPERIMENT_DURATION_SEC} + true + true + startnextloop + + -1 + false + + + + + false + true + false + + + + 0 + ${INTERVALS_PER_MINUTE} + + + + + 1 + + 1 + CONSUME_COUNTER + + false + Consumes the current value from the OEM. + + + + + NEGOTIATION_ID + NEGOTIATION_STATE + TRANSFER_ID + TRANSFER_STATE + + + + + + + + + + true + Local Variables to be reset after each loop + + + + 6 + ${OEM_MANAGEMENT_URL}/v3/assets/${CONSUME_COUNTER} + true + GET + true + false + + + + + + + + + X-Api-Key + ${SUPPLIER_API_KEY} + + + Content-Type + application/json + + + + + + + 6 + ${SUPPLIER_MANAGEMENT_URL}/v2/catalog/request + true + POST + true + true + + + + false + { + "@context": { + "@vocab": "https://w3id.org/edc/v0.0.1/ns/" + }, + "@type": "CatalogRequest", + "counterPartyAddress": "${OEM_PROTOCOL_URL}", + "protocol": "dataspace-protocol-http", + "querySpec": { + "offset": 0, + "limit": 10, + "filterExpression": { + "@type": "CriterionDto", + "operandLeft": "https://w3id.org/edc/v0.0.1/ns/id", + "operator": "=", + "operandRight": "${CONSUME_COUNTER}" + } + } +} + = + + + + + + + + + X-Api-Key + ${SUPPLIER_API_KEY} + + + Content-Type + application/json + + + + + + CONTRACT_OFFER_ID + ${__eval($['dcat:dataset'][?(@.id=="${CONSUME_COUNTER}")]['odrl:hasPolicy']['@id'])} + + + + + groovy + + + true + var offerId = vars.get("CONTRACT_OFFER_ID") + +if(offerId == null || offerId.isEmpty()) { + AssertionResult.setFailure(true) + AssertionResult.setFailureMessage("CONTRACT_OFFER_ID is missing") +} + + + + + + 6 + ${SUPPLIER_MANAGEMENT_URL}/v2/contractnegotiations + true + POST + true + true + + + + false + { + "@context": { + "@vocab": "https://w3id.org/edc/v0.0.1/ns/", + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@type": "https://w3id.org/edc/v0.0.1/ns/ContractRequest", + "counterPartyAddress": "${OEM_PROTOCOL_URL}", + "protocol": "dataspace-protocol-http", + "providerId": "${OEM_ID}", + "offer": { + "offerId": "${CONTRACT_OFFER_ID}", + "assetId": "${CONSUME_COUNTER}", + "policy": { + "@context": "http://www.w3.org/ns/odrl.jsonld", + "@type": "odrl:Set", + "@id": "${CONSUME_COUNTER}", + "odrl:permission" : { + "odrl:target" : "${CONSUME_COUNTER}", + "odrl:action": { + "odrl:type": "USE" + }, + "odrl:constraint" : { + "odrl:or" : { + "odrl:leftOperand" : "BusinessPartnerNumber", + "odrl:operator" : { + "@id": "odrl:eq" + }, + "odrl:rightOperand" : "${SUPPLIER_ID}" + } + } + }, + "odrl:prohibition": [], + "odrl:obligation": [], + "odrl:target": "${CONSUME_COUNTER}" + } + }, + "callbackAddresses": [] +} + = + + + + + + + + + X-Api-Key + ${SUPPLIER_API_KEY} + + + Content-Type + application/json + + + + + + NEGOTIATION_ID + $['@id'] + 1 + + + + + true + + + + ${__jexl3("${NEGOTIATION_STATE}" != "FINALIZED" && +${__jm__Negotiation_State_Loop__idx} < ${MAX_NEGOTIATION_POLL_COUNT})} + Loop while Negotiation State is FINALIZED + + + + 500 + + + + 6 + ${SUPPLIER_MANAGEMENT_URL}/v2/contractnegotiations/${NEGOTIATION_ID}/state + true + GET + true + false + + + + + + + + + X-Api-Key + ${SUPPLIER_API_KEY} + + + Content-Type + application/json + + + + + + NEGOTIATION_STATE + $['state'] + + + + + + + groovy + + + true + var currentState = vars.get("NEGOTIATION_STATE"); + +if(!"FINALIZED".equals( currentState)) { + SampleResult.setSuccessful(false); + SampleResult.setResponseData("Negotiation State is not 'FINALIZED' after ${vars.get('MAX_NEGOTIATION_POLL_COUNT')} attempts. Current State: ${currentState}"); +} + + + + + + 6 + ${SUPPLIER_MANAGEMENT_URL}/v2/contractnegotiations/${NEGOTIATION_ID} + true + GET + true + false + + + + + + + + + X-Api-Key + ${SUPPLIER_API_KEY} + + + Content-Type + application/json + + + + + + CONTRACT_AGREEMENT_ID + $['contractAgreementId'] + + + + + + 6 + ${SUPPLIER_MANAGEMENT_URL}/v2/transferprocesses + true + POST + true + true + + + + false + { + "@context": { + "@vocab": "https://w3id.org/edc/v0.0.1/ns/" + }, + "@type": "https://w3id.org/edc/v0.0.1/ns/TransferRequest", + "protocol": "dataspace-protocol-http", + "counterPartyAddress": "${OEM_PROTOCOL_URL}", + "connectorId": "${OEM_ID}", + "contractId": "${CONTRACT_AGREEMENT_ID}", + "assetId": "${CONSUME_COUNTER}", + "dataDestination": { + "type": "HttpProxy" + }, + "privateProperties": { + "receiverHttpEndpoint": "${BACKEND_SERVICE}" + }, + + "transferType": { + "contentType": "application/octet-stream", + "isFinite": true + } +} + = + + + + + + + + + X-Api-Key + ${SUPPLIER_API_KEY} + + + Content-Type + application/json + + + + + + TRANSFER_ID + $['@id'] + 1 + + + + + true + + + + ${__jexl3("${TRANSFER_STATE}" != "STARTED" && +${__jm__Transfer_State_Loop__idx} < ${MAX_TRANSFER_POLL_COUNT})} + Loop while Transfer State is STARTED + + + + 500 + + + + 6 + ${SUPPLIER_MANAGEMENT_URL}/v2/transferprocesses/${TRANSFER_ID}/state + true + GET + true + false + + + + + + + + + X-Api-Key + ${SUPPLIER_API_KEY} + + + Content-Type + application/json + + + + + + TRANSFER_STATE + $['state'] + + + + + + + groovy + + + true + var currentState = vars.get("TRANSFER_STATE"); + +if(!"STARTED".equals( currentState)) { + SampleResult.setSuccessful(false); + SampleResult.setResponseData("Transfer State is not 'COMPLETED' after ${vars.get('MAX_TRANSFER_POLL_COUNT')} attempts. Current State: ${currentState}"); +} + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + true + true + true + true + true + true + false + true + true + false + true + 0 + true + true + true + true + true + true + true + true + true + + + output/supplier_fleet_manager_errors.xml + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + SetUp OEM + + + + + + diff --git a/mxd/performance-tests/mxd-performance-evaluation/results_aggregation.py b/mxd/performance-tests/mxd-performance-evaluation/results_aggregation.py new file mode 100644 index 00000000..c09360c4 --- /dev/null +++ b/mxd/performance-tests/mxd-performance-evaluation/results_aggregation.py @@ -0,0 +1,223 @@ +import json +import plotly.graph_objects as go +import os +import sys +import numpy as np +from sklearn.linear_model import LinearRegression +import argparse + +OEM_CARS_INITIAL = 'OEM_CARS_INITIAL' +SUPPLIER_PARTS_INITIAL = 'SUPPLIER_PARTS_INITIAL' +OEM_PLANTS = 'OEM_PLANTS' +SUPPLIER_PLANTS = 'SUPPLIER_PLANTS' +SUPPLIER_FLEET_MANAGERS = 'SUPPLIER_FLEET_MANAGERS' +ADDITIONAL_CONTRACT_DEFINITIONS_OEM = 'ADDITIONAL_CONTRACT_DEFINITIONS_OEM' +ADDITIONAL_CONTRACT_DEFINITIONS_SUPPLIER = 'ADDITIONAL_CONTRACT_DEFINITIONS_SUPPLIER' +DEFAULT_OUTPUT_FILE = 'output.html' +USAGE_MESSAGE = 'Usage: python3 results_aggregation.py --regression --metric ' + + +def load_metadata(metadata_file): + """ + Load metadata from a text file. + """ + metadata = {} + + with open(metadata_file, 'r') as f: + for line in f: + line = line.strip() + if "=" in line: + key, value = line.split('=') + metadata[key.strip()] = value.strip() + return metadata + + +def load_stats(stat_file, metric_name): + """ + Load statistics from a JSON file. + """ + with open(stat_file, 'r') as file: + data = json.load(file) + + processes_data = {} + + for process_name, process_data in data.items(): + metric_val = process_data[metric_name] + if not isinstance(metric_val, (int, float, complex)): + print("Error: Found non-numeric value in passed metric field") + sys.exit() + processes_data[process_name] = metric_val + + return processes_data + + +def sort_processes(processes, metadata): + """ + Sort processes based on specified criteria. + """ + sorted_processes = sorted(processes, key=lambda x: ( + int(metadata[x].get(OEM_CARS_INITIAL)), + int(metadata[x].get(SUPPLIER_PARTS_INITIAL)), + int(metadata[x].get(OEM_PLANTS)), + int(metadata[x].get(SUPPLIER_PLANTS)), + int(metadata[x].get(SUPPLIER_FLEET_MANAGERS)), + int(metadata[x].get(ADDITIONAL_CONTRACT_DEFINITIONS_OEM)), + int(metadata[x].get(ADDITIONAL_CONTRACT_DEFINITIONS_SUPPLIER)), + )) + return sorted_processes + + +def erase_file_contents(filename): + if os.path.exists(filename): + with open(filename, 'w') as file: + pass + + +def plot_process_data(scenarios, stats_data, output_file, metric_name): + figures = [] + all_calls = stats_data[scenarios[0]].keys() + + for c in all_calls: + x_axis_data = [] + y_axis_data = [] + for s in scenarios: + mapping = stats_data[s] + if not mapping.get(c) is None: + response_time = stats_data[s][c] + y_axis_data.append(response_time) + x_axis_data.append(s) + trace = go.Bar( + x=x_axis_data, + y=y_axis_data + ) + + layout = go.Layout( + title=c, + xaxis=dict(title=c), + yaxis=dict(title=metric_name, range=[0, None]) + ) + fig = go.Figure(data=[trace], layout=layout) + figures.append(fig) + + erase_file_contents(output_file) + + with open(output_file, 'a') as f: + for fig in figures: + f.write(fig.to_html(full_html=False, include_plotlyjs='cdn')) + f.write('
') + + +def analyze_response_time(output_file, metadata, stats_data, scenarios, operation_name): + contract_def_list = [] + response_time_list = [] + + for s in scenarios: + contract_def = metadata[s][ADDITIONAL_CONTRACT_DEFINITIONS_OEM] + response_time = stats_data[s].get(operation_name) + contract_def_list.append(float(contract_def)) + response_time_list.append(float(response_time)) + + contract_def_array = np.array(contract_def_list) + response_time_array = np.array(response_time_list) + + x = contract_def_array.reshape(-1, 1) + y = response_time_array + + model = LinearRegression() + model.fit(x, y) + + html_content = f"

Analyzing Resp Time(OEM)\n

\n" + html_content += f"

Intercept: {model.intercept_}

\n" + html_content += f"

Slope (Beta param): {model.coef_[0]}

\n" + + x_prediction = np.linspace(min(contract_def_array), + max(contract_def_array), + 100).reshape(-1, 1) + y_prediction = model.predict(x_prediction) + + scatter_trace = go.Scatter( + x=contract_def_array, + y=response_time_array, + mode='markers', + marker=dict(color='blue'), + name='Data Points' + ) + + regression_line_trace = go.Scatter( + x=x_prediction.flatten(), + y=y_prediction, + mode='lines', + line=dict(color='red'), + name='Regression Line' + ) + + layout = go.Layout( + title='Linear Regression', + xaxis=dict(title='Amount of Contract Definition'), + yaxis=dict(title='Median Response Time(ms)') + ) + + fig = go.Figure(data=[scatter_trace, regression_line_trace], layout=layout) + + with open(output_file, 'a') as f: + f.write(html_content) + f.write(fig.to_html(full_html=False, include_plotlyjs='cdn')) + + +def process_folders(root_folder, output_file, operation_name, metric_name): + """ + Process folders inside the root folder to get metadata and statistics files. + """ + scenarios = [] + stats_data = {} + metadata = {} + if not metric_name: + metric_name = "medianResTime" + + for ex_folder in os.listdir(root_folder): + ex_path = os.path.join(root_folder, ex_folder) + if os.path.isdir(ex_path): + metadata_file = os.path.join(ex_path, 'metadata.txt') + dashboard_folder = os.path.join(ex_path, 'dashboard') + stats_file = os.path.join(dashboard_folder, 'statistics.json') + if os.path.exists(metadata_file) and os.path.exists(stats_file): + scenario = ex_folder.split('.')[0] if '.' in ex_folder else ex_folder + scenarios.append(scenario) + metadata[scenario] = load_metadata(metadata_file) + stats_data[scenario] = load_stats(stats_file, metric_name) + + sorted_scenarios = sort_processes(scenarios, metadata) + plot_process_data(sorted_scenarios, stats_data, output_file, metric_name) + if operation_name: + analyze_response_time(output_file, metadata, stats_data, scenarios, operation_name) + + +def main(root_folder, output_file, operation_name): + process_folders(root_folder, output_file, operation_name, metric_name) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='Test Result Aggregation Script') + parser.add_argument('arguments', + nargs=2, + metavar=('directory', 'html_file'), + help='Directory and HTML file arguments.') + parser.add_argument('--regression', + type=str, + help='operation name for regression analysis') + + parser.add_argument('--metric', + type=str, + help='metric name') + + try: + args = parser.parse_args() + except TypeError as e: + print("Error: Test directory or output file name is missing") + print(USAGE_MESSAGE) + sys.exit(1) + + directory, html_file = args.arguments + operation_name = args.regression + metric_name = args.metric + main(directory, html_file, operation_name) \ No newline at end of file diff --git a/mxd/performance-tests/mxd-performance-evaluation/run_experiment.sh b/mxd/performance-tests/mxd-performance-evaluation/run_experiment.sh new file mode 100755 index 00000000..cf8577cd --- /dev/null +++ b/mxd/performance-tests/mxd-performance-evaluation/run_experiment.sh @@ -0,0 +1,46 @@ +#!/bin/bash +experiment_property="mount/custom_experiment.properties" + +if [ -z "$JMETER_HOME" ]; then + echo "JMETER_HOME is not defined - please define it." + exit 1 +fi +echo "Jmeter found at path $JMETER_HOME" + +jmeter_binary="$JMETER_HOME/bin/jmeter" + +rm -rf output +mkdir -p output/dashboard + +rm -rf output_slim +mkdir -p output_slim/dashboard + +echo "*** Property: $experiment_property Start ***" +cat $experiment_property +echo "*** Property: $experiment_property End ***" + +echo "*** Performance Test Start ***" +if [ -z "$jmeter_script" ]; then + echo "Executing all scripts in order" + echo "Executing setup.jmx" + $jmeter_binary -n -t mount/setup.jmx -l output/setup.jtl -q $experiment_property -j "output/jmeter.log" + echo "Executing measurement_interval.jmx" + $jmeter_binary -n -t mount/measurement_interval.jmx -l output/measurement_interval.jtl -q $experiment_property \ + -j "output/jmeter.log" -e -o output/dashboard +fi +echo "*** Performance Test End ***" + +echo "Copying custom_experiment.properties to output folder with new name metadata.txt" +cp $experiment_property output/metadata.txt +echo "Creating tar file with output" +tar -cf output.tar output + +echo "Copying custom_experiment.properties to output_slim folder with new name metadata.txt" +cp $experiment_property output_slim/metadata.txt +echo "Copying output/dashboard/statistics.json to output_slim/dashboard/statistics.json folder" +cp output/dashboard/statistics.json output_slim/dashboard/statistics.json +echo "Creating tar file with output" +tar -cf output_slim.tar output_slim + +echo "*** Test Completed..., Sleeping now ***" +while true; do sleep 10000; done diff --git a/mxd/performance-tests/mxd-performance-evaluation/setup.jmx b/mxd/performance-tests/mxd-performance-evaluation/setup.jmx new file mode 100755 index 00000000..7a1cf6aa --- /dev/null +++ b/mxd/performance-tests/mxd-performance-evaluation/setup.jmx @@ -0,0 +1,1076 @@ + + + + + + + + OEM_ID + = + ${__P(OEM_ID, BPNL000000000001)} + + + OEM_MANAGEMENT_URL + ${__P(OEM_MANAGEMENT_URL, http://localhost/alice/management)} + = + + + OEM_PROTOCOL_URL + = + ${__P(OEM_PROTOCOL_URL, http://alice-controlplane:8084/api/v1/dsp)} + + + OEM_API_KEY + ${__P(OEM_API_KEY, password)} + = + + + OEM_CARS_INITIAL + ${__P(OEM_CARS_INITIAL, 1000)} + = + + + SUPPLIER_ID + ${__P(SUPPLIER_ID, BPNL000000000002)} + = + + + SUPPLIER_MANAGEMENT_URL + ${__P(SUPPLIER_MANAGEMENT_URL, http://localhost/bob/management)} + = + + + SUPPLIER_PROTOCOL_URL + = + ${__P(SUPPLIER_PROTOCOL_URL, http://bob-controlplane:8084/api/v1/dsp)} + + + SUPPLIER_API_KEY + ${__P(SUPPLIER_API_KEY, password)} + = + + + SUPPLIER_PARTS_INITIAL + ${__P(SUPPLIER_PARTS_INITIAL, 1000)} + = + + + EDC_NAMESPACE + ${__P(EDC_NAMESPACE, https://w3id.org/edc/v0.0.1/ns/)} + = + + + ADDITIONAL_CONTRACT_DEFINITIONS_SUPPLIER + ${__P(ADDITIONAL_CONTRACT_DEFINITIONS_SUPPLIER, 0)} + = + + + ADDITIONAL_CONTRACT_DEFINITIONS_OEM + ${__P(ADDITIONAL_CONTRACT_DEFINITIONS_OEM, 0)} + = + + + + + + + Defining a test for the processes "Create Asset", "Create Policy" and "Create Contract Definition" of the supplier + 1 + false + startnextloop + + 1 + false + + + + + 500 + + + + ${SUPPLIER_PARTS_INITIAL} + + + + 1 + + 1 + ID + + false + + + + 6 + ${SUPPLIER_MANAGEMENT_URL}/v3/assets + true + POST + true + true + + + + false + { + "@context": {}, + "@id": "${ID}", + "properties": { + "description": "Product EDC Demo Asset" + }, + "dataAddress": { + "@type": "DataAddress", + "type": "HttpData", + "baseUrl": "https://jsonplaceholder.typicode.com/todos" + } +} + = + + + + + + + + + X-Api-Key + ${SUPPLIER_API_KEY} + + + Content-Type + application/json + + + + + + + 200 + 409 + + + Assertion.response_code + true + 40 + + + + + + 6 + ${SUPPLIER_MANAGEMENT_URL}/v2/policydefinitions + true + POST + true + true + + + + false + { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@type": "PolicyDefinitionRequestDto", + "@id": "bpnpolicy", + "policy": { + "@type": "odrl:Set", + "odrl:permission" : [{ + "odrl:action" : "USE", + "odrl:constraint" : { + "@type": "LogicalConstraint", + "odrl:or" : [{ + "@type" : "Constraint", + "odrl:leftOperand" : "BusinessPartnerNumber", + "odrl:operator" : { + "@id": "odrl:eq" + }, + "odrl:rightOperand" : "${OEM_ID}" + }] + } + }] + } +} + = + + + + + + + + + X-Api-Key + ${SUPPLIER_API_KEY} + + + Content-Type + application/json + + + + + + + 200 + 409 + + + Assertion.response_code + true + 40 + + + + + 6 + ${SUPPLIER_MANAGEMENT_URL}/v2/contractdefinitions + true + POST + true + true + + + + false + { + "@context": {}, + "@id": "allassetscontractdef", + "@type": "ContractDefinition", + "accessPolicyId": "bpnpolicy", + "contractPolicyId": "bpnpolicy", + "assetsSelector" : { + "@type" : "CriterionDto", + "operandLeft": "${EDC_NAMESPACE}description", + "operator": "=", + "operandRight": "Product EDC Demo Asset" + } +} + = + + + + + + + + + X-Api-Key + ${SUPPLIER_API_KEY} + + + Content-Type + application/json + + + + + + + 200 + 409 + + + Assertion.response_code + true + 40 + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + + ${ADDITIONAL_CONTRACT_DEFINITIONS_SUPPLIER} + + + + 1 + + 1 + ID + + false + + + + 6 + ${SUPPLIER_MANAGEMENT_URL}/v2/contractdefinitions + true + POST + true + true + + + + false + { + "@context": {}, + "@id": "${ID}", + "@type": "ContractDefinition", + "accessPolicyId": "bpnpolicy", + "contractPolicyId": "bpnpolicy", + "assetsSelector" : { + "@type" : "CriterionDto", + "operandLeft": "${EDC_NAMESPACE}description", + "operator": "=", + "operandRight": "Asset which does not exist" + } +} + = + + + + + + + + + X-Api-Key + ${SUPPLIER_API_KEY} + + + Content-Type + application/json + + + + + + + 200 + 409 + + + Assertion.response_code + true + 40 + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + SetUp Supplier + true + false + + + + + Defining a test for the processes "Create Asset", "Create Policy" and "Create Contract Definition" of the OEM + 1 + false + startnextloop + + 1 + false + + + + + 500 + + + + ${OEM_CARS_INITIAL} + + + + 1 + + 1 + ID + + false + + + + 6 + ${OEM_MANAGEMENT_URL}/v3/assets + true + POST + true + true + + + + false + { + "@context": {}, + "@id": "${ID}", + "properties": { + "description": "Product EDC Demo Asset" + }, + "dataAddress": { + "@type": "DataAddress", + "type": "HttpData", + "baseUrl": "https://jsonplaceholder.typicode.com/todos" + } +} + = + + + + + + + + + X-Api-Key + ${OEM_API_KEY} + + + Content-Type + application/json + + + + + + + 200 + 409 + + + Assertion.response_code + true + 40 + + + + + + 6 + ${OEM_MANAGEMENT_URL}/v2/policydefinitions + true + POST + true + true + + + + false + { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/" + }, + "@type": "PolicyDefinitionRequestDto", + "@id": "bpnpolicy", + "policy": { + "@type": "odrl:Set", + "odrl:permission" : [{ + "odrl:action" : "USE", + "odrl:constraint" : { + "@type": "LogicalConstraint", + "odrl:or" : [{ + "@type" : "Constraint", + "odrl:leftOperand" : "BusinessPartnerNumber", + "odrl:operator" : { + "@id": "odrl:eq" + }, + "odrl:rightOperand" : "${SUPPLIER_ID}" + }] + } + }] + } +} + = + + + + + + + + + X-Api-Key + ${OEM_API_KEY} + + + Content-Type + application/json + + + + + + + 200 + 409 + + + Assertion.response_code + true + 40 + + + + + 6 + ${OEM_MANAGEMENT_URL}/v2/contractdefinitions + true + POST + true + true + + + + false + { + "@context": {}, + "@id": "allassetcontractdef", + "@type": "ContractDefinition", + "accessPolicyId": "bpnpolicy", + "contractPolicyId": "bpnpolicy", + "assetsSelector" : { + "@type" : "CriterionDto", + "operandLeft": "${EDC_NAMESPACE}description", + "operator": "=", + "operandRight": "Product EDC Demo Asset" + } +} + = + + + + + + + + + X-Api-Key + ${OEM_API_KEY} + + + Content-Type + application/json + + + + + + + 200 + 409 + + + Assertion.response_code + true + 40 + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + + ${ADDITIONAL_CONTRACT_DEFINITIONS_OEM} + + + + 1 + + 1 + ID + + false + + + + 6 + ${SUPPLIER_MANAGEMENT_URL}/v2/contractdefinitions + true + POST + true + true + + + + false + { + "@context": {}, + "@id": "${ID}", + "@type": "ContractDefinition", + "accessPolicyId": "bpnpolicy", + "contractPolicyId": "bpnpolicy", + "assetsSelector" : { + "@type" : "CriterionDto", + "operandLeft": "${EDC_NAMESPACE}description", + "operator": "=", + "operandRight": "Asset which does not exist" + } +} + = + + + + + + + + + X-Api-Key + ${SUPPLIER_API_KEY} + + + Content-Type + application/json + + + + + + + 200 + 409 + + + Assertion.response_code + true + 40 + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + SetUp Supplier + true + false + + + + + + diff --git a/mxd/performance-tests/performance-test.yaml b/mxd/performance-tests/performance-test.yaml new file mode 100644 index 00000000..6e44bca4 --- /dev/null +++ b/mxd/performance-tests/performance-test.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Pod +metadata: + name: mxd-performance-test +spec: + containers: + - name: mxd-performance-test + image: justb4/jmeter:5.5 + command: [ "/bin/sh", "-c", "cd mxd-performance-evaluation && ./mount/run_experiment.sh" ] + volumeMounts: + - name: property-volume + mountPath: /opt/apache-jmeter-5.5/mxd-performance-evaluation/mount + + volumes: + - name: property-volume + configMap: + name: custom-property + defaultMode: 0500 + + restartPolicy: Never diff --git a/mxd/performance-tests/prometheus/clusterRole.yaml b/mxd/performance-tests/prometheus/clusterRole.yaml new file mode 100644 index 00000000..d666b69e --- /dev/null +++ b/mxd/performance-tests/prometheus/clusterRole.yaml @@ -0,0 +1,33 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: prometheus +rules: +- apiGroups: [""] + resources: + - nodes + - nodes/proxy + - services + - endpoints + - pods + verbs: ["get", "list", "watch"] +- apiGroups: + - extensions + resources: + - ingresses + verbs: ["get", "list", "watch"] +- nonResourceURLs: ["/metrics"] + verbs: ["get"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: prometheus +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: prometheus +subjects: +- kind: ServiceAccount + name: default + namespace: monitoring diff --git a/mxd/performance-tests/prometheus/config-map.yaml b/mxd/performance-tests/prometheus/config-map.yaml new file mode 100644 index 00000000..d7108f24 --- /dev/null +++ b/mxd/performance-tests/prometheus/config-map.yaml @@ -0,0 +1,137 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: prometheus-server-conf + labels: + name: prometheus-server-conf + namespace: monitoring +data: + prometheus.rules: |- + groups: + - name: devopscube demo alert + rules: + - alert: High Pod Memory + expr: sum(container_memory_usage_bytes) > 1 + for: 1m + labels: + severity: slack + annotations: + summary: High Memory Usage + prometheus.yml: |- + global: + scrape_interval: 5s + evaluation_interval: 5s + rule_files: + - /etc/prometheus/prometheus.rules + alerting: + alertmanagers: + - scheme: http + static_configs: + - targets: + - "alertmanager.monitoring.svc:9093" + scrape_configs: + - job_name: 'node-exporter' + kubernetes_sd_configs: + - role: endpoints + relabel_configs: + - source_labels: [__meta_kubernetes_endpoints_name] + regex: 'node-exporter' + action: keep + - job_name: 'kubernetes-apiservers' + kubernetes_sd_configs: + - role: endpoints + scheme: https + tls_config: + ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token + relabel_configs: + - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] + action: keep + regex: default;kubernetes;https + - job_name: 'kubernetes-nodes' + scheme: https + tls_config: + ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token + kubernetes_sd_configs: + - role: node + relabel_configs: + - action: labelmap + regex: __meta_kubernetes_node_label_(.+) + - target_label: __address__ + replacement: kubernetes.default.svc:443 + - source_labels: [__meta_kubernetes_node_name] + regex: (.+) + target_label: __metrics_path__ + replacement: /api/v1/nodes/${1}/proxy/metrics + - job_name: 'kubernetes-pods' + kubernetes_sd_configs: + - role: pod + relabel_configs: + - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] + action: keep + regex: true + - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] + action: replace + target_label: __metrics_path__ + regex: (.+) + - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] + action: replace + regex: ([^:]+)(?::\d+)?;(\d+) + replacement: $1:$2 + target_label: __address__ + - action: labelmap + regex: __meta_kubernetes_pod_label_(.+) + - source_labels: [__meta_kubernetes_namespace] + action: replace + target_label: kubernetes_namespace + - source_labels: [__meta_kubernetes_pod_name] + action: replace + target_label: kubernetes_pod_name + - job_name: 'kube-state-metrics' + static_configs: + - targets: ['kube-state-metrics.kube-system.svc.cluster.local:8080'] + - job_name: 'kubernetes-cadvisor' + scheme: https + tls_config: + ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token + kubernetes_sd_configs: + - role: node + relabel_configs: + - action: labelmap + regex: __meta_kubernetes_node_label_(.+) + - target_label: __address__ + replacement: kubernetes.default.svc:443 + - source_labels: [__meta_kubernetes_node_name] + regex: (.+) + target_label: __metrics_path__ + replacement: /api/v1/nodes/${1}/proxy/metrics/cadvisor + - job_name: 'kubernetes-service-endpoints' + kubernetes_sd_configs: + - role: endpoints + relabel_configs: + - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scrape] + action: keep + regex: true + - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme] + action: replace + target_label: __scheme__ + regex: (https?) + - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path] + action: replace + target_label: __metrics_path__ + regex: (.+) + - source_labels: [__address__, __meta_kubernetes_service_annotation_prometheus_io_port] + action: replace + target_label: __address__ + regex: ([^:]+)(?::\d+)?;(\d+) + replacement: $1:$2 + - action: labelmap + regex: __meta_kubernetes_service_label_(.+) + - source_labels: [__meta_kubernetes_namespace] + action: replace + target_label: kubernetes_namespace + - source_labels: [__meta_kubernetes_service_name] + action: replace + target_label: kubernetes_name \ No newline at end of file diff --git a/mxd/performance-tests/prometheus/prometheus-deployment.yaml b/mxd/performance-tests/prometheus/prometheus-deployment.yaml new file mode 100644 index 00000000..2ccb8520 --- /dev/null +++ b/mxd/performance-tests/prometheus/prometheus-deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: prometheus-deployment + namespace: monitoring + labels: + app: prometheus-server +spec: + replicas: 1 + selector: + matchLabels: + app: prometheus-server + template: + metadata: + labels: + app: prometheus-server + spec: + containers: + - name: prometheus + image: prom/prometheus + args: + - "--config.file=/etc/prometheus/prometheus.yml" + - "--storage.tsdb.path=/prometheus/" + ports: + - containerPort: 9090 + volumeMounts: + - name: prometheus-config-volume + mountPath: /etc/prometheus/ + - name: prometheus-storage-volume + mountPath: /prometheus/ + volumes: + - name: prometheus-config-volume + configMap: + defaultMode: 420 + name: prometheus-server-conf + + - name: prometheus-storage-volume + emptyDir: {} diff --git a/mxd/performance-tests/prometheus/prometheus-ingress.yaml b/mxd/performance-tests/prometheus/prometheus-ingress.yaml new file mode 100644 index 00000000..cf34c410 --- /dev/null +++ b/mxd/performance-tests/prometheus/prometheus-ingress.yaml @@ -0,0 +1,37 @@ +## Nginx Ingress +## Follow https://devopscube.com/setup-ingress-kubernetes-nginx-controller/ + +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: prometheus-ui + namespace: monitoring + annotations: + kubernetes.io/ingress.class: nginx +spec: + rules: + # Use the host you used in your kubernetes Ingress Configurations + - host: 'prometheus.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com' + http: + paths: + - backend: + service: + name: prometheus-service + port: + number: 8080 + path: / + pathType: Prefix + tls: + - hosts: + - prometheus.apps.shaker242.lab + secretName: prometheus-secret +--- +apiVersion: v1 +kind: Secret +metadata: + name: prometheus-secret + namespace: monitoring +data: +# USe base64 in the certs + tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZpVENDQkhHZ0F3SUJBZ0lCQVRBTkJna3Foa2lHOXcwQkFRc0ZBRENCd0RFak1DRUdBMVVFQXhNYWFXNTAKWlhKdFpXUnBZWFJsTG5Ob1lXdGxjakkwTWk1c1lXSXhDekFKQmdOVkJBWVRBbFZUTVJFd0R3WURWUVFJRXdoVwphWEpuYVc1cFlURVFNQTRHQTFVRUJ4TUhRbkpwYzNSdmR6RXNNQ29HQTFVRUNoTWpVMGhCUzBWU01qUXlJRXhoCllpQkRaWEowYVdacFkyRjBaU0JCZFhSb2IzSnBkSGt4T1RBM0JnTlZCQXNUTUZOSVFVdEZVakkwTWlCTVlXSWcKU1c1MFpYSnRaV1JwWVhSbElFTmxjblJwWm1sallYUmxJRUYxZEdodmNtbDBlVEFlRncweE9URXdNVGN4TmpFMgpNekZhRncweU1URXdNVFl4TmpFMk16RmFNSUdBTVIwd0d3WURWUVFERkJRcUxtRndjSE11YzJoaGEyVnlNalF5CkxteGhZakVMTUFrR0ExVUVCaE1DVlZNeEVUQVBCZ05WQkFnVENGWnBjbWRwYm1saE1SQXdEZ1lEVlFRSEV3ZEMKY21semRHOTNNUll3RkFZRFZRUUtFdzFUU0VGTFJWSXlORElnVEdGaU1SVXdFd1lEVlFRTEV3eE1ZV0lnVjJWaQpjMmwwWlhNd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUJEd0F3Z2dFS0FvSUJBUURsRm16QVd0U09JcXZNCkpCV3Vuc0VIUmxraXozUmpSK0p1NTV0K0hCUG95YnZwVkJJeXMxZ3prby9INlkxa2Zxa1JCUzZZYVFHM2lYRFcKaDgzNlNWc3pNVUNVS3BtNXlZQXJRNzB4YlpPTXRJcjc1VEcrejFaRGJaeFUzbnh6RXdHdDN3U3c5OVJ0bjhWbgo5dEpTVXI0MHBHUytNemMzcnZOUFZRMjJoYTlhQTdGL2NVcGxtZUpkUnZEVnJ3Q012UklEcndXVEZjZkU3bUtxCjFSUkRxVDhETnlydlJmeUlubytmSkUxTmRuVEVMY0dTYVZlajhZVVFONHY0WFRnLzJncmxIN1pFT1VXNy9oYm8KUXh6NVllejVSam1wOWVPVUpvdVdmWk5FNEJBbGRZeVYxd2NPRXhRTmswck5BOU45ZXBjNWtUVVZQR3pOTWRucgovVXQxOWMweEFnTUJBQUdqZ2dIS01JSUJ4akFKQmdOVkhSTUVBakFBTUJFR0NXQ0dTQUdHK0VJQkFRUUVBd0lHClFEQUxCZ05WSFE4RUJBTUNCYUF3TXdZSllJWklBWWI0UWdFTkJDWVdKRTl3Wlc1VFUwd2dSMlZ1WlhKaGRHVmsKSUZObGNuWmxjaUJEWlhKMGFXWnBZMkYwWlRBZEJnTlZIUTRFRmdRVWRhYy94MTR6dXl3RVZPSi9vTjdQeU82bApDZ2N3Z2RzR0ExVWRJd1NCMHpDQjBJQVVzZFM1WWxuWEpWTk5mRVpkTEQvL2RyNE5mV3FoZ2JTa2diRXdnYTR4CkdUQVhCZ05WQkFNVEVHTmhMbk5vWVd0bGNqSTBNaTVzWVdJeEN6QUpCZ05WQkFZVEFsVlRNUkV3RHdZRFZRUUkKRXdoV2FYSm5hVzVwWVRFUU1BNEdBMVVFQnhNSFFuSnBjM1J2ZHpFc01Db0dBMVVFQ2hNalUwaEJTMFZTTWpReQpJRXhoWWlCRFpYSjBhV1pwWTJGMFpTQkJkWFJvYjNKcGRIa3hNVEF2QmdOVkJBc1RLRk5JUVV0RlVqSTBNaUJNCllXSWdVbTl2ZENCRFpYSjBhV1pwWTJGMFpTQkJkWFJvYjNKcGRIbUNBUUV3SFFZRFZSMGxCQll3RkFZSUt3WUIKQlFVSEF3RUdDQ3NHQVFVRkNBSUNNRWdHQTFVZEVRUkJNRCtDRFhOb1lXdGxjakkwTWk1c1lXS0NFbUZ3Y0hNdQpjMmhoYTJWeU1qUXlMbXhoWW9JVUtpNWhjSEJ6TG5Ob1lXdGxjakkwTWk1c1lXS0hCTUNvQ3hBd0RRWUpLb1pJCmh2Y05BUUVMQlFBRGdnRUJBRzA3ZHFNdFZYdVQrckduQlN4SkVTNjNSa2pHaWd0c3ZtNTk4NSsrbjZjRW5kSDIKb2hjaGdmRUo5V0UxYUFWSDR4QlJSdVRIUFVJOFcvd3N1OFBxQ1o4NHpRQ2U2elAyeThEcmEwbjFzK2lIeHFwRAorS3BwZS91NkNLVTFEL0VWRU9MakpZd3pRYlFLSUlPL2Y1Q0JVbUpGWjBuZ1VIUEtvUDNyTXordTlBOWFvRkVrCnF3dDBadHFHcWpjMkh3Q09UOTlOVmFsZ29ISXljOElxQXJXdjNSWklraUlyaW9kSUdDMS94MVQ2dHhKcEUyRisKQzZ0Tzk0U0FVSUJwc2VORjNFbGNLNUsyTW44YVAzR3NnNFRHeElPN2Q1eUIvb3YwNGhOV2Q1S2QwWGorL1BvQgpLOU43cFQ1SVU2citLekNoeGlSdmRvZlAzV0VYN1ZkNEtLWG94K0U9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K + tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUV2d0lCQURBTkJna3Foa2lHOXcwQkFRRUZBQVNDQktrd2dnU2xBZ0VBQW9JQkFRRGxGbXpBV3RTT0lxdk0KSkJXdW5zRUhSbGtpejNSalIrSnU1NXQrSEJQb3lidnBWQkl5czFnemtvL0g2WTFrZnFrUkJTNllhUUczaVhEVwpoODM2U1Zzek1VQ1VLcG01eVlBclE3MHhiWk9NdElyNzVURyt6MVpEYlp4VTNueHpFd0d0M3dTdzk5UnRuOFZuCjl0SlNVcjQwcEdTK016YzNydk5QVlEyMmhhOWFBN0YvY1VwbG1lSmRSdkRWcndDTXZSSURyd1dURmNmRTdtS3EKMVJSRHFUOEROeXJ2UmZ5SW5vK2ZKRTFOZG5URUxjR1NhVmVqOFlVUU40djRYVGcvMmdybEg3WkVPVVc3L2hibwpReHo1WWV6NVJqbXA5ZU9VSm91V2ZaTkU0QkFsZFl5VjF3Y09FeFFOazByTkE5TjllcGM1a1RVVlBHek5NZG5yCi9VdDE5YzB4QWdNQkFBRUNnZ0VCQU5zOHRjRDBiQnpHZzRFdk8yek0wMUJoKzZYN3daZk4wSjV3bW5kNjZYYkwKc1VEZ1N6WW9PbzNJZ2o5QWZTY2lyQ3YwdUozMVNFWmNpeGRVQ2tTdjlVNnRvTzdyUWdqeUZPM1N1dm5Wc3ZKaQpTZXc5Y0hqNk5jVDczak8rWkgxQVFFZ2tlWG5mQTNZU0JEcTFsSnhpUVZOaHpHUFY0Yzh4Wi9xUkhEbUVBTWR6CmwyaTB6dHJtcWRqSng4aTQxOXpGL1pVektoa2JtcVZVb3JjZ1lNdEt5QVloSENMYms2RFZtQ1FhbDlndEUrNjUKTmFTOEwxUW9yVWNVS0FoSTNKT2Q2TTRwbWRPaExITjZpZ0VwWFdVWGxBZjRITUZicHd5M1oxejNqZzVqTE9ragp6SWNDSVRaai9CYVZvSVc4QzJUb0pieUJKWkN6UDVjUVJTdkJOOGV4aUFFQ2dZRUEvV0Nxb2xVUWtOQkQrSnlPCklXOUJIRVlPS3oxRFZxNWxHRFhoNFMyTStpOU1pck5nUlcvL0NFRGhRUVVMZmtBTDgxMERPQmxsMXRRRUpGK3cKb1V6dWt6U1lkK1hTSnhicTM5YTF1ZGJldTNZU1ljeC8wTEEweGFQOW1sN1l1NXUraUZ4NGhwcnYyL2UrVklZQQpzTWV4WkZSODA3Q3M5YXN5MkdFT1l2aEdKb0VDZ1lFQTUzVm1weFlQbDFOYTVTMElJbEpuYm40dTl0RHpwYm5TCnpsMjBVQ3Q0d0N4STR6YjY1S1o4V1VaYlFzVTVaZ0VqTmxJWURXUisrd3kwVXh2SmNxUG5nS0xuOEdoSzhvOVEKeVJuR2dSYXAxWmNuUEdsbGdCeHQzM0s5TDNWMmJzMXBPcGJKMGlpOVdySWM4MU1wUVFpQjZ1RDRSZ216M0ZWSQpnUk5Ec2ZHS0xyRUNnWUVBbWY5ZXRqc3RUbGJHZVJ2dDVyUlB4bmR0dFNvTysyZ1RXWnVtSmM0aG1RMldYOWFWCjlKNFZTMWJqa1RrWHV5d0NGMis0dlNmeWxaZFd6U1M3bmMyOFV3dnNmekxYZjVxV05tV3hIYnBTdFcwVnp3c1QKeENyVWFDczd2ODlWdXZEMTVMc1BKZ0NWT0FSalVjd0FMM0d2aDJNeVd4ZE9pQ0g5VFRYd0lJYjFYQUVDZ1lBMwp4ZUptZ0xwaERJVHFsRjlSWmVubWhpRnErQTY5OEhrTG9TakI2TGZBRnV1NVZKWkFZcDIwSlcvNE51NE4xbGhWCnpwSmRKOG94Vkc1ZldHTENiUnhyc3RXUTZKQ213a0lGTTJEUjJsUXlVNm53dExUd21la2YzdFlYaVlad1RLNysKbnpjaW5RNkR2RWVkbW54bVgxWnU4cWJndVpYTmtmOVdtdjNFOHg4SkFRS0JnUUNNeDFWNHJIcUpwVXJMdkRVVQo4RzhXVGNrT2VFM2o2anhlcHMwcnExdEd1cE9XWW5saFlNYyt5VkMzMDZUc2dXUmJ5R1Y4YWNaRkF4WS9Ub2N5CmxpcXlUS1NGNUloYXhZQVpRTzVkOU1oTmN0bTRReDNaOUtTekZ5ZG01QlZVL0grMFFmUnRwM29TeFVneXRZNXkKV3ZDTFZ5bmNGZlZpL0VkaTdaZHM2aW82QVE9PQotLS0tLUVORCBQUklWQVRFIEtFWS0tLS0tCg== diff --git a/mxd/performance-tests/prometheus/prometheus-service.yaml b/mxd/performance-tests/prometheus/prometheus-service.yaml new file mode 100644 index 00000000..420a586c --- /dev/null +++ b/mxd/performance-tests/prometheus/prometheus-service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: prometheus-service + namespace: monitoring + annotations: + prometheus.io/scrape: 'true' + prometheus.io/port: '9090' + +spec: + selector: + app: prometheus-server + type: NodePort + ports: + - port: 8080 + targetPort: 9090 + nodePort: 30000 diff --git a/mxd/performance-tests/test-configurations/large_experiment.properties b/mxd/performance-tests/test-configurations/large_experiment.properties new file mode 100644 index 00000000..522c6c41 --- /dev/null +++ b/mxd/performance-tests/test-configurations/large_experiment.properties @@ -0,0 +1,38 @@ +# General Parameters + +EXPERIMENT_DURATION_SEC=1800 +EDC_NAMESPACE=https://w3id.org/edc/v0.0.1/ns/ +BACKEND_SERVICE=https://requestbin.myworkato.com/z8zu6nz9 +MAX_NEGOTIATION_POLL_COUNT=100 +MAX_TRANSFER_POLL_COUNT=100 +INTERVALS_PER_MINUTE=10 + +# OEM Parameters + +OEM_ID=BPNL000000000001 +OEM_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/alice/management +OEM_PROTOCOL_URL=http://alice-controlplane:8084/api/v1/dsp +OEM_API_KEY=password + +OEM_PLANTS=10 +OEM_CARS_INITIAL=1000000 +PARTS_PER_CAR=100 +CARS_PRODUCED_PER_INTERVALL=1 + +# Supplier Parameters + +SUPPLIER_ID=BPNL000000000002 +SUPPLIER_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/bob/management +SUPPLIER_PROTOCOL_URL=http://bob-controlplane:8084/api/v1/dsp +SUPPLIER_API_KEY=password + +SUPPLIER_PLANTS=10 +SUPPLIER_PARTS_INITIAL=1000000 +PARTS_PRODUCED_PER_INTERVALL=50 +SUPPLIER_FLEET_MANAGERS=1 +SUPPLIER_PARTS_PLANTS_COUNT=SUPPLIER_PARTS_PLANTS_COUNT +SUPPLIER_FLEET_COUNT=SUPPLIER_FLEET_COUNT +CARS_REQUESTED_PER_INTERVALL=1 + +ADDITIONAL_CONTRACT_DEFINITIONS_SUPPLIER=0 +ADDITIONAL_CONTRACT_DEFINITIONS_OEM=0 diff --git a/mxd/performance-tests/test-configurations/medium_experiment.properties b/mxd/performance-tests/test-configurations/medium_experiment.properties new file mode 100644 index 00000000..9123423c --- /dev/null +++ b/mxd/performance-tests/test-configurations/medium_experiment.properties @@ -0,0 +1,38 @@ +# General Parameters + +EXPERIMENT_DURATION_SEC=1800 +EDC_NAMESPACE=https://w3id.org/edc/v0.0.1/ns/ +BACKEND_SERVICE=https://requestbin.myworkato.com/z8zu6nz9 +MAX_NEGOTIATION_POLL_COUNT=100 +MAX_TRANSFER_POLL_COUNT=100 +INTERVALS_PER_MINUTE=10 + +# OEM Parameters + +OEM_ID=BPNL000000000001 +OEM_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/alice/management +OEM_PROTOCOL_URL=http://alice-controlplane:8084/api/v1/dsp +OEM_API_KEY=password + +OEM_PLANTS=5 +OEM_CARS_INITIAL=10000 +PARTS_PER_CAR=100 +CARS_PRODUCED_PER_INTERVALL=1 + +# Supplier Parameters + +SUPPLIER_ID=BPNL000000000002 +SUPPLIER_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/bob/management +SUPPLIER_PROTOCOL_URL=http://bob-controlplane:8084/api/v1/dsp +SUPPLIER_API_KEY=password + +SUPPLIER_PLANTS=5 +SUPPLIER_PARTS_INITIAL=10000 +PARTS_PRODUCED_PER_INTERVALL=50 +SUPPLIER_FLEET_MANAGERS=1 +SUPPLIER_PARTS_PLANTS_COUNT=SUPPLIER_PARTS_PLANTS_COUNT +SUPPLIER_FLEET_COUNT=SUPPLIER_FLEET_COUNT +CARS_REQUESTED_PER_INTERVALL=1 + +ADDITIONAL_CONTRACT_DEFINITIONS_SUPPLIER=0 +ADDITIONAL_CONTRACT_DEFINITIONS_OEM=0 diff --git a/mxd/performance-tests/test-configurations/medium_experiment_10000_contracts.properties b/mxd/performance-tests/test-configurations/medium_experiment_10000_contracts.properties new file mode 100644 index 00000000..e4e9c4d2 --- /dev/null +++ b/mxd/performance-tests/test-configurations/medium_experiment_10000_contracts.properties @@ -0,0 +1,38 @@ +# General Parameters + +EXPERIMENT_DURATION_SEC=1800 +EDC_NAMESPACE=https://w3id.org/edc/v0.0.1/ns/ +BACKEND_SERVICE=https://requestbin.myworkato.com/z8zu6nz9 +MAX_NEGOTIATION_POLL_COUNT=100 +MAX_TRANSFER_POLL_COUNT=100 +INTERVALS_PER_MINUTE=10 + +# OEM Parameters + +OEM_ID=BPNL000000000001 +OEM_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/alice/management +OEM_PROTOCOL_URL=http://alice-controlplane:8084/api/v1/dsp +OEM_API_KEY=password + +OEM_PLANTS=5 +OEM_CARS_INITIAL=10000 +PARTS_PER_CAR=100 +CARS_PRODUCED_PER_INTERVALL=1 + +# Supplier Parameters + +SUPPLIER_ID=BPNL000000000002 +SUPPLIER_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/bob/management +SUPPLIER_PROTOCOL_URL=http://bob-controlplane:8084/api/v1/dsp +SUPPLIER_API_KEY=password + +SUPPLIER_PLANTS=5 +SUPPLIER_PARTS_INITIAL=10000 +PARTS_PRODUCED_PER_INTERVALL=50 +SUPPLIER_FLEET_MANAGERS=1 +SUPPLIER_PARTS_PLANTS_COUNT=SUPPLIER_PARTS_PLANTS_COUNT +SUPPLIER_FLEET_COUNT=SUPPLIER_FLEET_COUNT +CARS_REQUESTED_PER_INTERVALL=1 + +ADDITIONAL_CONTRACT_DEFINITIONS_SUPPLIER=10000 +ADDITIONAL_CONTRACT_DEFINITIONS_OEM=10000 diff --git a/mxd/performance-tests/test-configurations/medium_experiment_1000_contracts.properties b/mxd/performance-tests/test-configurations/medium_experiment_1000_contracts.properties new file mode 100644 index 00000000..cfb6d5d1 --- /dev/null +++ b/mxd/performance-tests/test-configurations/medium_experiment_1000_contracts.properties @@ -0,0 +1,38 @@ +# General Parameters + +EXPERIMENT_DURATION_SEC=1800 +EDC_NAMESPACE=https://w3id.org/edc/v0.0.1/ns/ +BACKEND_SERVICE=https://requestbin.myworkato.com/z8zu6nz9 +MAX_NEGOTIATION_POLL_COUNT=100 +MAX_TRANSFER_POLL_COUNT=100 +INTERVALS_PER_MINUTE=10 + +# OEM Parameters + +OEM_ID=BPNL000000000001 +OEM_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/alice/management +OEM_PROTOCOL_URL=http://alice-controlplane:8084/api/v1/dsp +OEM_API_KEY=password + +OEM_PLANTS=5 +OEM_CARS_INITIAL=10000 +PARTS_PER_CAR=100 +CARS_PRODUCED_PER_INTERVALL=1 + +# Supplier Parameters + +SUPPLIER_ID=BPNL000000000002 +SUPPLIER_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/bob/management +SUPPLIER_PROTOCOL_URL=http://bob-controlplane:8084/api/v1/dsp +SUPPLIER_API_KEY=password + +SUPPLIER_PLANTS=5 +SUPPLIER_PARTS_INITIAL=10000 +PARTS_PRODUCED_PER_INTERVALL=50 +SUPPLIER_FLEET_MANAGERS=1 +SUPPLIER_PARTS_PLANTS_COUNT=SUPPLIER_PARTS_PLANTS_COUNT +SUPPLIER_FLEET_COUNT=SUPPLIER_FLEET_COUNT +CARS_REQUESTED_PER_INTERVALL=1 + +ADDITIONAL_CONTRACT_DEFINITIONS_SUPPLIER=1000 +ADDITIONAL_CONTRACT_DEFINITIONS_OEM=1000 diff --git a/mxd/performance-tests/test-configurations/medium_experiment_100_contracts.properties b/mxd/performance-tests/test-configurations/medium_experiment_100_contracts.properties new file mode 100644 index 00000000..24300fbb --- /dev/null +++ b/mxd/performance-tests/test-configurations/medium_experiment_100_contracts.properties @@ -0,0 +1,38 @@ +# General Parameters + +EXPERIMENT_DURATION_SEC=1800 +EDC_NAMESPACE=https://w3id.org/edc/v0.0.1/ns/ +BACKEND_SERVICE=https://requestbin.myworkato.com/z8zu6nz9 +MAX_NEGOTIATION_POLL_COUNT=100 +MAX_TRANSFER_POLL_COUNT=100 +INTERVALS_PER_MINUTE=10 + +# OEM Parameters + +OEM_ID=BPNL000000000001 +OEM_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/alice/management +OEM_PROTOCOL_URL=http://alice-controlplane:8084/api/v1/dsp +OEM_API_KEY=password + +OEM_PLANTS=5 +OEM_CARS_INITIAL=10000 +PARTS_PER_CAR=100 +CARS_PRODUCED_PER_INTERVALL=1 + +# Supplier Parameters + +SUPPLIER_ID=BPNL000000000002 +SUPPLIER_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/bob/management +SUPPLIER_PROTOCOL_URL=http://bob-controlplane:8084/api/v1/dsp +SUPPLIER_API_KEY=password + +SUPPLIER_PLANTS=5 +SUPPLIER_PARTS_INITIAL=10000 +PARTS_PRODUCED_PER_INTERVALL=50 +SUPPLIER_FLEET_MANAGERS=1 +SUPPLIER_PARTS_PLANTS_COUNT=SUPPLIER_PARTS_PLANTS_COUNT +SUPPLIER_FLEET_COUNT=SUPPLIER_FLEET_COUNT +CARS_REQUESTED_PER_INTERVALL=1 + +ADDITIONAL_CONTRACT_DEFINITIONS_SUPPLIER=100 +ADDITIONAL_CONTRACT_DEFINITIONS_OEM=100 diff --git a/mxd/performance-tests/test-configurations/medium_experiment_10_contracts.properties b/mxd/performance-tests/test-configurations/medium_experiment_10_contracts.properties new file mode 100644 index 00000000..5ccdcb8d --- /dev/null +++ b/mxd/performance-tests/test-configurations/medium_experiment_10_contracts.properties @@ -0,0 +1,38 @@ +# General Parameters + +EXPERIMENT_DURATION_SEC=1800 +EDC_NAMESPACE=https://w3id.org/edc/v0.0.1/ns/ +BACKEND_SERVICE=https://requestbin.myworkato.com/z8zu6nz9 +MAX_NEGOTIATION_POLL_COUNT=100 +MAX_TRANSFER_POLL_COUNT=100 +INTERVALS_PER_MINUTE=10 + +# OEM Parameters + +OEM_ID=BPNL000000000001 +OEM_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/alice/management +OEM_PROTOCOL_URL=http://alice-controlplane:8084/api/v1/dsp +OEM_API_KEY=password + +OEM_PLANTS=5 +OEM_CARS_INITIAL=10000 +PARTS_PER_CAR=100 +CARS_PRODUCED_PER_INTERVALL=1 + +# Supplier Parameters + +SUPPLIER_ID=BPNL000000000002 +SUPPLIER_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/bob/management +SUPPLIER_PROTOCOL_URL=http://bob-controlplane:8084/api/v1/dsp +SUPPLIER_API_KEY=password + +SUPPLIER_PLANTS=5 +SUPPLIER_PARTS_INITIAL=10000 +PARTS_PRODUCED_PER_INTERVALL=50 +SUPPLIER_FLEET_MANAGERS=1 +SUPPLIER_PARTS_PLANTS_COUNT=SUPPLIER_PARTS_PLANTS_COUNT +SUPPLIER_FLEET_COUNT=SUPPLIER_FLEET_COUNT +CARS_REQUESTED_PER_INTERVALL=1 + +ADDITIONAL_CONTRACT_DEFINITIONS_SUPPLIER=10 +ADDITIONAL_CONTRACT_DEFINITIONS_OEM=10 diff --git a/mxd/performance-tests/test-configurations/medium_experiment_3000_contracts.properties b/mxd/performance-tests/test-configurations/medium_experiment_3000_contracts.properties new file mode 100644 index 00000000..054aeb87 --- /dev/null +++ b/mxd/performance-tests/test-configurations/medium_experiment_3000_contracts.properties @@ -0,0 +1,38 @@ +# General Parameters + +EXPERIMENT_DURATION_SEC=1800 +EDC_NAMESPACE=https://w3id.org/edc/v0.0.1/ns/ +BACKEND_SERVICE=https://requestbin.myworkato.com/z8zu6nz9 +MAX_NEGOTIATION_POLL_COUNT=100 +MAX_TRANSFER_POLL_COUNT=100 +INTERVALS_PER_MINUTE=10 + +# OEM Parameters + +OEM_ID=BPNL000000000001 +OEM_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/alice/management +OEM_PROTOCOL_URL=http://alice-controlplane:8084/api/v1/dsp +OEM_API_KEY=password + +OEM_PLANTS=5 +OEM_CARS_INITIAL=10000 +PARTS_PER_CAR=100 +CARS_PRODUCED_PER_INTERVALL=1 + +# Supplier Parameters + +SUPPLIER_ID=BPNL000000000002 +SUPPLIER_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/bob/management +SUPPLIER_PROTOCOL_URL=http://bob-controlplane:8084/api/v1/dsp +SUPPLIER_API_KEY=password + +SUPPLIER_PLANTS=5 +SUPPLIER_PARTS_INITIAL=10000 +PARTS_PRODUCED_PER_INTERVALL=50 +SUPPLIER_FLEET_MANAGERS=1 +SUPPLIER_PARTS_PLANTS_COUNT=SUPPLIER_PARTS_PLANTS_COUNT +SUPPLIER_FLEET_COUNT=SUPPLIER_FLEET_COUNT +CARS_REQUESTED_PER_INTERVALL=1 + +ADDITIONAL_CONTRACT_DEFINITIONS_SUPPLIER=3000 +ADDITIONAL_CONTRACT_DEFINITIONS_OEM=3000 diff --git a/mxd/performance-tests/test-configurations/medium_experiment_5000_contracts.properties b/mxd/performance-tests/test-configurations/medium_experiment_5000_contracts.properties new file mode 100644 index 00000000..fb01a2ec --- /dev/null +++ b/mxd/performance-tests/test-configurations/medium_experiment_5000_contracts.properties @@ -0,0 +1,38 @@ +# General Parameters + +EXPERIMENT_DURATION_SEC=1800 +EDC_NAMESPACE=https://w3id.org/edc/v0.0.1/ns/ +BACKEND_SERVICE=https://requestbin.myworkato.com/z8zu6nz9 +MAX_NEGOTIATION_POLL_COUNT=100 +MAX_TRANSFER_POLL_COUNT=100 +INTERVALS_PER_MINUTE=10 + +# OEM Parameters + +OEM_ID=BPNL000000000001 +OEM_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/alice/management +OEM_PROTOCOL_URL=http://alice-controlplane:8084/api/v1/dsp +OEM_API_KEY=password + +OEM_PLANTS=5 +OEM_CARS_INITIAL=10000 +PARTS_PER_CAR=100 +CARS_PRODUCED_PER_INTERVALL=1 + +# Supplier Parameters + +SUPPLIER_ID=BPNL000000000002 +SUPPLIER_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/bob/management +SUPPLIER_PROTOCOL_URL=http://bob-controlplane:8084/api/v1/dsp +SUPPLIER_API_KEY=password + +SUPPLIER_PLANTS=5 +SUPPLIER_PARTS_INITIAL=10000 +PARTS_PRODUCED_PER_INTERVALL=50 +SUPPLIER_FLEET_MANAGERS=1 +SUPPLIER_PARTS_PLANTS_COUNT=SUPPLIER_PARTS_PLANTS_COUNT +SUPPLIER_FLEET_COUNT=SUPPLIER_FLEET_COUNT +CARS_REQUESTED_PER_INTERVALL=1 + +ADDITIONAL_CONTRACT_DEFINITIONS_SUPPLIER=5000 +ADDITIONAL_CONTRACT_DEFINITIONS_OEM=5000 diff --git a/mxd/performance-tests/test-configurations/medium_experiment_7000_contracts.properties b/mxd/performance-tests/test-configurations/medium_experiment_7000_contracts.properties new file mode 100644 index 00000000..43fab5ad --- /dev/null +++ b/mxd/performance-tests/test-configurations/medium_experiment_7000_contracts.properties @@ -0,0 +1,38 @@ +# General Parameters + +EXPERIMENT_DURATION_SEC=1800 +EDC_NAMESPACE=https://w3id.org/edc/v0.0.1/ns/ +BACKEND_SERVICE=https://requestbin.myworkato.com/z8zu6nz9 +MAX_NEGOTIATION_POLL_COUNT=100 +MAX_TRANSFER_POLL_COUNT=100 +INTERVALS_PER_MINUTE=10 + +# OEM Parameters + +OEM_ID=BPNL000000000001 +OEM_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/alice/management +OEM_PROTOCOL_URL=http://alice-controlplane:8084/api/v1/dsp +OEM_API_KEY=password + +OEM_PLANTS=5 +OEM_CARS_INITIAL=10000 +PARTS_PER_CAR=100 +CARS_PRODUCED_PER_INTERVALL=1 + +# Supplier Parameters + +SUPPLIER_ID=BPNL000000000002 +SUPPLIER_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/bob/management +SUPPLIER_PROTOCOL_URL=http://bob-controlplane:8084/api/v1/dsp +SUPPLIER_API_KEY=password + +SUPPLIER_PLANTS=5 +SUPPLIER_PARTS_INITIAL=10000 +PARTS_PRODUCED_PER_INTERVALL=50 +SUPPLIER_FLEET_MANAGERS=1 +SUPPLIER_PARTS_PLANTS_COUNT=SUPPLIER_PARTS_PLANTS_COUNT +SUPPLIER_FLEET_COUNT=SUPPLIER_FLEET_COUNT +CARS_REQUESTED_PER_INTERVALL=1 + +ADDITIONAL_CONTRACT_DEFINITIONS_SUPPLIER=7000 +ADDITIONAL_CONTRACT_DEFINITIONS_OEM=7000 diff --git a/mxd/performance-tests/test-configurations/medium_experiment_9000_contracts.properties b/mxd/performance-tests/test-configurations/medium_experiment_9000_contracts.properties new file mode 100644 index 00000000..5ecd1c41 --- /dev/null +++ b/mxd/performance-tests/test-configurations/medium_experiment_9000_contracts.properties @@ -0,0 +1,38 @@ +# General Parameters + +EXPERIMENT_DURATION_SEC=1800 +EDC_NAMESPACE=https://w3id.org/edc/v0.0.1/ns/ +BACKEND_SERVICE=https://requestbin.myworkato.com/z8zu6nz9 +MAX_NEGOTIATION_POLL_COUNT=100 +MAX_TRANSFER_POLL_COUNT=100 +INTERVALS_PER_MINUTE=10 + +# OEM Parameters + +OEM_ID=BPNL000000000001 +OEM_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/alice/management +OEM_PROTOCOL_URL=http://alice-controlplane:8084/api/v1/dsp +OEM_API_KEY=password + +OEM_PLANTS=5 +OEM_CARS_INITIAL=10000 +PARTS_PER_CAR=100 +CARS_PRODUCED_PER_INTERVALL=1 + +# Supplier Parameters + +SUPPLIER_ID=BPNL000000000002 +SUPPLIER_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/bob/management +SUPPLIER_PROTOCOL_URL=http://bob-controlplane:8084/api/v1/dsp +SUPPLIER_API_KEY=password + +SUPPLIER_PLANTS=5 +SUPPLIER_PARTS_INITIAL=10000 +PARTS_PRODUCED_PER_INTERVALL=50 +SUPPLIER_FLEET_MANAGERS=1 +SUPPLIER_PARTS_PLANTS_COUNT=SUPPLIER_PARTS_PLANTS_COUNT +SUPPLIER_FLEET_COUNT=SUPPLIER_FLEET_COUNT +CARS_REQUESTED_PER_INTERVALL=1 + +ADDITIONAL_CONTRACT_DEFINITIONS_SUPPLIER=9000 +ADDITIONAL_CONTRACT_DEFINITIONS_OEM=9000 diff --git a/mxd/performance-tests/test-configurations/small_experiment.properties b/mxd/performance-tests/test-configurations/small_experiment.properties new file mode 100644 index 00000000..13fa3718 --- /dev/null +++ b/mxd/performance-tests/test-configurations/small_experiment.properties @@ -0,0 +1,38 @@ +# General Parameters + +EXPERIMENT_DURATION_SEC=1800 +EDC_NAMESPACE=https://w3id.org/edc/v0.0.1/ns/ +BACKEND_SERVICE=https://requestbin.myworkato.com/1fwngcu1 +MAX_NEGOTIATION_POLL_COUNT=100 +MAX_TRANSFER_POLL_COUNT=100 +INTERVALS_PER_MINUTE=10 + +# OEM Parameters + +OEM_ID=BPNL000000000001 +OEM_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/alice/management +OEM_PROTOCOL_URL=http://alice-controlplane:8084/api/v1/dsp +OEM_API_KEY=password + +OEM_PLANTS=1 +OEM_CARS_INITIAL=10000 +PARTS_PER_CAR=100 +CARS_PRODUCED_PER_INTERVALL=1 + +# Supplier Parameters + +SUPPLIER_ID=BPNL000000000002 +SUPPLIER_MANAGEMENT_URL=http://edc.ingress.mxd.edc-lpt.shoot.live.k8s-hana.ondemand.com/bob/management +SUPPLIER_PROTOCOL_URL=http://bob-controlplane:8084/api/v1/dsp +SUPPLIER_API_KEY=password + +SUPPLIER_PLANTS=1 +SUPPLIER_PARTS_INITIAL=10000 +PARTS_PRODUCED_PER_INTERVALL=50 +SUPPLIER_FLEET_MANAGERS=1 +SUPPLIER_PARTS_PLANTS_COUNT=SUPPLIER_PARTS_PLANTS_COUNT +SUPPLIER_FLEET_COUNT=SUPPLIER_FLEET_COUNT +CARS_REQUESTED_PER_INTERVALL=1 + +ADDITIONAL_CONTRACT_DEFINITIONS_SUPPLIER=0 +ADDITIONAL_CONTRACT_DEFINITIONS_OEM=0 diff --git a/mxd/postman/mxd-seed.json b/mxd/postman/mxd-seed.json index b1593d9a..4108c267 100644 --- a/mxd/postman/mxd-seed.json +++ b/mxd/postman/mxd-seed.json @@ -1,10 +1,10 @@ { "info": { - "_postman_id": "f7ae8abb-bac9-4ba6-89e2-e5cfb86c0b23", + "_postman_id": "1be67f78-c3fb-44f7-93cb-9c73d67ce795", "name": "MXD Management API", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "252261", - "_collection_link": "https://winter-rocket-884715.postman.co/workspace/SAP~ff4cf631-05f4-48ab-a1e0-f716cf2efc25/collection/252261-f7ae8abb-bac9-4ba6-89e2-e5cfb86c0b23?action=share&source=collection_link&creator=252261" + "_collection_link": "https://winter-rocket-884715.postman.co/workspace/SAP~ff4cf631-05f4-48ab-a1e0-f716cf2efc25/collection/252261-1be67f78-c3fb-44f7-93cb-9c73d67ce795?action=share&source=collection_link&creator=252261" }, "item": [ { @@ -110,7 +110,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"@context\": {\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n },\n \"@type\": \"PolicyDefinitionRequestDto\",\n \"@id\": \"1\",\n \"policy\": {\n\t\t\"@type\": \"Policy\",\n\t\t\"odrl:permission\" : [{\n\t\t\t\"odrl:action\" : \"USE\",\n\t\t\t\"odrl:constraint\" : {\n\t\t\t\t\"@type\": \"LogicalConstraint\",\n\t\t\t\t\"odrl:or\" : [{\n\t\t\t\t\t\"@type\" : \"Constraint\",\n\t\t\t\t\t\"odrl:leftOperand\" : \"BusinessPartnerNumber\",\n\t\t\t\t\t\"odrl:operator\" : {\n \"@id\": \"odrl:eq\"\n },\n\t\t\t\t\t\"odrl:rightOperand\" : \"{{POLICY_BPN}}\"\n\t\t\t\t}]\n\t\t\t}\n\t\t}]\n }\n}", + "raw": "{\n \"@context\": {\n \"odrl\": \"http://www.w3.org/ns/odrl/2/\"\n },\n \"@type\": \"PolicyDefinitionRequestDto\",\n \"@id\": \"1\",\n \"policy\": {\n\t\t\"@type\": \"odrl:Set\",\n\t\t\"odrl:permission\" : [{\n\t\t\t\"odrl:action\" : \"USE\",\n\t\t\t\"odrl:constraint\" : {\n\t\t\t\t\"@type\": \"LogicalConstraint\",\n\t\t\t\t\"odrl:or\" : [{\n\t\t\t\t\t\"@type\" : \"Constraint\",\n\t\t\t\t\t\"odrl:leftOperand\" : \"BusinessPartnerNumber\",\n\t\t\t\t\t\"odrl:operator\" : {\n \"@id\": \"odrl:eq\"\n },\n\t\t\t\t\t\"odrl:rightOperand\" : \"{{POLICY_BPN}}\"\n\t\t\t\t}]\n\t\t\t}\n\t\t}]\n }\n}", "options": { "raw": { "language": "json" diff --git a/mxd/seed_data.tf b/mxd/seed_data.tf index ca42a35e..d886011c 100644 --- a/mxd/seed_data.tf +++ b/mxd/seed_data.tf @@ -39,37 +39,37 @@ resource "kubernetes_job" "seed_connectors_via_mgmt_api" { } spec { // this container seeds data to the BOB connector - container { - name = "newman-bob" - image = "postman/newman:ubuntu" - command = [ - "newman", "run", - "--folder", "SeedData", - "--env-var", "MANAGEMENT_URL=http://${module.bob-connector.node-ip}:8081/management", - "--env-var", "POLICY_BPN=${var.alice-bpn}", - "/opt/collection/${local.newman_collection_name}" - ] - volume_mount { - mount_path = "/opt/collection" - name = "seed-collection" - } - } +# container { +# name = "newman-bob" +# image = "postman/newman:ubuntu" +# command = [ +# "newman", "run", +# "--folder", "SeedData", +# "--env-var", "MANAGEMENT_URL=http://${module.bob-connector.node-ip}:8081/management", +# "--env-var", "POLICY_BPN=${var.alice-bpn}", +# "/opt/collection/${local.newman_collection_name}" +# ] +# volume_mount { +# mount_path = "/opt/collection" +# name = "seed-collection" +# } +# } // this container seeds data to the ALICE connector - container { - name = "newman-alice" - image = "postman/newman:ubuntu" - command = [ - "newman", "run", - "--folder", "SeedData", - "--env-var", "MANAGEMENT_URL=http://${module.alice-connector.node-ip}:8081/management", - "--env-var", "POLICY_BPN=${var.bob-bpn}", - "/opt/collection/${local.newman_collection_name}" - ] - volume_mount { - mount_path = "/opt/collection" - name = "seed-collection" - } - } +# container { +# name = "newman-alice" +# image = "postman/newman:ubuntu" +# command = [ +# "newman", "run", +# "--folder", "SeedData", +# "--env-var", "MANAGEMENT_URL=http://${module.alice-connector.node-ip}:8081/management", +# "--env-var", "POLICY_BPN=${var.bob-bpn}", +# "/opt/collection/${local.newman_collection_name}" +# ] +# volume_mount { +# mount_path = "/opt/collection" +# name = "seed-collection" +# } +# } // this container seeds data to the miw service container { diff --git a/mxd/variables.tf b/mxd/variables.tf index ca13b175..12040f17 100644 --- a/mxd/variables.tf +++ b/mxd/variables.tf @@ -18,18 +18,6 @@ # # configuration values for the MIW+Keycloak Postgres db -variable "keycloak-database" { - default = "keycloak" -} -variable "keycloak-db-user" { - default = "keycloak_user" -} -variable "miw-database" { - default = "miw" -} -variable "miw-db-user" { - default = "miw_user" -} variable "postgres-port" { default = 5432 }