It is possible to play out, untar and and run ".tar" files with the qbee remote device management platform. This allows to easily deploy collections of files through a single transfer. Also here file distribution is used. Please upload your tar files with the qbee file manager and follow the following steps to transfer it to your IoT edge devices:
Upload any files with the file manager. Please note the paths.
In the qbee app go to "Configure" and select "System->File Distribution".
On the device tab select the group or device that is in scope. For more inofrmation please see the configure documentation.
Start the actual file distribution definition:
This plays out the tarball to the defined remote devices. If Command to run is defined this command will be run.
When does this file gets played out?
qbee checks if the file exists in the defined destination. If not it will be transfered. Both the file in the file manager and the file on the machine has a checksum. If the file manager file is replaced a new file distribution happens. Likewise, if the file on the target machine is changed this will also trigger a new file download and the changes will be overwritten with the original file from the file manager.
What happens to the extracted files?
Using tarballs is a way to break the direct link between a file in the file manager and a file on the edge device. So if I have a text.txt in file manager and on the device anytime the text.txt is changed on the device it will be redistributed and overwritten. That can be prevented when using a tarball. Then the file is extracted and the remote system can work on the file. However, if the tarfile changes or is deleted on the remote device it would be re-distributed, uncompressed and the extracted files would be overwritten. So if your final goal is to deliver a file but let the remote system change it you need to distribute it, copy it with a script that checks if the target file exists and only untars or moves it if it is not there yet.
So in this case do not delete the awesome-app.tar.gz because that would trigger a new installation to the device.
In order to process the tarball the optional "Command to run" function can be used. Here commands can be chained using
&&and this opens up for a lot of options. In this case we do some operations to install the tarball:
Untar the file, run configure, make and install:
tar -zxvf /usr/local/bin/awesome-app.tar.gz && /usr/local/bin/.configure && /usr/local/bin/make && sudo /usr/local/bin/make install
Alternatives and Considerations
Doing this will not allow qbee to pick up if the installation has succeeded or not. So please use with care. A more complex script with additional checks and the possibility to give return messages might be a better way of doing this. For debian systems qbee offers also a software management function that will report back on status of the installation.