If something already exists I apologize for not finding it and ask for sharing of url.
In the past (pre mender) we would manually manage our remote updates, initial stage being pushing of a tar file down to site. Included in the tar are update (version) specific scripts for any post handling of update.
I’ve no doubt there are several ways to accomplish this with mender. My challenge is in managing pushing tar file down and then running a script. One way is to develop specific update module that will untar the file and then execute a specific shell script for post processing - would this be the bets way to go? I am keen to hear thoughts.
Indeed this seems like a basic use case that it would be nice to have some better documentation / tutorials around.
As you mention there are many ways to achieve this. How is the software itself packaged (inside the tar file)? Is it simply an executable, or several executables? If several, should they end up in the same directory?
For the simplest case (single executable and need for scripting), you can do this:
Use the Single File Update Module. Your executable is the “Single File” that you will package.
Your script(s) should be packaged as State scripts. If it’s simply a post-install script, you can use the ArtifactInstall_Leave state, e.g. call your script ArtifactInstall_Leave_01_postinstall
To include your state script(s) with an Artifact using an Update Module, you can pass them to the Artifact generator in this way:
So ArtifactInstall_Leave_01_postinstall is simply an executable script. The Mender knows where to call it because it parses the file name itself.
Does that make sense?
I’d recommend to just try a dummy script (e.g. that touches a file) and include it using the Single File update module as mentioned above. Hopefully it will make sense once you test it out.