LiquidAI-project / wasmiot-orchestrator

MIT License
0 stars 1 forks source link

Update modules on active deployments #53

Closed trkks closed 1 year ago

trkks commented 1 year ago

When a module-file is uploaded, check for matching deployments which are using the module and deploy to the devices (again).

There seemed to be no need to alter supervisor for this, as redeploying this way replaces the instructions with the same ones, but fetches new files from orchestrator as usual.

Tested by:

  1. Set up two supervisor devices s1 and s2
  2. Create two "different" fibo modules m1 and m2 uploading the fibo.wasm file to them like normal
  3. Create three deployments (d1, d2, d3):
    • d1 deploys to s1 with m1 fibo
    • d2 deploys to s1 with m2 fibo
    • d3 deploys to s2 with m2 fibo
  4. Deploy all three
  5. s1 and s2 now share the module m2
  6. Check that all deployments execute fibo function succesfully
  7. Upload e.g. camera.wasm which does not contain fibo function to m1
  8. Check that d2 and d3 still succeed with fibo, but d1 fails (because the newly updated .wasm does not contain fibo)
  9. Result is, that the module m1 was replaced at the correct device on the correct deployment when m1 was "updated" at the orchestrator