Hello everyone!
Exploring mender here… I’ve been playing around with it. I have searched the docs and I’ve seen nothing about this… probably I’m searching the wrong terms… but…
Is there a way to push any values from the server to the client? Think ‘device inventory’, but the other way around.
Let me explain: With device inventory, the client is pushing some values to the server… Is there any way (apart from doing an application deployment) to make some arbitrary values from the server available to the client?
For example, to change log verbosity of the app running in the device… I’d change the value or an attribute in the server and the next time the client connects, it picks the new value. My app running on the client would then change the log verbosity.
Thanks!
1 Like
@rbarbero No, unfortunately not at the moment. This would be considered more device-management than OTA, I think.
Funny that you are touching upon this though, as planning for 2.7
so far includes a solution for managing your device attributes, as well as updating it, which then would enable this use case.
1 Like
Ciao @rbarbero,
as Ole pointed out, Mender does not support pushing configuration settings from the server to the client. You can use the inventory only the other way around, collecting data from the device, and reporting it to the back-end using the inventory scripts.
In the early future, we’ll implement Device Management features and among them the possibility to deploy configuration updates to devices, which is what you described.
One option you have, though, is using Update Modules (namely, the single file and script Update Modules) to install a configuration file (e.g. a JSON or INI file) using deployments and reloading/restarting the service.
Have a look at them:
You can also create your custom Update Module to cover your specific use-case (e.g. installing a file, rendering a template, and reloading a service). Here you have the documentation: https://docs.mender.io/artifact-creation/create-a-custom-update-module
2 Likes
Thank you both for the answers!
I see a lot of potential implementing those device management features in Mender.
For now, I implemented the workaround as @tranchitella commented, using the connection with IoT Core in GCP to send the configuration.
Great, @rbarbero!
Would you mind sharing a bit more information about how you connected IoT Core in GCP with Mender to send the configuration? It sounds an interesting use case.
Hi,
Maybe I worded it wrong… I did not connect IoT Core to Mender… I connected IoT Core to the device where the mender client is running.
IoT Core sends the config change to the device that then applies the change. After that, using a inventory script, I can see in Mender the current config of the device.
There is, however, a nice tutorial on how to do a more tight integration to provision devices between Google Cloud IoT Core and Mender… I’m planning on extending that tutorial to device config after Mender 2.7 is out
R
1 Like
Ah, I see, I misunderstood your previous message.
Thanks for sharing!