thin-edge.io icon indicating copy to clipboard operation
thin-edge.io copied to clipboard

added child device proposal to config management

Open cstoidner opened this issue 1 year ago • 7 comments

Proposed changes

Added proposal for child-device support to configuration management reference documentation.

That proposal includes basically three aspects:

  • allow to associate config files with a cloud’s child-device twin
  • allow to consume/provide config files on device site without local FS access (e.g. to pass configs to/from external device or containers)
  • allow to add configs without local FS access (e.g. to allow external device or containers to add their configs)

Types of changes

  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • [x] Documentation Update (if none of the other choices apply)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • [ ] I have read the CONTRIBUTING doc
  • [ ] I have signed the CLA (in all commits with git commit -s)
  • [ ] I ran cargo fmt as mentioned in CODING_GUIDELINES
  • [ ] I used cargo clippy as mentioned in CODING_GUIDELINES
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] I have added necessary documentation (if appropriate)

Further comments

cstoidner avatar Jul 13 '22 21:07 cstoidner

NOTE: Current known open topics are:

  1. Who creates when the child device twin in the cloud.
  2. Who declares when the needed supported operations and supported config-types for config management to the cloud.

cstoidner avatar Jul 14 '22 08:07 cstoidner

NOTE: There is also another proposal for child-device support in C8Y Config Plugin, that need to be consided. See https://github.com/thin-edge/thin-edge.io/pull/1195/files#r923112100

cstoidner avatar Jul 18 '22 09:07 cstoidner

The config management section has for more details now and pretty much aligned with what we've all agreed on so far. But, the child device provisioning flow is still not clear from this doc and I still feel that it's one of the foundations for this whole child device specification. It has to be captured and defined somewhere, if not in this doc, which is specifically about config management.

I was hoping that my suggestion on a doc structure for child devices support, in the last review summary, would help. But, I'm assuming that you're not fully convinced with that.

Please have a look to comment https://github.com/thin-edge/thin-edge.io/pull/1236#discussion_r938788482

cstoidner avatar Aug 05 '22 13:08 cstoidner

I see that you've dropped the idea to have a c8y-config-plugin.yml file per child device in the latest iteration and replaced it with the config types bootstrap message which looks reasonable. But, once question remains: how can we update the config list of a child device from the cloud? That yaml file was enabling just that for the thin-edge device itself.

How about the c8y-config-plugin` creating/updating these yaml files per child device on receipt of those config type bootstrap messages?

It's now described exactly in that way.

cstoidner avatar Aug 18 '22 15:08 cstoidner

For me, the most important is the difference of terms that you used. I think it needs to be documented.

* child device

* external device

* external child device

Those terms are now documented here: https://github.com/thin-edge/thin-edge.io/blob/ad38e33aeea34a56737f44234c85313d3986fd76/docs/src/references/child-devices.md#terminology

cstoidner avatar Aug 18 '22 15:08 cstoidner

  • Since there is no domain data model of what needs to be known/exchanged between thin-edge, the cloud and the child-devices, there is no way to check that the proposed protocols and flows to register a child device are correct and complete.

There is now a definition for a thin-edge data-model, please see https://github.com/thin-edge/thin-edge.io/blob/138f8384adc37608fa5f089397754ad1a4f2d6cc/docs/src/architecture/data-model.md.

That data-model contains all information thin-edge knows about external child devices.

cstoidner avatar Aug 28 '22 21:08 cstoidner

I'm really disappointed by the state of the child-devices.md document.

[...]

* Is the [previous work](https://github.com/thin-edge/thin-edge.io/pull/1195) abandoned?

That PR was acidentially overloaded with too much stuff (namely "provisioning") that does not belong to the original scope "configuration management". Even more that stuff lacks on missing pre-work as data-model and inventory.

For that reaon I removed those things from file "child-device.md" in that PR, and will consider all contents and comments in context of PR "requirements and use-cases" (https://github.com/thin-edge/thin-edge.io/pull/1195). See also detailed comments https://github.com/thin-edge/thin-edge.io/pull/1236#discussion_r955257236 and https://github.com/thin-edge/thin-edge.io/pull/1236#discussion_r955272147

For information: Pre-work as data-model and inventory, see https://github.com/thin-edge/thin-edge.io/blob/138f8384adc37608fa5f089397754ad1a4f2d6cc/docs/src/architecture/data-model.md

cstoidner avatar Aug 28 '22 21:08 cstoidner

Superseded by https://github.com/thin-edge/thin-edge.io/pull/1417

didier-wenzek avatar Oct 14 '22 10:10 didier-wenzek