* Remove process and discard upload buttons; change upload process to only have one upload status window that is displayed immediately when an upload is triggered. * Separation of FileTransferHandler: FileTransferHandler was split into 3 parts. One common part remains in the abstract super class. The other pieces were moved to the upload-specific and the streaming-specific subclasses. * Fix upload process: Fix status visualization in progress window. Move repository transfer to the file upload handler so it can report if the complete upload process succeeded or failed. * Prevent file upload if no software module or more than one is selected. * Added Unit Tests and fixed Sonar findings. * Move upload button from the buttom to the right side of the drag and drop area. * Remove minimize and resize buttons in progress dialog. Remove unused code. * Code cleanup and layout adaptions: Remove unnecessary code and fix layout problems when showing the upload button on the right side of the drag and drop area. * Removed abort functionality for user because of Vaadin bug https://github.com/vaadin/framework/issues/10545 * Fixed Vaadin upload bug by subclassing Upload and overriding necessary methods. * Disable drag-and-drop area in case no OR more than one software module selected. * Enhance /adapt unit tests * Enhance /adapt UI tests Signed-off-by: Markus Block <markus.block@bosch-si.com> * First draw, insert delete button in entity tables * Add shortcuts to cancel/confirm buttons in confirmation dialog * First draw, target/distribution assignment * Entity assignments for tables * Fix table row mark correctly when assigning entities * Mark the right entity in table when deleting an entity * Refactor code for distribution tags on deployment view * Target Tags can be managed with Menu Bar * Refactor classes for managing tags and types for all entities * Disable fields correctly when updating/deleting tags and types * Remove delete and action buttons in the bottom * Delete Metadata column in tables * Redesign tables for tags and types. Show action icon for update/delete * Correct CSS for menubar for tag/type actions * Add confirmation window when deleting tag or type * Remove unused code. Fix style for target tag config menu bar * New abstract classes for target/ds tags * Reorganize package structure tags, set ids for tags * Add total targets count in target table, add close icon for menubar * Add total target label and remove footer styles * MenuBar is displayed when update/delete action is cancelled, finished, or update/delete modus is left * Insert EventHandling for show menuBar/CancelButton * Delete drag & drop criteria where not needed anymore * Fix mandatory field check in DistributionTypeLayout * Fix notification message * Move upload button into drop area * Enhance /adapt unit tests * Enhance /adapt UI tests Signed-off-by: Melanie Retter <melanie.retter@bosch-si.com>
hawkBit metadata repository
The repository is in charge for managing the meta data of the update server, e.g. provisioning targets, distribution sets, software modules etc.
Build
[indent=0]
$ mvn clean install
Note, in order to build correctly in your IDE, you have to add ./target/generated-sources/apt to your build path.
#Concepts
Rollout
A rollout consists of the distribution set and a target-query-filter which defines the targets to be updated in this rollout. The targets within this filter are split up in configured amount of Deployment Groups at creation time.
When starting a rollout, for all targets within this rollout deployment actions will be created. The deployment actions of the first group will be started immediately all other deployment actions will be scheduled.
Due rollouts might include a large number of targets and deployment group, creation as well as starting a rollout might take some time and therefore the creation and starting of an rollout is executed asynchronously. The creation and starting progress is reflected by the rollout's status attribute
Rollout Creation
The targets reflected by the target-query-filter is interpreted at creation time. Only targets which have been created at that time are included in the rollout. Targets which are created after the rollout creation will not be included. At rollout creation time all necessary deployment groups containing the targets will be created. Dynamically adding targets to a created or running rollout is currently not supported.
Rollout Starting
The rollout is using the same concept based on deployment acionts per target. All necessary deployment acionts will be created at starting point but not all deployment acionts will be set to running. Only the deployment acionts of the first deployment group is set to running, all other actions are created in scheduled state.
If targets having not finished deployment actions at rollout starting time, these action are tried to cancel (state: canceling). Scheduled actions from another rollout are canceled directly on server side because they were never running before and can be safely canceled.
Multiple rollouts can be running at the same time, but if the rollouts effect the same targets they will interfer the targets deployment actions e.g. canceling/cancel already running/scheduled deployment actions.
Deployment Group Condition/Action
Success Condition/Action
A success condition defines when a deployment group is interpreted as success and triggers the success action. E.g. a threshold of successfully updated targets within the group.
The success action is executed if the success_condition is fullfilled. Currently only the success action starting the next following deployment group is available.
Error Condition/Action
A error condition defines when a deployment group is interpreted as failure and triggers the error action. E.g. a threshold of update failures of targets within the group.
The error action is executed if the error condition is fullfilled. Currently only the error action pausing the whole rollout is available, a paused rollout can be resumed by a user.
Rollout Scheduler
The rollout is managed by a scheduler task which is checking for rollouts in running state. This is done atomic by updating the row in the database, so only the rollouts are checked and processed for the current instance to avoid that multiple instances are processing a rollout.
Due the scheduler, it might take some time until a rollouts is processed and switching is state or starting the next deployment group.