Sample Cartridge Definition
The configurations included in a phpÂ-cartridge.json
 file are as follows:
{ "type":"php", "provider":"apache", "host":"stratos.org", "displayName":"PHP", "description":"PHP Cartridge", "version":"7", "defaultAutoscalingPolicy":"economyPolicy", "multiTenant":"false", "portMapping":[ { "protocol":"http", "port":"80", "proxyPort":"8280" }, { "protocol":"https", "port":"443", "proxyPort":"8243" } ], "iaasProvider":[ { "type":"ec2", "imageId":"ap-southeast-1/ami-2e0d5a7c", "maxInstanceLimit":"4", "property":[ { "name":"instanceType", "value":"m1.medium" }, { "name":"keyPair", "value":"xxxxxxxx" } ], "networkInterfaces": [ { "networkUuid": "fb9c21f4-0672-48b2-8279-77334bb63a53" }, Â { "networkUuid": "1e43f86f-4165-4f2e-8017-dd4cfb5548b0" } ], } ], "loadBalancer":{ "type":"lb", "property":{ "name":"default.load.balancer", "value":"true" } }, "persistence": { "isRequired": "true", "volume" : [ { "device": "/dev/sdc", "mappingPath": "/home/ubuntu/sdc", "size": "11", "removeOnTermination": "false" } ] } }Â
Parameter definitions
Cartridge definitions
Parameter | Description | Required | Default Value | Example Value |
---|---|---|---|---|
type | Type of the cartridge | Yes | N/A | php |
provider | Provider of the cartridge | Yes | N/A | apache |
host
| Domain where the cartridge will be hosted | Yes | N/A | stratos.org |
displayName
| The name in which the cartridge will be displayed | Yes | N/A | PHP |
description
| A short description about the cartridge | No | N/A | PHP Cartridge |
version
| The version of the cartridge application | Yes | N/A | 7 |
defaultAutoscalingPolicy | The auto-scaling policy used by the cartridge | Yes | N/A | economyPolicy |
multiTenant
| Whether the cartridge supports multi tenancy | Yes | false | true/false |
portMapping
| Details of the port mapped to the cartridge  You can add parameter definitions on multiple port mappings if required. | Yes | N/A | N/A |
iaasProvider
| Details of the IaaS provider that is used for the cartridge If required, you can add parameter definitions on multiple IaaS providers. These values you enter will override the values that you have entered in the | Yes | N/A | N/A |
loadBalancer
| Details of the load balancer that is used for the cartridge | Yes | N/A | N/A |
persistence | Details of the persistence volume that should be attached to the cartridge | No | N/A | N/A |
portMapping Â
Parameter | Description | Required | Default Value | Example Value |
---|---|---|---|---|
protocol | The protocol that is used to map the ports | Yes | N/A | http |
port | The port to which the cartridge is mapped | Yes | N/A | 80 |
proxyPort | The proxy port to which the cartridge is mapped | Yes | N/A | 8280 |
iaasProvider Â
Parameter | Description | Required | Default Value | Example Value |
---|---|---|---|---|
type | Type of the IaaS provider | Yes | N/A | ec2 |
imageId | The unique ID of the IaaS image | Yes | N/A | ap-southeast-1/ami-2e0d5a7c |
maxInstanceLimit | The maximum instances that will be spawned in the IaaS | Yes | N/A | 4 |
property | The IaaS provider properties are listed as name value pairs. It is mandatory that IaaS provider definitions include the following property configurations: { "name":"instanceType", "value":"m1.medium" }, { "name":"keyPair", "value":"xxxxxx" } Administrators can define other dynamic parameters together with its corresponding values appropriately, which need to be set when an instance is spawned, via this | Yes | N/A | N/A |
networkInterfaces | The list of network configuration tuples attached when launching cartridges. The possible values for
| No | N/A | fb9c21f4-0672-48b2-8279-77334bb63a53 |
loadBalancerÂ
Parameter | Description | Required | Default Value | Example Value |
---|---|---|---|---|
type | Type of the IaaS provider | Yes | N/A | lb |
property | The load balancer properties are listed as name value pairs. | Yes | N/A | N/A |
persistence
Parameter | Description | Required | Default Value | Example Value |
---|---|---|---|---|
isRequired | If an extra volume is required is required to be attached to the cartridge to store content | No | N/A | true |
volume | Details of the persistence volume that should be attached to the cartridge | No | N/A | N/A |
volume
Parameter | Description | Required | Default Value | Example Value |
---|---|---|---|---|
device | Linux device of the volume that will be mounted to the mapping path | No | N/A | /dev/sdc |
mappingPath | Folder path of the directory onto which the Linux device will be mounted | No | N/A | /home/ubuntu/sdc |
size | Capacity of the persistence volume that should be attached to the cartridge | Yes. But the value provided here will be overridden, if a different value will be provided during subscription. | N/A | 11 |
removeOnTermination | What should be done to the volume created after the termination of the instance, whether it should be removed or not. If the value is set to ' | No | N/A | false |
property
Parameter | Description | Required | Default Value | Example Value |
---|---|---|---|---|
name | Name of the property | Yes | N/A | instanceType, default.load.balancer |
value | Value corresponding to the property. | Yes | N/A | m1.medium, true |