Keeping device variables while moving the device from app to app

Hello,

is it possible to keep the device service variables while moving a device to another application? I have an application with a the stable configuration and from time to time i want to try things (improve, software updates, etc.). For this reason i have a second application as test environment to develop new stuff and to test it. To do so i move one of the deices from stable to test application try stuff and if it works i move the device back and upgrade the stable repo. While i move the device i always loose the device service variables and i have to add them again. Both applications even share the same docker containers most of the time, so there are no variable with no matching container or so…

Could be a feature request? Would make moving a device to test something from app to app a lot easier!

Thank you very much, cheers

Caspar

Hi @Caspar,

I’ve pinged some guys internally about the feature requested.

In the meantime, I can think of various ways your workflow can improve.

Have you tried using balena cli and scripting your device variables addition?

An alternative would be to use staged releases. Have you had a look at https://github.com/balena-io-projects/staged-releases ?

Thanks
ZubairLK

Hi. Just a small follow up on this. We have discussed it internally and it’s not an easy one. There are a set of edge cases that come into play when thinking about how to implement this feature. The workaround for it is to use Device Environment Variables which move with the device. The only downside of this is that they are exposed to all services. Hope this helps.

Thank you very much for the quick help. i will look into the staged releases and for now use the device environment variables, to be honest i didn’t check before wether the device environment variables are kept while moving, i just used the service variables since the introduction of docker-compose :wink:

Cheers

Caspar