Bug 463701 - Gyrex initialization and maintenance Framework
Summary: Gyrex initialization and maintenance Framework
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: gyrex (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Jürgen Albert CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-01 11:39 EDT by Jürgen Albert CLA
Modified: 2018-03-19 11:59 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jürgen Albert CLA 2015-04-01 11:39:22 EDT
Nearly every project needs some kind of initialization and configuration. E.g. the Database has to be initialized or zookeeper configurations have to be written. Furthermore are migration scripts required.

To address this a simple solution will be achieved, that is oriented on the concept of the database migration tool liquibase.

An abstract class with the following methods to implement will be provided:

IStatus doRun();
IStatus doRollback();
String getId();
String getScope()
MaintenanceStep shouldRunAfter();

The concept will be the following:

A Step will be registered as a service and executed automatically if necessary. A step can have a scope, that determines if the step should only run once for the whole cloud or on every node. A step can depend on a previous step. The order of the steps will be esteblished via the shouldRunAfter method. 

A step with a given ID will run only once in its scope and the result will be noted in the zookeeper. In the case that the doRun throws an Exception or returns a status that is not okay doRollback will be executed, to make cleanup of half finished jobs possible.
Comment 1 Gunnar Wagenknecht CLA 2015-04-08 07:30:28 EDT
Assigning to you Jürgen!
Comment 2 Eclipse Genie CLA 2015-04-22 09:33:38 EDT
New Gerrit change created: https://git.eclipse.org/r/46252

WARNING: this patchset contains 2680 new lines of code and may require a Contribution Questionnaire (CQ) if the author is not a committer on the project. Please see:https://wiki.eclipse.org/Project_Management_Infrastructure/Creating_A_Contribution_Questionnaire