revpi and iotedge update

Rund um die Software von Revolution Pi
Post Reply
bostjan.dolenc
Posts: 2
Joined: 30 Nov 2021, 10:24
Answers: 0

revpi and iotedge update

Post by bostjan.dolenc »

Hello,

I am currently researching using revpi (compact or any other for that matter) as a controller, as well as fully fledged iot device. For that purpose, I have installed iotedge on a device, and am thus able to run containerised code, update containers, send data etc., directly to Azure iot hub.

All is good and works perfectly. The question that I am struggling with update of the edge device, i.e. revpi host itself.
For instance, i would like to remotly update /var/lib/revpipyload/program.py, or even kernel objet, i.e. /usr/lib/modules/4.19.95-rt38-v7/extra/piControl.ko.
However, I have not found a way to do this from iot hub -- namely invoking a bash command on the host machine itself.

As a work around I see the following sollution:
- create container holding all the code that is to be transfered to the edge machine
- mount local folder, e.g. tmp
- schedule a cronjob to run a bash script that will copy appropriate files and restart the requiered services -- this would need to be done ahead of time, and the cronjob should check if there are any changes in the specified files


Do you find such an aproach viable, or do you have any recommenedations/experiences on how to achieve the described?

Many thanks for your time and help
Boštjan
kjkoster
Posts: 87
Joined: 12 Feb 2022, 10:42
Answers: 2

Re: revpi and iotedge update

Post by kjkoster »

Dear Boštjan,

Have you considered something like Ansible to automate this? Not saying that is the perfect tool, just wanted to say that there are tools to automate this.

Kees Jan
Post Reply