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:
All the properties that correspond to the deployment policy resource are explained as follows:
Main property definitions
|Deployment policy ID||√||√||X||ID of the deployment policy.||Yes||N/A||String|
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.
|Network Partition ID||√||√||X||Unique ID of the network partition.||Yes||N/A||String||openstack_R1|
|√||√||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:
|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|
|Partition ID||√||√||X||Unique ID of the partition.||Yes||N/A||String||P1|
|√||√||A summarized description on the partition.||String|
|√||√||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|
Name of the property.
Value corresponding to the property.