Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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:

...

The following are sample configurations that can be used in a JSON to define a cartridge:

Property definitions

All the properties that correspond to the cartridge parameter resource are explained as follows: 

...

...

...

Excerpt-include

...

Code Block
 {
  "type": "php",
  "provider": "apache",
  "category": "data",
  "host": "php.stratos.org",
  "displayName": "php",
  "description": "php Cartridge",
  "version": "7",
  "multiTenant": "false",
  "portMapping": [
    {
	  "name": "http-80",
      "protocol": "http",
      "port": "80",
      "proxyPort": "8280"
	  "kubernetesPortType": "NodePort"
    },
    {
      "name": "http-22",
      "protocol": "tcp",
      "port": "22",
      "proxyPort": "8222"
	  "kubernetesPortType": "NodePort"
    }
  ],
  "deployment": {
    
  },
  "iaasProvider": [
    {
      "type": "mock",
      "imageId": "RegionOne/b4ca55e3-58ab-4937-82ce-817ebd10240e",
      "networkInterfaces": [
        {
          "name": "network-non-routable",
          "networkUuid": "b55f009a-1cc6-4b17-924f-4ae0ee18db5e"
        },
      ],
      "property": [
        {
          "name": "instanceType",
          "value": "RegionOne/aa5f45a2-c6d6-419d-917a-9dd2e3888594"
        },
        {
          "name": "keyPair",
          "value": "reka"
        },
        {
          "name": "securityGroups",
          "value": "default"
        }
      ]
    },
	{
			"type": "kubernetes",
			"imageId": "ap-southeast-1/ami­-70326522",
			"property": [],
			"networkInterfaces": []
	}
  ]
}

Adding a Cartridge
Adding a Cartridge
nopaneltrue

Property definitions

All the properties that correspond to the cartridge parameter resource are explained as follows: 

...

metadataKeysproperty
PropertyWRUDescriptionMDVData
Type 
Example
JSONUI
Anchor
type
type
type
Type Type of the cartridge.YesN/AStringphp, tomcat

Anchor
category
category
category

Category 

Category that the cartridge belong to. The possible categorizes are as follows: data, lb and framework

Info
iconfalse

For more information, see Customizing Cartridges.

YesN/A

String

framework, application, data, lb

Anchor
provider1
provider1
provider

Provider Provider of the cartridge.YesN/A

String

apache, php.net, wso2

Anchor
host
host
host

Host Domain where the cartridge will be hosted.YesN/A

String

stratos.org

Anchor
displayName
displayName
displayName

Display Name The name in which the cartridge will be displayed.YesN/A

String

PHP

Anchor
description
description
description

Description A short description about the cartridge.NoN/A

String

PHP Cartridge

Anchor
version
version
version

Version The version of the cartridge application.YesN/A

String

7
Anchor
loadBalancingIPType
loadBalancingIPType
loadBalancingIPType
Load Balancing IP Type   

Determines whether the members IP is private or public. If this property is set to 'private', the load balancer delegates requests to member's private IP address. If it is set to 'public', requests are delegated to the member's public IP address.

  Stringpublic, private

Anchor
multiTenant
multiTenant
multiTenant

Multi Tenant 

Whether the cartridge supports multi tenancy.

Info
iconfalse

For more information, see Customizing Cartridges.

YesfalseBooleantrue/false

Anchor
portMapping1
portMapping1
portMapping

Port Mapping 

Details of the port mapped to the cartridge. For more information on the sub-properties, see portMapping.

Info

 Add parameter definitions on multiple port mappings if required.

YesN/AportMapping arrayN/A

Anchor
deployment1
deployment1
deployment

- The deployment details need to be specified when working with Kubernetes. For more information on the sub-properties, see deployment.NoN/Adeployment 

Anchor
iaasProvider1
iaasProvider1
iaasProvider

iaas Provider 

Details of the IaaS provider that is used for the cartridge. For more information on the sub-properties, see iaasProvider.

Info

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 <PRIVATE_PAAS_HOME>/repository/conf/ directory. Where <PRIVATE_PAAS_HOME> is the location of the unzipped PPaaS binary package.

YesN/AiaasProvider arrayN/A

Anchor
persistence1
persistence1
persistence

Persistence 

Details of the persistence volume that should be attached to the cartridge. For more information on the sub-properties, see persistence.

Info
iconfalse

For more information, see Customizing Cartridges.

NoN/ApersistenceN/A
Anchor
metadataKeysmetadataKeys       

String

 
Anchor
property1property1       ApersistenceN/A
Anchor
metadataKeys
metadataKeys
metadataKeys
  List down the meta data keys used by the cartridge.  

String

 
Anchor
property1
property1
property
  

Cartridge related properties are listed as name value pairs. Payload parameters and Iaas specific parameters can be defined as follows.

{"name":"payload_parameter.CONFIG_PARAM_CLUSTERING","value":"true"}, {"name":"KUBERNETES_CONTAINER_CPU","value":"0"}

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.

  property array 

Sub-property definitions

...

PropertyWRUDescriptionMDVData
Type 
Example
JSONUI
Anchor
protocol
protocol
protocol
Protocol The protocol that is used to map the portsYesN/AString

http

Anchor
port
port
port
Port The port to which the cartridge is mappedYesN/AInt80
Anchor
proxyPort
proxyPort
proxyPort
Proxy Port The proxy port to which the cartridge is mappedYesN/AInt8280

Anchor
kubernetesPortType
kubernetesPortType
kubernetesPortType

Kubernetes Port Type 

The Kubernetes port type to which the cartridge is mapped

Info

The following can be assigned for the Kubernetes port type:

  • NodePort -  If this value is used, it will create a service which can be accessed from the outside with port range of 30,000 to 32,767.
  • ClusterIP - If this value is used, the service that gets created will not be exposed to the outside. This is useful if you don't want to expose a service to outside, but need to maintain internal communication within Docker containers.

Access URLs are generated only for the NodePort service type.

NoN/AStringNodePort

...

credentialnetworkInterfaces Network Interfaces

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"}

For more information on how multiple network interfaces are used in PPaaS, see Multiple Network Interfaces. For more information on the sub-properties, see networkInterfaces.

PropertyWRUDescriptionMDVData
Type 
Example
JSONUI
Anchor
type2
type2
type
Type Type of the IaaS providerYesN/AStringec2, mock, openstack, kubernetes

Anchor
name
name
name

-   Name of the IaaS provider.No

- Name of the IaaS provider.NoN/AString 

Anchor
className
className
className

- Class name of the Iaas ProviderNo String 
Anchor
imageId
imageId
imageId
Image ID The unique ID of the IaaS image.YesN/AString 

ap-southeast-1/ami-2e0d5a7c

Anchor
classNameprovider2className
provider2
className provider

-   The name of the IaaS provider. No String 

Anchor

imageId

identity

imageId

identity

imageId

identity

Image ID-  The unique ID Identity key of the IaaS image.YesN/AIaas Provider  Stringap-southeast-1/ami-2e0d5a7c 

Anchor
provider2credentialprovider2
credential
providercredential

-   The name Secret key used of the IaaS provider.Iaas Provider  String 
Anchor
identity
networkInterfaces1
identity
networkInterfaces1
identitynetworkInterfaces
-Network Interfaces      String 
Anchor
credentialcredential-      String 
Anchor
networkInterfaces1networkInterfaces1NoN/AnetworkInterfaces array

fb9c21f4-0672-48b2-8279-77334bb63a53

Anchor
property2
property2
property
Property 

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"}

For more information on how multiple network interfaces are used in PPaaS, see Multiple Network InterfacesIaaS 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. For more information, see IaaS provider properties. For more information on the sub-properties, see networkInterfaces property.

NoYesN/Aproperty arrayN/A

...

networkInterfaces

...

fb9c21f4-0672-48b2-8279-77334bb63a53

...

The IaaS provider properties are listed as name value pairs. It is mandatory that IaaS provider definitions include the following property configurations:

...

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. For more information, see IaaS provider properties. For more information on the sub-properties, see property.

...

networkInterfaces

...

fixedIp

