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

ParameterDescriptionRequiredDefault valueExample value
typeType of the cartridgeYesN/Aphp
providerProvider of the cartridgeYesN/Aapache
hostDomain where the cartridge will be hostedYesN/Astratos.org
displayNameThe name in which the cartridge will be displayedYesN/APHP
descriptionA short description about the cartridgeNoN/A

PHP Cartridge

versionThe version of the cartridge applicationYesN/A7
defaultAutoscalingPolicyThe auto-scaling policy used by the cartridgeYesN/A

economyPolicy

multiTenantWhether the cartridge supports multi tenancyYesfalsetrue/false
portMapping

Details of the port mapped to the cartridge

 Add parameter definitions on multiple port mappings if required.

YesN/AN/A
iaasProvider

Details of the IaaS provider that is used for the cartridge

If required, add parameter definitions on multiple IaaS providers. These values will override the values in the cloud-controller.xml file, which is in the <CC_HOME>/repository/conf/ directory.

YesN/AN/A
loadBalancerDetails of the load balancer that is used for the cartridgeYesN/AN/A
persistenceDetails of the persistence volume that should be attached to the cartridgeNoN/AN/A
portMapping
ParameterDescriptionRequiredDefault valueExample value
protocolThe protocol that is used to map the portsYesN/A

http

portThe port to which the cartridge is mappedYesN/A80
proxyPortThe proxy port to which the cartridge is mappedYesN/A8280
iaasProvider
ParameterDescriptionRequiredDefault valueExample value
typeType of the IaaS providerYesN/Aec2
imageIdThe unique ID of the IaaS imageYesN/A

ap-southeast-1/ami-2e0d5a7c

maxInstanceLimitThe maximum instances that will be spawned in the IaaSYesN/A4
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 use this property parameter to define other dynamic parameters and their corresponding values that need to be set when an instance is spawned.

YesN/AN/A
networkInterfaces

The list of network configuration tuples attached when launching cartridges. The possible values for networkInterfaces tuples are as follows:

  • OpenStack:
    {"networkUuid","fixedIp","portUuid"}
  • AWS EC2:
    {"networkUuid"}
NoN/A

fb9c21f4-0672-48b2-8279-77334bb63a53

loadBalancer
ParameterDescriptionRequiredDefault valueExample value
typeType of the IaaS providerYesN/Alb
propertyThe load balancer properties are listed as name value pairs.YesN/AN/A
persistence
ParameterDescriptionRequiredDefault valueExample value
isRequiredWhether an extra volume is required to be attached to the cartridge to store contentNoN/Atrue
volumeDetails of the persistence volume that should be attached to the cartridgeNoN/AN/A
volume
ParameterDescriptionRequiredDefault valueExample value
deviceLinux device of the volume that will be mounted to the mapping pathNoN/A/dev/sdc
mappingPathFolder path of the directory onto which the Linux device will be mountedNoN/A/home/ubuntu/sdc
sizeCapacity of the persistence volume that should be attached to the cartridgeYes. But the value provided here will be overridden, if a different value will be provided during subscription.N/A11
removeOnTermination

Whether the volume should be removed after termination of the instance

If the value is set to false, the volume and its data will exist even after the instance is terminated, so that the data will not be deleted.

NoN/Afalse
property
ParameterDescriptionRequiredDefault valueExample value
nameName of the propertyYesN/AinstanceType, default.load.balancer
valueValue corresponding to the propertyYesN/Am1.medium, true
  • No labels