The difference between a Cartridge XML file for a Carbon and non-carbon XML file is the fact that non-carbon XML files have an additional section that defines port mapping.
Carbon Cartridge XML
<cartridges> <cartridge type="appserver" host="appserver.stratos.wso2.com" provider="wso2" version="5.0.2" multiTenant="true"> <displayName>WSO2 Application Server</displayName> <description>Enterprise-ready, scalable web services and web app hosting platform powered by Apache Axis2 and Apache Tomcat.</description> <iaasProvider type="ec2" > <imageId>ap-southeast-1/ami-2f6d237d</imageId> <maxInstanceLimit>50</maxInstanceLimit> <property name="instanceType" value="m1.large"/> </iaasProvider> <deployment baseDir="/opt/wso2as"> <dir>axis2modules=copy#app#files#here</dir> <dir>axis2services=copy#saml#libraries#here</dir> <dir>jaggeryapps=copy#saml#libraries#here</dir> <dir>jaxwebapps=copy#saml#libraries#here</dir> <dir>modulemetafiles=copy#saml#libraries#here</dir> <dir>servicemetafiles=copy#saml#libraries#here</dir> <dir>webapps=copy#saml#libraries#here</dir> </deployment> <portMapping> <http port="80" proxyPort="8280"/> <https port="443" proxyPort="8243"/> </portMapping> </cartridge> </cartridges>
Non-Carbon Cartridge XML
<cartridges> <cartridge type="php" host="php.stratos.wso2.com" provider="zend-provider" version="5.5" multiTenant="false"> <displayName>PHP</displayName> <description>PHP Cartridge</description> <iaasProvider type="ec2" > <imageId>ap-southeast-1/ami-d0cc8382</imageId> <maxInstanceLimit>250</maxInstanceLimit> <property name="instanceType" value="t1.micro"/> <property name="securityGroups" value="default"/> <property name="instanceType" value="m1.large"/> <property name="payload" value="resources/as-ec2.txt"/>--> </iaasProvider> <deployment baseDir="/var/www"> <dir>www=copy#app#files#here</dir> <dir>simplesamlphp=copy#saml#libraries#here</dir> <dir>sql=copy#saml#libraries#here</dir> </deployment> <portMapping> <http port="80" proxyPort="8280"/> <https port="443" proxyPort="8243"/> </portMapping> </cartridge> </cartridges>
Element Definitions
Click the respective element link for in-depth information.
cartridge
Criteria | Description |
---|---|
XML Syntax | <cartridge> |
Description | Defines the various Cartridge elements available. There can be 1..n Cartridge elements. |
Mandatory/Optional | Mandatory |
Attribute | type |
Type | String |
Mandatory/Optional | Mandatory |
Attribute | host |
Type | String |
Mandatory/Optional | Mandatory |
Attribute |
|
Type | String |
Mandatory/Optional | Mandatory |
Attribute | version |
Type | String |
Mandatory/Optional | Mandatory |
Elements |
property
Criteria | Description |
---|---|
XML Syntax | <property/> |
Description | Defines the various Cartridge properties available. |
Mandatory/Optional | Optional |
Attribute | name |
Type | String |
Mandatory/Optional | Mandatory |
Attribute | value |
Type | String |
Mandatory/Optional | Mandatory |
displayName
Criteria | Description |
---|---|
XML Syntax | <displayName> |
Description | Cartridge name. |
Type | String |
Mandatory/Optional | Optional |
description
Criteria | Description |
---|---|
XML Syntax | <description> |
Description | Cartridge description. |
Type | String |
Mandatory/Optional | Optional |
iaasProvider
Criteria | Description |
---|---|
XML Syntax | <iaasProvider> |
Description | A Cartridge element should add a reference to an existing IaaS provider or a completely new IaaS Provider needs to be created. This section is used to create a new IaaS Provider. |
Mandatory/Optional | Mandatory |
Attribute | type |
Description | Unique attribute used when creating a new IaaS Provider. |
Type | String |
Mandatory/Optional | Mandatory |
Elements | imageId | property |
imageId
Criteria | Description |
---|---|
XML Syntax | <imageId> |
Description | Unique ID of the image. |
Type | String |
Mandatory/Optional | Optional |
property
Criteria | Description |
---|---|
XML Syntax | <property/> |
Description | In this case the property sub-element defines the properties of the IaaS provider. A Cartridge element can have 0..n properties. The properties specified under the matching iaasProvider child elements in the Cloud Controller XML will be overwritten by the properties specified under the matching iaasProvider child elements in the Cartridge XML. |
Mandatory/Optional | Optional |
Attribute | name |
Type | String |
Mandatory/Optional | Mandatory |
Attribute | value |
Type | String |
Mandatory/Optional | Optional |
deployment
Criteria | Description |
---|---|
XML Syntax | <deployment> |
Description | This is required for the GIT repo creation. |
Attribute | baseDir |
Description | This attribute should point to a valid path in the service instance, as it is the location from where a GIT repo is cloned. |
Type | String |
Mandatory/Optional | Optional |
Elements | dir |
dir
Criteria | Description |
---|---|
XML Syntax | <dir> |
Description | All directories that have to be created newly in the GIT repo can be added individually in this manner. |
Type | String |
Mandatory/Optional | Optional |
portMapping
Criteria | Description |
---|---|
XML Syntax | <portMapping> |
Description | This element is required if the Cartridge is a non-carbon Cartridge. |
Type | complex |
Mandatory/Optional | Optional |
Elements | http | https |
http
Criteria | Description |
---|---|
XML Syntax | <http/> |
Description | Port mapping for http. |
Mandatory/Optional | Mandatory |
Attribute | port |
Description | http port of the non-carbon Cartridge instance. |
Type | String |
Mandatory/Optional | Mandatory |
Attribute | proxyPort |
Description | http port of the ELB |
Type | String |
Mandatory/Optional | Mandatory |
https
Criteria | Description |
---|---|
XML Syntax | <https/> |
Description | Port mapping for https. |
Mandatory/Optional | Optional |
Attribute | port |
Description | https port of the non-carbon Cartridge instance. |
Type | String |
Mandatory/Optional | Mandatory |
Attribute | proxyPort |
Description | http port of the ELB |
Type | String |
Mandatory/Optional | Mandatory |