diff --git a/runtime.json b/runtime.json index b546aa6a..f12f708f 100644 --- a/runtime.json +++ b/runtime.json @@ -101,7 +101,7 @@ }, { "key": "env", - "value": "VEHICLEDATABROKER_DAPR_APP_ID=vehicledatabroker" + "value": "BROKER_ADDR=localhost:55555" }, { "key": "env", @@ -131,7 +131,7 @@ }, { "key": "env", - "value": "VEHICLEDATABROKER_DAPR_APP_ID=vehicledatabroker" + "value": "VDB_ADDRESS=127.0.0.1:55555" }, { "key": "env", @@ -185,7 +185,7 @@ }, { "key": "env", - "value": "VEHICLEDATABROKER_DAPR_APP_ID=vehicledatabroker" + "value": "VDB_ADDRESS=127.0.0.1:55555" }, { "key": "mount", diff --git a/runtime_kanto/src/runtime/deployment/mockservice.json b/runtime_kanto/src/runtime/deployment/mockservice.json index 2a2d1b59..5ef35422 100644 --- a/runtime_kanto/src/runtime/deployment/mockservice.json +++ b/runtime_kanto/src/runtime/deployment/mockservice.json @@ -22,7 +22,7 @@ }, "config": { "env": [ - "VEHICLEDATABROKER_DAPR_APP_ID=vehicledatabroker" + "VDB_ADDRESS=127.0.0.1:55555" ] } } diff --git a/runtime_kanto/src/runtime/deployment/mosquitto.json b/runtime_kanto/src/runtime/deployment/mosquitto.json index f7d762c3..19154f63 100644 --- a/runtime_kanto/src/runtime/deployment/mosquitto.json +++ b/runtime_kanto/src/runtime/deployment/mosquitto.json @@ -14,9 +14,6 @@ } }, "config": { - "env": [ - "KUKSA_DATA_BROKER_PORT=55555" - ], "cmd": [ "mosquitto", "-c", diff --git a/runtime_local/src/run-vehicle-app.py b/runtime_local/src/run-vehicle-app.py index a75b0367..e3a01cd6 100644 --- a/runtime_local/src/run-vehicle-app.py +++ b/runtime_local/src/run-vehicle-app.py @@ -17,6 +17,7 @@ from typing import Optional from local_lib import MiddlewareType, get_dapr_sidecar_args, get_middleware_type +from velocitas_lib.services import get_service_port def get_dapr_app_id(service_id: str) -> str: @@ -34,6 +35,12 @@ def run_app( if get_middleware_type() == MiddlewareType.NATIVE: envs = dict() envs["SDV_MIDDLEWARE_TYPE"] = "native" + vdb_port = get_service_port("vehicledatabroker") + vdb_address = "grpc://127.0.0.1" + envs["SDV_VEHICLEDATABROKER_ADDRESS"] = f"{vdb_address}:{vdb_port}" + mqtt_port = get_service_port("mqtt-broker") + mqtt_address = "mqtt://127.0.0.1" + envs["SDV_MQTT_ADDRESS"] = f"{mqtt_address}:{mqtt_port}" subprocess.check_call(program_args, env=envs) elif get_middleware_type() == MiddlewareType.DAPR: if not app_id: