Our code consists of 5 apps that communicate with each other via shared memory. We currently do updates by sending down 5 .update files, each one made with mkapp. We’d like to have just one file that contains the 5 apps.
I tried specifying the 5 programs in the “executable” section of the adef file, and also specifying those same programs in the “processes->run” section of the adef file. That worked, but it looks like a single app to the Legato system. I am unable to use “app stop” to stop just one component of our system.
I tried using mksys, and that did provide 5 separate apps, but it also included a system image which makes the file 40 times bigger!
Is there a way to build a .update file which contains 5 separate apps, and no system image?
you can combine those 5 apps into one legato app, just like what you did to specify 5 programs in the “executable” section of the adef file, but also specify “start: manual” to manually start the application.
After that you can run each component by “app runProc”
e.g.
app runProc hello1 hello1 --exe=hello1 &
app runProc hello1 hello2 --exe=hello1 &
To stop the component, you can find out the pid and kill the process.
Thanks for the reply. I tried using app runProc on my system, but it doesn’t exist. Is it a new feature in the R15 release? We haven’t moved to that yet.
Also, the start:manual step is not what we want. Unless your’e suggesting start:manual when doing a debugging build? But we were hoping for a way to do this for debugging on a production system. We also specify faultAction: restartApp for the processes, so I’m guessing if I kill them, they will just restart.
Our dream would be something like the output of mksys, but without the system update part. But my testing seems to indicate that is not possible.
Let me know if you have any other nuggets of information to share.
Hi Ken, did you find a solution? We have 4 apps to deploy; and would like to deploy as a set (without the system image).
I have been trying to see if AirVantage might support this somehow; but no joy yet. “Workflow” shows “Install Application” step-types in the manual… that appeared promising; but that step isn’t available when I login.
Regards, Mike
We ended up going with a single .adef file that listed all 5 of our apps, in both the “executables” section and the “processes->run” section. We also changed the faultAction: flag from “restartApp” to “restart”. That way, if one of the 5 executables crashes, it just restarts that process, not all 5 processes.
After some internal discussion, we decided we really liked the fact that all 5 executables get installed and restarted as a unit. It really simplified deployment and versioning of our software. The only downsides are we can no longer just stop one of the processes, which we would sometimes do when debugging a problem. If we kill the executable with the kill command, it will get just restarted, so we now have to to “app stop <app_name>” to stop all 5 processes when debugging certain problems. But that’s not a issue for us. We just need to remember to use a different command now when we need to stop our app.
That other downside is we cannot update just one of the executables via AirVantage. We have to send down the entire combined app, even is only one executable is different. But it does make building a release easier, and there is much less of a chance of installing different releases of the 5 executables in our app.
Pros and cons to both.
We can’t do single ADEF, because one of the “control” app is set to reboot-if-fail… last ditch attempt to recover. The other 3 send the “control” app heartbeats; they only have restartApp behaviour… and are optional… and etc…
Pity. The rest of Legato is wonderfully architected, so this seems to be a rare oversight.