PropertyWRUDescriptionMDVData
Type 
Example
JSONUI
Anchor
networkUuid
networkUuid
networkUuid            
Network UUID The universal unique identifier (UUID) that corresponds to the network.  Stringba667f72-7ba8-4b24-b360-b74a0211c83c
Anchor
fixedIp
fixedIp
fixedIp        
- The fixed IP that corresponds to the network.  String 
Anchor
portUuid
portUuid
portUuid            
Network UUID-  The universal unique identifier (UUID) that corresponds to the networkport.  Stringba667f72-7ba8-4b24-b360-b74a0211c83c 

Anchor

fixedIp

floatingNetworks1

fixedIp
floatingNetworks1
floatingNetworks

-   The fixed IP that corresponds to the network.For more information on the sub-properties, see  floatingNetworks.No  floatingNetworks
Stringarray anchor

...

floatingNetworks
portUuid
portUuid            
floatingNetworks
PropertyportUuid-   The universal unique identifier (UUID) that corresponds to the port.  String 
Anchor
floatingNetworks1floatingNetworks1-   For more information on the sub-properties, see  floatingNetworks.No floatingNetworks
array
 
floatingNetworks
name networkUuid floatingIP
PropertyWRUDescriptionMDVData
Type 
Example
JSONUI
Anchor
name2name2WRUDescriptionMDVData
Type 
Example
JSONUI

Anchor
name2
name2
name

- The name assigned to the floating network.NoN/AStringexternalThree

Anchor
networkUuid2
networkUuid2
networkUuid

- The universal unique identifier (UUID) that corresponds to the floating network .NoN/AStringba667f72-7ba8-4b24-b360-b74a0211c83c
Property NameRelevant IaaS   DescriptionDefault ValueExample Values
EOK
associatePublicIpAddressXXWhen using virtual private cloud (VPC) this property needs to be assigned to true, so that your cartridge instance will be assigned a public IP.truetrue, false
autoAssignIpXThis 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.truetrue, false
availabilityZoneX

The name of the availability zone.

Note

If you are using more than one partition, define the availability zone only in the cartridge definition and make sure not to define the availability zone in the cloud-controller.xml. This will enable the Autoscaler to dynamically select availability zone based on the partition.

N/Aap-southeast-1a
blockUntilRunningXX

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.

falsetrue, false
defaultFloatingIpPoolX XIf 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/APublicPool1

Anchor
floatingIP
floatingIP
floatingIP

- The name assigned IP that corresponds to the floating network.NoN/AStringexternalThree
Anchor
networkUuid2networkUuid2- The universal unique identifier (UUID) that corresponds to the floating network .NoN/AStringba667f72-7ba8-4b24-b360-b74a0211c83c
Anchor
floatingIPfloatingIP- The IP that corresponds to the floating network.NoN/AString192.168.17.227
property

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:

  • E = EC2
  • O = OpenStack
  • Kub = Kubernetes
instanceType192.168.17.227

...

property

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:

  • E = EC2
  • O = OpenStack
  • Kub = Kubernetes
Property NameRelevant IaaS   DescriptionDefault ValueExample Values
EOK
associatePublicIpAddressXXWhen using virtual private cloud (VPC) this property needs to be assigned to true, so that your cartridge instance will be assigned a public IP.truetrue, false
autoAssignIpXThis 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.truetrue, false
availabilityZoneX

The name of the availability zone.

Note

If you are using more than one partition, define the availability zone only in the cartridge definition and make sure not to define the availability zone in the cloud-controller.xml. This will enable the Autoscaler to dynamically select availability zone based on the partition.

N/Aap-southeast-1a
blockUntilRunningXX

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.

falsetrue, false
defaultFloatingIpPoolX XIf 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/APublicPool1

instanceType

X

The type of instance that determines the instance size, which needs to be used. In OpenStack this is referred to as flavor.

Note

The instance type value needs to be specified differently based on the IaaS.
For example:

IaaSValue Format
EC2N/A
OpenStack<REGION>/<ID>
N/A

EC2

m1.small

OpenStack

RegionOne/2

keyPairXThe type name of instance that determines the instance size, which needs to be used. In OpenStack this is referred to as flavor.
Note

The instance type value needs to be specified differently based on the IaaS.
For example:

IaaSValue Format
EC2N/A
OpenStack<REGION>/<ID>
N/A

EC2

m1.small

OpenStack

RegionOne/2

keyPairthe private key that corresponds to the key pair used to connect to the instance.N/Aapache-stratos-key1
securityGroupIds XWhen defining a security group in a VPC scenario, this property should be used instead of the securityGroups property.N/Asg-c999f7a6
securityGroupsXThe name of the private key that corresponds to the key pair used to connect to security group that is used to define the IP filter rules for the instance.N/Aapachesg-stratos-key1c999f7a6
securityGroupIds shellTypeX X XWhen defining a security group in a VPC scenario, this property should be used instead of the securityGroups propertyThe 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/Asg-c999f7a6securityGroupsbash, sh, cmd
subnetIdX XThe name of the security group that is ID used to define the IP filter rules for the instanceidentify the virtual private cloud (VPC). For more information, go to Amazon VPC.N/Asgsubnet-c999f7a63b8a7d2g
shellTypetagX X XThe 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/Abash, sh, cmdsubnetId

A tag is a name value pair used to filter instances. For more information, go to Using Tags.
For example: <property name="tag.a" value="x" />

N/Aa
tagsXXID used to identify the virtual private cloud (VPC). For more information, go to Amazon VPC.Defines the names of multiple tags. For example: <property name="tags" value="a,b,c,d" /> N/Asubnet-3b8a7d2gtaga,b,c,d
KUBERNETES_CONTAINER_CPUXXA tag is a name value pair used to filter instancesKUBERNETES_CONTAINER_MEMORYXX  0

Number of CPU cores used in a pod. With the value following suffices (E, P, T, G, M, K, m) or their power-of-two equivalents (Ei, Pi, Ti, Gi, Mi, Ki) can be used. If value is defined as zero, it will allow to use indefinite resources in the Kubernetes node. For more information, go to Using Tags.
For example: <property name="tag.a" value="x" />

N/Aa
tagsXXDefines the names of multiple tags. For example: <property name="tags" value="a,b,c,d" /> N/Aa,b,c,d
KUBERNETES_CONTAINER_CPUXX  0

Kubernetes resource model.

00, 0.3, 1, 300m
KUBERNETES_CONTAINER_MEMORYXXMemory usage of the pod. With the value following suffices (E, P, T, G, M, K, m) or their power-of-two equivalents (Ei, Pi, Ti, Gi, Mi, Ki) can be used. If value is defined as zero, it will allow to use indefinite resources in the Kubernetes node. For more information, go to Kubernetes resource model.00, 40Mi
KUBERNETES_SERVICE_SESSION_AFFINITYXX  Defines the session affinity that can be used with Kubernetes.NoneClientIP
IaaS specific payload parameter
Property NameRelevant IaaS   DescriptionExample Values
EOK
START_CMDXX PCA
Cartridge Payload Property Definitions 

Include Page
Cartridge Payload Property Definitions
Cartridge Payload Property Definitions

...

persistence
PropertyWRUDescriptionMDVData
Type 
Example
JSONUI
Anchor
isRequired
isRequired
isRequired
Is
Required
 Whether an extra volume is required is required to be attached to the cartridge to store contentNoN/ABooleantrue
Anchor
volumes1
volumes1
volumes
Volume Details of the persistence volume that should be attached to the cartridge. For more information on the sub-properties, see volumes. NoN/Avolumes arrayN/A

...

PropertyWRUDescriptionMDVData
Type 
Example
JSONUI

Anchor
id
id
id

-    String 
Anchor
device
device
device
Device Linux device of the volume that will be mounted to the mapping path.NoN/AString/dev/sdc
Anchor
mappingPath
mappingPath
mappingPath
Mapping Path Folder path of the directory onto which the Linux device will be mounted.NoN/AString/home/ubuntu/sdc
Anchor
size
size
size
Size 

Capacity of the persistence volume that should be attached to the cartridge

Info

If you provide different value during subscription, the value provided here is overridden.

YesN/AString11
Anchor
removeOnTermination
removeOnTermination
removeOnTermination
Remove on Termination   

Whether the volume should be removed after termination of the instance

Info

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/ABooleanfalse
Anchor
snapshotId
snapshotId
snapshotId
-    The snapshot from which the volume was created, if applicable.  String 
Anchor
volumeId
volumeId
volumeId
-    The ID of the volume.  String