Cumulocity-IoT / cumulocity-devicemanagement-agent

Cumulocity Reference Agent written in Python to demonstrate most of the Device Management Capabilities of Cumulocity IoT
Apache License 2.0
26 stars 20 forks source link

agent software update module needs to handle files in the Cumulocity software repo #53

Closed janhumble closed 2 years ago

janhumble commented 2 years ago

Some customers want to be able to host library and deb package upgrades in Cumulocity directly, including new versions of the agent, and install from there. Currently it doesn't provide any mechanism to do so, and specifying the file or path in Cumulocity is ignored by the agent in lieu of the devices own source list. This is a critical need for at least 2 customers at the moment.

mbay-ODW commented 2 years ago

I guess @switschel will comment here as well but for my understanding the agent implementation provided here is not for productive usage. Its basically for knowledge transfer, PoC´s and Demo purposes. For a productive usage on customer side I would recommend the thin-edge.io framework since this is officially provided and supported by R&D. I know that they are currently discussing the self-update mechanisms.

switschel commented 2 years ago

@mbay-SAG Yep, I had a chat with Jan last week and asked him to create this issue. You're totally right about production usage but still this might be a feature someone wants to demo/try so I decided to implement that (maybe in a different branch) or with the logic if the url contains "*.deb" or "binaries" that it will install the software from the url instead from APT. Do you know if the "software type" property is already available in operations like the thin edge is planning to use it?

mbay-ODW commented 2 years ago

Ok agree, same would basically be true for the self-update I guess.

Currently thin-edge.io uses identifiers within the version with "::apt" oder "::docker" to identify the software type. But the advanced software management, where the software type is included, is already in implementation from what I know. But I have no information about a release version.

switschel commented 2 years ago

@janhumble Can you give this branch a try: https://github.com/SoftwareAG/cumulocity-devicemanagement-agent/tree/binary_software_updates?

It allows to install files which can be installed using dpkg. c8ydm must be run as root to do so. Btw. I had a hard way testing it because most deb files have dependencies which are not resolved this way.

Self-Update is not yet implemented as it is more complicated to restart the agent etc.