[go: up one dir, main page]

Skip to content

xebialabs-community/xld-custom-orchestrators-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XL Deploy Custom Orchestrators

Contents of this repository

This repository contains the source code for a number of custom orchestrators that can be used in XL Deploy 4.5+. Below you will find a quick introduction per orchestrator:

CI status

xld custom orchestrators plugin e5faea1be74e4efd8da851cc12765243 gpa License MIT yellow total

'sort-by-deployed-weight' Orchestrator

This orchestrator will group the deployment into a serial plan with all deltas sorted by type, weigh and name. Handy when precedence is required for deployeds of the same type.

'canary' Orchestrator

This orchestrator will make a 'canary' style deployment to the containers in the environment for specific deployables.

If you tag any deployables with the tag canary, XLD will group the deployment into 2 serial subplans where the first subplan contains the deployment of those deployables to a single container in the environment, and the second subplan contains the deployment to the rest of the containers.

In case you want to mark a specific container as the target for the first canary deployment, you need to additionally apply the tag birdcage on that container.

Note- Order of orchestrators also matter in case multiple orchestrators are used in a deployment. For e.g., If required to maintain order of deployment groups and if canary orchestrator is used along with sequential-by-deployment-group orchestrator then sequential-by-deployment-group should be used as 1st and canary as 2nd.

'parallel-by-deployable' and 'serial-by-deployable' Orchestrator

This orchestrator will group the deployment by deployable. This is similar to the standard parallel-by-container and serial-by-container orchestrators which group the deployment by container.

'parallel-by-container-throttled' Orchestrator

This orchestrator will group a deployment to multiple containers into multiple serial subplans, where each subplan deploys in parallel to all the containers in that subplan. This ensures that at any give time no more than the predefined number of containers is being deployed to.

This behaviour is configured by defining the maxContainersInParallel property on the udm.DeployedApplication. This property then shows up in the deployment level properties of the deployment where it can be configured.

synthetic.xml
    <type-modification type="udm.DeployedApplication">
        <property name="maxContainersInParallel" kind="integer" required="false" label="Maximum of containers to deploy to in parallel" description="The limit set on the 'parallel-by-container-throttle' orchestrator"/>
    </type-modification>

'parallel-by-container-global-token' Orchestrator

This orchestrator will deploy in parallel to all containers, but it will use a global token so that only so many containers at any given time are being deployed to. This is similar to the 'parallel-by-container-throttled' Orchestrator orchestrator, but does not use precalculated subplans.

The number of tokens that can be used during the deployment is configured using the maxContainersInParallel property on the udm.DeployedApplication. Defining this property ensures that it shows up in the deployment level properties where it can be configured.

synthetic.xml
  <type-modification type="udm.DeployedApplication">
      <property name="maxContainersInParallel" kind="integer" required="false" label="Maximum of containers to deploy to in parallel" description="The limit set on the throttling orchestrators"/>
  </type-modification>

NOTE: In order to use this orchestrator in the XLD 4.5.x range of products, you need to install the hotfix/hotfix-xld45x-tokens.jar in the hotfix directory of your XLD server.

'parallel-by-container-token-per-deployable' Orchestrator

This orchestrator will deploy in parallel to all containers, but it will use a token per deployable so that for any given deployable only a so many of the containers it is deployed to are down at any given moment during the deployment. This is similar to the 'parallel-by-container-global-token' Orchestrator orchestrator.

The number of tokens per deployable can be configured by defining the maxContainersInParallel property on (a subtype) of udm.BaseDeployed.

synthetic.xml
  <type-modification type="udm.BaseDeployed">
      <property name="maxContainersInParallel" kind="integer" required="false" label="Maximum of containers to deploy to in parallel" description="The limit set on the throttling orchestrators"/>
  </type-modification>

  <type-modification type="udm.BaseDeployable">
      <property name="maxContainersInParallel" kind="string" required="false" label="Maximum of containers to deploy to in parallel" description="The limit set on the throttling orchestrators"/>
  </type-modification>

NOTE: In order to use this orchestrator in the XLD 4.5.x range of products, you need to install the hotfix/hotfix-xld45x-tokens.jar in the hotfix directory of your XLD server.

'sequential-by-host-deployment-group'

This orchestrator will deploy sequentially to all containers group by their hosts, the sequence is sorted by the 'deploymentGroup' property.

'parallel-by-host-deployment-group'

This orchestrator will deploy in parallel to all containers group by their hosts, the sequence is sorted by the 'deploymentGroup' property.

'xl-release' orchestrator

This orchestrator will ensure that a step will be added to the plan that will complete a task in XL Release. It does so by injecting a Delta into the plan that contains a configured XLR task id. This injection only happens when the deployment meets all of the following conditions:

  • The xld-xlrelease-plugin is installed in XLD

  • The udm.DeployedApplication has an xlrTaskId property which has a value set.

  • The udm.Environment being deployed to container an xlrelease.Instance ConfigurationItem as a member

The task id is taken from the xlrTaskId property on the udm.DeployedApplication. Using the xlr-xldeploy-plugin you can inject this property into the deployment properties.

synthetic.xml
  <type-modification type="udm.DeployedApplication">
    <property name="xlrTaskId" kind="string" required="false" description="The ID of the XLR task to complete" />
  </type-modification>

'xl-release-gate-first' and 'xl-release-gate-last' orchestrators

These orchestrators will split up the deployment plan into two serial plans where either the first or the last contains the delta containing the xlrelease.CompletedTask deployed.

For this orchestrator to work you need to install the xld-xlrelease-plugin in your XL Deploy server.