Ladder99 / ladder99

Ladder99 - connects factory devices to database and visualizations using MTConnect, an open standard.
https://mriiot.com
Apache License 2.0
27 stars 10 forks source link

Absolute paths in the example agent.cfg don't match with internal paths for image mtconnect/agent:2.2.0.16 #251

Open Dowster64 opened 6 months ago

Dowster64 commented 6 months ago

Hi, We installed Ladder using git clone onto a chromebook on 7/5/24 (UK/ AUS format date) . We had to modify the Grafana port from port 80 (I think to >1000) - we used 3000 externally but this is a chromebook issue. We did run into issues with the current agent.cfg paths for the agent.xml file and the stylesheet settings.
Current settings and suggested changes to the agent.cfg file:

# note only the relevant lines are shown
Devices = /data/agent/agent.xml   # Original - note the docker-compose.yaml mounts to:
#  volumes:
#       - ../setups/$SETUP/volumes/agent:/mtconnect/config # should have agent.cfg, agent.xml
# This worked for us:
Devices = ./agent.xml
# This would likely work too:
Devices = /mtconnect/config/agent.xml

# Under the Stylesheets config:

Path = /etc/mtconnect/styles  # Original 
Path = /mtconnect/data/styles            # new  

 Path = /etc/mtconnect/styles/favicon.ico # Original 
 Path = /mtconnect/data/styles/favicon.ico # new

I'll try an do a pull request, but these are changes we made to get the container/ service running. However the path mismatch might be different for different agent images, so a Dockerfile and a build might be better controlled? Thanks again for a great complete solution around MTConnect, data persistence and visualisation!

ottobolyos commented 6 months ago

@Dowster64, thanks for opening this issue! :pray:

We installed Ladder using git clone onto a chromebook on 7/5/24 (UK/ AUS format date) . We had to modify the Grafana port from port 80 (I think to >1000) - we used 3000 externally but this is a chromebook issue.

Changing/overriding the configuration can be done using the $repo_root/setups/$setup/services/docker-compose.yaml, e.g. the ports can be changed by adding .services.grafana.ports to that file.

# This worked for us:
Devices = ./agent.xml
# This would likely work too:
Devices = /mtconnect/config/agent.xml

Indeed, it is a bug on our side.

And while both paths work, the former might be preferred.

Path = /etc/mtconnect/styles  # Original 
Path = /mtconnect/data/styles            # new  

Path = /etc/mtconnect/styles/favicon.ico # Original 
Path = /mtconnect/data/styles/favicon.ico # new

Both of these paths needs to be fixed. Your new paths are correct.

ottobolyos commented 6 months ago

Anyway, I have created the PR (see #252).