-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide means to record manual off-line device updates into hawkBit's history #242
Comments
I like the idea. We could use this also. At the end of the day it should possible to post completed actions into the history. Would also be help full to teach hawkBit the initial installation state or even an executed factory reset. |
Short summary of our idea: Using PutConfigDat with an extended DdiConfigData. So a client is able to send configuration information to hawkbit. |
https://github.com/eclipse/hawkbit/blob/master/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/eventbus/event/TargetUpdatedEvent.java will be send by the repository. After you have received the event based on the attributes you can create a "completed update action" on the target. However, that function does not exist yet. I guess https://github.com/eclipse/hawkbit/blob/master/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/JpaDeploymentManagement.java could be extended to create such a thing, i.e. create a complete action and set installed DS. (keep in mind that if you intend to contribute this into hawkBit we need not only the repository extension but also the Mgmt API extension as well). Last step for the required functionality is to create a small service that listens to the event, searches for a fitting DS and uses the new repository function to update the action history and installed DS. if you intend to contribute this last functionality as well we have to think about a hawkBit plugin mechanism. Maybe @michahirsch has a good idea how to structure this. Spring auto configuration should be a good basis for such a plugin mechanism. |
as @kaizimmerm mentioned we are thinking about a place in the hawkBit repository like plugins, addons or extensions which can be contributed and hosted in the hawkBit Github repository and plugged in using the Spring-Configuration mechanism. We'll come up with a concept and example but I would definitely split up the functionality of complete action and installed DS and the functionality to automatically do it based on an update event into different maven-modules. |
@kaizimmerm and @michahirsch |
@kaizimmerm and @michahirsch |
@singh-himanshu recently I have been looking at this problem, and seeing that you are already working on it, perhaps I could join-in and help? |
@a-sayyed, as an initial implementation, instead of leveraging the PutConfigData and TargetUpdatedEvent as suggested by @StBurcher and @kaizimmerm , we currently provide an additional API to directly create a software module, a distribution set, assign it to specified controllers and then close the action. |
Hi everyone, I have a client request that needs the manual insert of a finished action through Management API/UI. So I would teach repository and management API to do this (which is basically the following part of what I described above):
However, has anyone done this already and can a pull request be expected soon? Otherwise I would start looking into this. Kai |
We did work out an implementation by creating an extension project to add an API that can take a multi-part request in case we want to upload the artefacts as well to hawkBit. Approach is essentially similar to suggested above, i.e. extend JpaDeploymentManagement. Following is an excerpt from developer comments. Although I'll have to check whether we are ready to push it upstream already.
|
Uhh, thats much bigger than what I need :) Well, I am looking forward to see that pull request. I would assume that 5/6 are a feature on its own (and pretty much what I am looking for). The DDI extension is another one. One question on that one already. Are you sure that its needed to be done for group of devices hawkBits DDI security is single controller based, i.e. there is no security mechanism to authorise device on DDI to handle stuff for other devices. So if you need to do it for multiple devices would management API (with the extension to create "completed" actions) not be the right tool as well for you? There is the alternative of course that you go back to single device handling and keep this a DDI feature if its needed there. Anyway, if you could provide the DeploymentManagement extension to create offline updates as a pull request I could move on from there with the Management API extension and you could contribute the DDI extension later. Smaller pull requests make the whole review process a lot faster as well ;) As alternative I could take care of the DeploymentManagement extension and you integrate this into your contribution. Let me know what you think. |
Yes the implementation is a bit big as its done as a new extension project that provides a single point to (a) upload the artefacts to hawkBit, (b) create software modules using them, (c) find a 'best' DistributionSetType, and (d) create a completed action for all controllers.
You are right, actually we created a management API and not a DDI. Guess the URL mapping was left to be updated. Later if we need to support self registration from devices, we can add a DDI API. |
Please check this pull request: #563 which should do the trick. |
When having to manually update a device, e.g., for failure-recovery from a bad update, it would be nice to have a means to record this manual update into hawkBit's history so that it can serve as the single source of truth regarding the updates done to a device.
Currently, one can simulate the effect by creating an according softwaremodule/distributionset and "installing" that update on a device simulator resembling the real device in terms of configuration. However, this is a bit tedious and may mess up the history, e.g., in case the real device has performed an update in the meantime.
The text was updated successfully, but these errors were encountered: