balena-os / balena-revpi

BalenaOS integration layer for the Revolution Pi boards
Apache License 2.0
2 stars 2 forks source link

Access config from within container? #22

Open MathiasKoch opened 5 years ago

MathiasKoch commented 5 years ago

Hey guys,

Great work on this meta layer!

One question though. Would it be possible for me to somehow make the config.rsc file available to my container in a R/W fashion?

floion commented 5 years ago

Hi. What would you change in config.rsc?

MathiasKoch commented 5 years ago

Hi,

The thing is, we have a system where we deploy a container onto a large number of revpi devices. The container contains code for sampling, edge computing, communication and data links through MQTT to our cloud. We would like this application to be able to reconfigure our kunbus modules on command, eg change an analog inputRange, or enable counters on digital inputs. But all of these reconfigurations requires a change to the config.rsc file, followed by a kernel module reload.

Best regards,

floion commented 5 years ago

@shaunmulligan @CameronDiver looks like this should be handled like the pi's config.txt is handled by the supervisor?

MathiasKoch commented 5 years ago

@floion That would definitely be one way of doing it, that might make it more broadly accessible to balena users in general.

If this is the way you guys think it should be implemented, i would be more than happy to provide the initial PR work for it in the supervisor..

It would maybe be possible to make a RESIN_REVPI_CONFIG_xxx group in the same way the current RESIN_HOST_CONFIG_xxx works for configuring raspberry config items?

MathiasKoch commented 5 years ago

@shaunmulligan @floion @CameronDiver Any thoughts on this?