Hi,
I would like to note it out here that the mock_service does work in Eclipse Velocitas, through custom created docker image.
From: leda-dev <leda-dev-bounces@xxxxxxxxxxx>
On Behalf Of Ivanov Vasil (BD/PAD-COD1) via leda-dev
Sent: Thursday, November 23, 2023 2:45 PM
To: leda developer discussions <leda-dev@xxxxxxxxxxx>
Cc: Ivanov Vasil (BD/PAD-COD1) <Vasil.Ivanov3@xxxxxxxxx>
Subject: Re: [leda-dev] Launching KUKSA:mock_service in Leda
From: leda-dev <leda-dev-bounces@xxxxxxxxxxx> on behalf of Ivanov Vasil (BD/PAD-COD1) via leda-dev <leda-dev@xxxxxxxxxxx>
Sent: Thursday, 23 November 2023 15:43
To: Heissenberger Christian (ETAS-E2E/XPC-Fe) <christian.heissenberger@xxxxxxxxxxxx>; leda developer discussions <leda-dev@xxxxxxxxxxx>
Cc: Ivanov Vasil (BD/PAD-COD1) <Vasil.Ivanov3@xxxxxxxxx>
Subject: Re: [leda-dev] Launching KUKSA:mock_service in Leda
It seems there is an issue with the ":latest" mock service container, since it can't find its entrypoint (mock_service). I suppose this is due to the following reorganization
commit:
I'll take care to open an issue in the Kuksa.Val repo.
|
Repository for Vehicle Service Related implementations for Eclipse SDV - Fix findings and alter structure of mock service · eclipse/kuksa.val.services@a1bff33
|
From: Heissenberger Christian (ETAS-E2E/XPC-Fe) <christian.heissenberger@xxxxxxxxxxxx>
Sent: Thursday, 23 November 2023 15:03
To: leda developer discussions <leda-dev@xxxxxxxxxxx>; Ivanov Vasil (BD/PAD-COD1) <Vasil.Ivanov3@xxxxxxxxx>
Cc: Antara Dey <Antara.Dey@xxxxxxxxxxxxxxxxxx>
Subject: RE: [leda-dev] Launching KUKSA:mock_service in Leda
Hi,
you do not need to have a “mock.py” on the Leda Image.
It is just a possibility to modify directly the “mocks” without rebuilding and re-deploying the Container.
You will see this, if you do leave the mount point empty:
"mount_points":
[],
And open the logs of the mockservice container. E.g. with kantui
https://eclipse-leda.github.io/leda/docs/general-usage/utilities/kantui/
Christian Heissenberger
Cross Functional Innovations Architect
T +49 711 3423-3829
Christian.Heissenberger@xxxxxxxx
ETAS GmbH, ETAS-E2E/XPC-Fe1
Borsigstraße 24, 70469 Stuttgart, Germany
www.etas.com
ETAS – Empowering Tomorrow’s Automotive Software
Managing Directors: Dr. Thomas Irawan, Nicolet Eglseder, Mariella Minutolo
Chairman of the Supervisory Board: Dr. Walter Schirm
Registered Office: Stuttgart, Registration Court: Amtsgericht Stuttgart, HRB: 19033
From: leda-dev <leda-dev-bounces@xxxxxxxxxxx>
On Behalf Of Antara Dey via leda-dev
Sent: Donnerstag, 23. November 2023 13:20
To: Ivanov Vasil (BD/PAD-COD1) <Vasil.Ivanov3@xxxxxxxxx>
Cc: Antara Dey <Antara.Dey@xxxxxxxxxxxxxxxxxx>; leda-dev@xxxxxxxxxxx
Subject: Re: [leda-dev] Launching KUKSA:mock_service in Leda
Hi,
I see that the Leda documentation has been updated w.r.t the mock_service. However, I do not understand the purpose of mount_points in the container manifest. As adopted from Kuksa VAL, the mock.py is part of the mock_service app, and
mockservice.py executes in the container.
Do I need to copy the mock.py file to the Leda image? If yes, why?
https://eclipse-leda.github.io/leda/docs/app-deployment/seat-adjuster/deploy-seat-adjuster/#mockservicejson
Thank you for your support.
Regards,
Antara Dey
We were having some issues with releasing v0.1.0-M3 version of Leda, and I had to switch my focus to that. Now that is done and I can go back to looking into your
issue.
Hello Vasil,
Doing a follow-up on the mock_service container image testing.
Is there any update on this yet?
Regards,
Antara Dey
I have made the container image public for you to test. You can pull the image from here:
docker pull
ghcr.io/antaradey-itk/mock_service:v0.0.1
That is a bit strange indeed. Is it okay for you to make your container image public, so I can try to reproduce the issue on my side and more quickly iterate when
debugging?
Thank you for writing back.
Approach 1: As suggested, I switched the network to bridge, and added the extra_hosts for mosquitto and databroker. Even then, I see that the error persists.
Approach 2: When you say I need to the map the mosquitto and data_broker to 127.0.0.1,
could you please elaborate how to do that?
From what I see in your container descriptor, you set the environment variables as so:
"SDV_MQTT_ADDRESS=mqtt://mosquitto:1883",
"SDV_VEHICLEDATABROKER_ADDRESS=grpc://databroker:55555",
"SDV_MIDDLEWARE_TYPE=native",
"vehicle_data_broker=info"
However, "mosquitto" and "databroker" don't mean anything to the kanto container manager and that is why you are probably getting RPC (connection) errors.
If you want to use mosquitto and databroker to refer to the MQTT broker (native) on Leda and the databroker container, you would need to add some extra host entries:
"databroker:container_databroker-host"
Now, host_ip and container_databroker-host are special variables in Kanto manifests which resolve to the Host ip and the ip of the container with the name databroker
in the virtual bridge network respectively. Adding the above-mentioned extra host entries now map "mosquitto" and "databroker" to those IPs and this will allow your mock service to connect to both services (if everything else is ok).
If you do the extra hosts re-mapping the way I suggested, you shouldn't need in host networking mode. If you still decide to run in host-networking mode, then
you would need to map both "mosquitto" and "databroker" to 127.0.0.1.
In docker, on the default docker0 bridge network you don't have a DNS server that allows container-name based communication and I assume that's why you can't get
it to work without host networking.
Overall, I suggest going with the approach I described in the beginning of this email and if you need further help, don't hesitate to write back.
I am trying to launch the mock_service from KUKSA as Kanto container in Leda image.
1. Import
mock_service from KUKSA repository into Velocitas template.
2. Modify vehicle signals for vehicle application and test it.
3. Create docker image, and push to private repository.
4. Pull docker image and run in Velocitas environment. ->
Runs as expected.
5.
Use Kanto-CM container manifest to launch in Leda v.M2 image.
The creation of the mock_service container is successful.
But, it throws the following
errors
in logs and
does not run as expected.
.
As suggested by Velocitas team, I have referred the Velocitas Kanto manifest file for mock_service from
mockservice.json.
Please find attached JSON file of the mock_service which I use in Leda image.
Note: I observe the
same error in Velocitas in the following scenarios:
1) Container launched without Local-Runtime Up.
2) *docker run* without flag --net=host.
Kindly provide insights into this issue.
|