Skip to end of metadata
Go to start of metadata

A deployment policy defines how (such as, which partition algorithm to use etc.) and where to spawn cartridge instances, it defines the maximum instances that will be allowed in a service cluster. Deployment policies are defined by DevOps based on deployment patterns. The deployment policies that are referred to in the deployment policy have to be added to Stratos before the deployment policy is added. A sample deployment policy definition, together with information on all the properties that can be added in deployment policy definition JSON are as follows:

Sample deployment policy definition JSON

The following are sample configurations that can be used in a JSON to define a deployment policy:

Property definitions

All the properties that correspond to the deployment policy resource are explained as follows: 

Main property definitions

PropertyDescriptionData
Type 
Example
Value 
JSONUI
idDeployment policy IDXID of the deployment policy.YesN/AString

deployment-policy-1

networkPartitions Network Partitions 

This defines one or more partitions that are network bound and where communication among the partitions take place very efficiently. For example, in EC2 a partition group can be defined with multiple partitions that belong to the same region. For more information on network partitions, see Network Partitions. For more information on the sub-properties, see networkPartitions.

YesN/AnetworkPartitions arrayN/A

Sub-properties

networkPartitions
PropertyDescriptionData
Type 
Example
Value
JSONUI
idNetwork Partition IDX Unique ID of the network partition.YesN/A Stringopenstack_R1
provider  The name of the IaaS provider.YesN/AString 

partitionAlgo

Network Partition Algorithm 

The sequence used to spawn up instances between partitions when scaling up. The available partition algorithms are as follows:

  • One after another
  • Round robin
YesN/AStringround-robin,
one-after-another
partitions Partitions The conditions that will be applied to the partitions that need to be deployed. For more information on the sub-properties, see partitions.YesN/Apartitions arrayN/A
partitions
PropertyDescription

Data
Type 

Example
Value
JSONUI
idPartition IDX Unique ID of the partition. YesN/A String P1
description            
  A summarized description on the partition.  String 
property       
  Properties that correspond to the partition can be sent as name value pairs. For more information on the sub-properties, see property.  property array 

partitionMax

partitionMax Maximum number of instances that can be handled by a partition. For group this means the maximum group instances that can be in a partition. For a cluster this means the maximum members that can be maintained for a cluster instance in a partition. YesN/AInt6
property

Property

Description

Data
Type

Example

JSON

UI

name

Name 

Name of the property.

Yes

N/A

String

region, zone

value

Value 

Value corresponding to the property.  

Yes

N/A

String

al-southeast-1,
ap-southeast-1a

  • No labels