Deployment Policy Resource Definition
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 WSO2 Private PaaS 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:
{
"id": "deployment-policy-1",
"networkPartitions": [
{
"id": "network-partition-mock",
"partitionAlgo": "round-robin",
"partitions": [
{
"id": "partition-1",
"partitionMax": 2
}
]
}
]
}
Property definitions
All the properties that correspond to the deployment policy resource are explained as follows:
|
|
|
|
|
Main property definitions
Property | W | R | U | Description | M | DV | Data Type | Example Value | |
---|---|---|---|---|---|---|---|---|---|
JSON | UI | ||||||||
id | Deployment policy ID | √ | √ | X | ID of the deployment policy. | Yes | N/A | String | 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. | Yes | N/A | networkPartitions array | N/A |
Sub-properties
networkPartitions
Property | W | R | U | Description | M | DV | Data Type | Example Value | |
---|---|---|---|---|---|---|---|---|---|
JSON | UI | ||||||||
id | Network Partition ID | √ | √ | X | Unique ID of the network partition. | Yes | N/A | String | openstack_R1 |
provider | √ | √ | The name of the IaaS provider. | Yes | N/A | String | |||
| Network Partition Algorithm | √ | √ | The sequence used to spawn up instances between partitions when scaling up. The available partition algorithms are as follows:
| Yes | N/A | String | round-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. | Yes | N/A | partitions array | N/A |
partitions
Property | W | R | U | Description | M | DV | Data | Example Value | |
---|---|---|---|---|---|---|---|---|---|
JSON | UI | ||||||||
id | Partition ID | √ | √ | X | Unique ID of the partition. | Yes | N/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 | √ | √ | 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. | Yes | N/A | Int | 6 |
property
Property | W | R | U | Description | M | DV | Data | Example | |
---|---|---|---|---|---|---|---|---|---|
JSON | UI | ||||||||
| Name | √ | √ | √ | Name of the property. | Yes | N/A | String | region, zone |
| Value | √ | √ | √ | Value corresponding to the property. | Yes | N/A | String | al-southeast-1, |