A cartridge is a container for a framework, load balancer or data management system. You can add a cartridge in a platform as a service (PaaS) for scalability. A sample cartridge definition, together with information on all the properties that can be added in a cartridge definition JSON are as follows:
...
Excerpt | ||
---|---|---|
|
...
Property definitions
All the properties that correspond to the cartridge parameter resource are explained as follows:
...
Property | W | R | U | Description | M | DV | Data Type | Example | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
JSON | UI | ||||||||||||||||
| Protocol | √ | √ | The protocol that is used to map the ports | Yes | N/A | String | http | |||||||||
| Port | √ | √ | The port to which the cartridge is mapped | Yes | N/A | Int | 80 | |||||||||
| Proxy Port | √ | √ | The proxy port to which the cartridge is mapped | Yes | N/A | Int | 8280 | |||||||||
| Kubernetes Port Type | √ | √ | The Kubernetes port type to which the cartridge is mapped
| No | N/A | String | NodePort |
...
The IaaS provider properties will override the cartridge level properties that are defined in the <PRIVATE_PAAS_HOME>/repository/conf/cloud-controller.xml
.
...
Panel | |||
---|---|---|---|
These abbreviations are used in the following table to specify the names of the IaaS:
|
Property Name | Relevant IaaS | Description | Default Value | Example Values | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
E | O | K | ||||||||||||
associatePublicIpAddress | √ | X | X | When using virtual private cloud (VPC) this property needs to be assigned to true, so that your cartridge instance will be assigned a public IP. | true | true, false | ||||||||
autoAssignIp | √ | √ | X | This is used to determine whether your cartridge will be assigned a public IP or private IP. If this property, is true a public IP will be assigned to your cartridge. If this property is false the IP will be assigned manually. | true | true, false | ||||||||
availabilityZone | √ | √ | X | The name of the availability zone.
| N/A | ap-southeast-1a | ||||||||
blockUntilRunning | X | √ | X | This will determine whether or not the instance spawning call to the IaaS will be blocked, in order to retrieve IP addresses. If you wish to auto assign IPs, the instance spawning call should be blocking, but if you wish to assign IPs manually, it can be non-blocking. | false | true, false | ||||||||
defaultFloatingIpPool | X | √ | X | If the floating IPs have not been pre-allocated for the respective tenant, when launching a cartridge, the floating IP allocation will fail. This property is used to specify the name of the floating IP pool that needs to be used. | N/A | PublicPool1 | ||||||||
| √ | √ | X | The type of instance that determines the instance size, which needs to be used. In OpenStack this is referred to as flavor.
| N/A | EC2 m1.small OpenStack RegionOne/2 | ||||||||
keyPair | √ | √ | X | The name of the private key that corresponds to the key pair used to connect to the instance. | N/A | apache-stratos-key1 | ||||||||
securityGroupIds | √ | √ | X | When defining a security group in a VPC scenario, this property should be used instead of the securityGroups property. | N/A | sg-c999f7a6 | ||||||||
securityGroups | √ | √ | X | The name of the security group that is used to define the IP filter rules for the instance. | N/A | sg-c999f7a6 | ||||||||
shellType | X | X | X | The type of shell scripting language being used in the cartridge. This property is used to identify the correct customization script to use when passing the payload to the cartridge. | N/A | bash, sh, cmd | ||||||||
subnetId | √ | X | X | ID used to identify the virtual private cloud (VPC). For more information, go to Amazon VPC. | N/A | subnet-3b8a7d2g | ||||||||
tag | √ | X | X | A tag is a name value pair used to filter instances. For more information, go to Using Tags. | N/A | a | ||||||||
tags | √ | X | X | Defines the names of multiple tags. For example: <property name="tags" value="a,b,c,d" /> | N/A | a,b,c,d | ||||||||
KUBERNETES_CONTAINER_CPU | X | X | √ | 0 | ||||||||||
KUBERNETES_CONTAINER_MEMORY | X | X | √ | 0 | ||||||||||
KUBERNETES_SERVICE_SESSION_AFFINITY | X | X | √ | ClientIP |
IaaS specific payload parameter
Property Name | Relevant IaaS | Description | Example Values | ||
---|---|---|---|---|---|
E | O | K | |||
START_CMD | X | X | √ | PCA |
persistence
Property | W | R | U | Description | M | DV | Data Type | Example | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
JSON | UI | ||||||||||||||
| Is Required | √ | √ | Whether an extra volume is required is required to be attached to the cartridge to store content | No | N/A | Boolean | true | |||||||
| Volume | √ | √ | Details of the persistence volume that should be attached to the cartridge. For more information on the sub-properties, see volumes. | No | N/A | volumes array | N/A |
...