Skip to content
Svyatoslav Reyentenko edited this page Aug 2, 2012 · 17 revisions

Workflow declaration in genesis template consists of steps to be executed by genesis within workflow.

Step can be viewed as a piece of functionality to be executed.

Step may receive various input parameters that affect its execution. Actual value might be one of following types:

Constant (or any valid groovy expression that can be evaluated to constant) Reference to variable (declared in variables block) Expression based on execution context access Common step declaration look as follows:

stepName {
   inputParameter = value
   secondParameter = anotherValue
}

Actual parameters are part of step api and should be looked for in step documentation.

Genesis provide base interface GenesisStep with predefined parameters (note: not every step have to provide these as their api):

Parameter name Type Description
phase String phase and precedingPhases is used by genesis flow coodinator to determine the order of step execution within workflow
precedingPhases List of strings See phase
ignoreFail Boolean Specify if workflow should not be considered as failed in case of step fail, if true - workflow execution will be continued regardless of step result
retryCount Integer Number of attempts to run a step in case of fail result
exportTo Map Declares list of pairs (source, target), where source - is a name of step result, target - name in execution context to store step result

Example

steps {
    provisionVms {
       phase = "first-node-provision"
       roleName = "dbnode"
       hardwareId = "2"
       imageId = "16"
       quantity = 1
       exportTo = ["virtualMachines": "vms"]
   }
   provisionVms {
      phase = "second-node-provision"
      precedingPhases = ["first-node-provision"]
      roleName = "xwikinode"
      hardwareId = "2"
      imageId = "16"
      quantity = 1
  }
}

Defined steps

Servers/Virtual machines management:

CI:

Chef:

Running shell commands

Misc

Clone this wiki locally