This documentation is for WSO2 Private PaaS 4.1.0. View documentation for the latest release.
Page Comparison - Application Resource Definition (v.4 vs v.5) - WSO2 Private PaaS 4.1.0 - WSO2 Documentation

Versions Compared

Key

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

...

Table of Contents
maxLevel3

Sample application definition JSON

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

Excerpt Include
Adding an Application
Adding an Application
nopaneltrue

...

Panel
  • W = Writable
  • R = Readable
  • U = Updatable
  • M = Mandatory (Required)
  • DV = Default Value

Main properties

PropertyImage RemovedWImage RemovedRImage RemovedUDescriptionImage RemovedMImage RemovedDVData
Type
Example
JSONUI

Anchor
applicationId
applicationId
applicationId

Application IdXA unique ID to identify the application.YesN/AString
test_app_3

Anchor
multiTenant
multiTenant
multiTenant

 XWhether the application supports multi-tenancy.NofalseBooleantrue

Anchor
name1
name1

name

   XThe name of the applicationNoN/AString 

Anchor
description
description
description

   XA summarized description of the application.NoN/AString 

Anchor
status
status
status

  X   String 

Anchor
alias1
alias1
alias

AliasXThe alias for the applicationYesN/AString
phpapp2

Anchor
components1
components1
components  

ComponentsX

The components section for the applications will comprise of groups and cartridges. While, each of the children groups can have nested groups. For more information on the sub-properties, see components.

YesN/AcomponentsN/A

Anchor
property1
property1
property  

   XThis defines any properties that need to be passed in the application JSON. For more information on the sub-properties, see property.NoN/Aproperty arrayN/A

Sub-properties

components
PropertyImage RemovedWImage RemovedRImage RemovedUDescriptionImage RemovedMImage RemovedDVData
Type 
Example
JSONUI

Anchor
groups1
groups1
groups  

GroupsX

This section will have a list of groups that are referred in this application. The groups should have a reference to an already deployed cartridge group definitions using the group name. For more information on the sub-properties, see groups.

NoN/Agroups arrayN/A

Anchor
dependencies1
dependencies1
dependencies  

Dependencies  X

The dependencies define the order to instantiate and the groups and cartridges referred in the application definition. For more information on the sub-properties, see dependencies.

A sample rule for startup order is shown below:

"group.<GROUP_ALIAS>,cartridge.<CARTRIDGE_ALIAS>"

This would mean the group denoted by <GROUP_ALIAS> should be started before starting the cartridge denoted by <CARTRIDGE_ALIAS>. There can be multiple such rules. The rules should be applicable for only the top level groups and cartridges defined in the application. Startup orders for the elements in the groups will be defined in the group definition itself.

NoN/AdependenciesN/A

Anchor
cartridges1
cartridges1
cartridges

Cartridges  XDefines that cartridges that exist in the application. For more information on the sub-properties, see cartridges.NoN/Acartridges arrayN/A
groups
PropertyImage RemovedWImage RemovedR UDescriptionImage RemovedMImage RemovedDV

Data
Type

Example
JSONUI

Anchor
name2
name2
name

nameXThe name of the group.Yes Stringgroup2
Anchor
alias2
alias2
alias
aliasXThe alias of the group should be unique.Yes Stringmygroup2
Anchor
groupMinInstances
groupMinInstances
groupMinInstances
groupMinInstancesThe minimum number of instances that needs to be maintained in a group.Yes Int1
Anchor
groupMaxInstances
groupMaxInstances
groupMaxInstances
groupMaxInstancesThe maximum number of instances that needs to be maintained in a group.Yes Int2

Anchor
deploymentPolicy1
deploymentPolicy1
deploymentPolicy

   XThe deployment policy being used for the group  String 

Anchor
cartridges2
cartridges2
cartridges

 XDefines that sub-cartridges that exist within the group. For more information on the sub-properties, see cartridges.  cartridges array 
Anchor
groups2
groups2
groups
Groups  X

Defines the nested groups (sub-groups). The groups should have a reference to an already deployed group definition using the group name. For more information on the sub-properties, see groups.

No groups arrayN/A
dependencies

Property

Image RemovedWImage RemovedRImage RemovedUDescriptionImage RemovedMImage RemovedDVData
Type 
Example
JSONUI
Anchor
startupOrder
startupOrder
startupOrders
Startup OrdersX

The order in which the applications’s children (sub-groups and sub-cartridges) need to started up.

If it is a group, it should use the format of "group.<GROUP_ALIAS>" and if it is a cartridge, it should be "cartridge.<CARTRIDGE_ALIAS>" when defining startupOrder. Multiple startupOrders can also be defined as String array. However, the startupOrder should not create a cyclic dependency. By defining multiple startupOrders, parallel dependencies can be identified to start them in parallel.

For example if the application startupOrder is as follows:

Code Block
"startupOrders": [
  {
    "aliases": [
      "group.group2",
      "cartridge.tomcat"
    ]
  }
],
  • Based on this WSO2 Private PaaS will identify that group2 will need to start before tomcat. Initially, WSO2 Private PaaS will check the startupOrder in the group2 cartridge group definition, which appears as follows:

    Code Block
    "startupOrders": [
      {
        "aliases": [
          "group.group1",
          "cartridge.tomcat"
        ]
      }
    ],
  • Based on this Startos will identify that it needs to startup group1 before the tomcat cartridge. 

  • This will in turn require WSO2 Private PaaS to check the startupOrder in the group1 cartridge group definition.

  • If group1 does not have a startupOrder defined, WSO2 Private PaaS will start the tomcat and tomcat1 cartridges, which are in group1, in parallel to each other.
  • Thereafter, it will start the tomcat cartridge in group2.
  • Finally, it will start the tomcat cartridge, which has the mytomcat alias, defined in the application definition.
NoN/AstartupOrders array
group.mygroup2

Anchor
scalingDependents
scalingDependents
scalingDependents  

 X   scalingDependents array 
Anchor
terminationBehaviour
terminationBehaviour
terminationBehaviour
Termination BehaviourX

This determines how the instances need to be terminated. The terminationBehaviour has been explained provided the startupOrder is as follows:

Code Block
"startupOrders": [
  {
    "aliases": [
      "group.group2",
      "cartridge.tomcat"
    ]
  },
  {
    "aliases": [
      "group.group3",
      "cartridge.mytomcat222"
    ]
  }
],

The available terminationBehaviours are as follows:

  • terminate-none
    None of them will be terminated. For example, if something happens to mygroup1, it will not have an impact on the tomcat cartridge.
  • terminate-all
    All the elements in that dependency tree are terminated. For example, if something happens to any of mygroup1, then all the children of the group that mygroup1 belongs to, are terminated regardless of the other dependency information.
  • terminate-dependent
    Only the dependents will be terminated.
    For example, if something happens to group2, then tomcat is terminated. However, if any other cartridge or group is found in the parent group that group2 belongs to, then that cartridge or group will remain as it is in WSO2 Private PaaS.
NoN/AStringterminate-none
cartridges

Property

Image RemovedWImage RemovedRImage RemovedUDescriptionImage RemovedMImage RemovedDV

Data
Type 

Example
JSONUI
Anchor
type
type
type
Cartridge TypeXType of the cartridge.Yes StringPHP
Anchor
cartridgeMin
cartridgeMin
cartridgeMin
Cartridge MinThe maximum number of instances that needs to be maintained in a cartridge.Yes Int1
Anchor
cartridgeMax
cartridgeMax
cartridgeMax
Cartridge MaxThe minimum number of instances that needs to be maintained in a cartridge.Yes Int2
Anchor
subscribableInfo1
subscribableInfo1
subscribableInfo
Subscribable InfoX

Contains the information about all the subscribables that is a part of the cartridge.

The fields under artifactRepository must be updated when a cartridge belonging to the Framework category is added (e.g., PHP cartridge, Tomcat cartridge). For more information on the sub-properties, see subscribableInfo.

Yes subscribableInfo 
subscribableInfo

Property

Image RemovedWImage RemovedRImage RemovedUDescriptionImage RemovedMImage RemovedDV

Data
Type

Example
JSONUI
Anchor
alias3
alias3
alias
AliasXThe alias of the cartridge.YesN/AString
mygroup2tomcat

Anchor
deploymentPolicy2
deploymentPolicy2
deploymentPolicy

 X   String 
Anchor
autoscalingPolicy
autoscalingPolicy
autoscalingPolicy
Auto-scaling PolicyXThe autoscaling policy used by the cartridge.YesN/AString
autoscaling_policy_1
Anchor
maxMembers
maxMembers
maxMembers
   X   Int 
Anchor
minMembers
minMembers
minMembers
   X   Int 
Anchor
dependencyAliases
dependencyAliases
dependencyAliases
   X   String 
Anchor
artifactRepository1
artifactRepository1
artifactRepository
 X

The details of the remote Git repository that corresponds to the cartridge. The artifact repository details only need to be mentioned if the cartridge is a single tenant framework cartridge. For more information on the sub-properties, see artifactRepository.  

  artifactRepository 
Anchor
persistence1
persistence1
persistence
   XDetails of the persistence volume that should be attached to the cartridge.  For more information on the sub-properties, see persistence. For more information on persistence volume mapping, see Persistence Volume Mapping.  persistence 
Anchor
property2
property2
property
   XThis defines any properties that need to be passed in the application JSON. Generally, the properties will be listed as name value pairs. However, it is possible to pass the properties as payload parameters if required. For more information on the sub-properties, see property. For more information on how to pass the auto-commit property as a pay load parameter, see Auto Commit.  property
array
 
persistence

Property

Image RemovedWImage RemovedRImage RemovedUDescriptionImage RemovedMImage RemovedDVData
Type 
Example
JSONUI
Anchor
isRequired
isRequired
isRequired
   XWhether an extra volume is required to be attached to the cartridge to store content.  Boolean 
Anchor
volumes1
volumes1
volumes
   XDetails of the persistence volume that should be attached to the cartridge. Details of the persistence volume that should be attached to the cartridge. For more information on the sub-properties, see volumes.   volumes
array
 
volumes

Property

Image RemovedWImage RemovedRImage RemovedUDescriptionImage RemovedMData
Type 
Example
JSONUI
Anchor
id
id
id
   X  

String

 
Anchor
size
size
size
   XCapacity of the persistence volume that should be attached to the cartridge. 

String

 
Anchor
device
device
device
   X  

String

 
Anchor
removeOnTermination
removeOnTermination
removeOnTermination
   X

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.

 Booleantrue
Anchor
mappingPath
mappingPath
mappingPath
   XFolder path of the directory onto which the Linux device will be mounted. You should not specify the same  mappingPath  to multiple volumes. If the latter takes place the volume will be mapped to the volume defined last and it is unpredictable whether the other volumes will be mapped to a directory. 

String

 
Anchor
snapshotId
snapshotId
snapshotId
   X  

String

 
Anchor
volumeId
volumeId
volumeId
   XID of the persistence volume. 

String

 
artifactRepository
PropertyImage RemovedWImage RemovedRImage RemovedUDescriptionImage RemovedDVData
Type 
Example
JSONUI
Anchor
alias4
alias4
alias
Repository URLAliasXThe URL of the Git repository.The alias of the cartridge.N/AString
www.mygit.com/php.git
mygroup2tomcat
Anchor
privateRepo
privateRepo
privateRepo
Private RepositoryXWhether the Git repository is a private or public repository. If the value assigned to this field is "true", it indicates that the repository is a private repository.falseBooleantrue

Anchor
repoUrl
repoUrl
repoUrl

 XThe URL of the Git repository.N/AString 
Anchor
repoUsername
repoUsername
repoUsername
Repository UsernameXIf you have defined a private Git repository, enter the username used to access the repository.N/AStringadmin
Anchor
repoPassword
repoPassword
repoPassword
Repository PasswordXIf you have defined a private Git repository, enter the password used to access the repository.N/AStringtest_password
property

Property

Image RemovedWImage RemovedRImage RemovedUDescriptionImage RemovedMDefault
Type 
Data
Type 
Example
JSONUI
Anchor
name3
name3
name
  XName of the property being passed as a name value pair.NoN/AString 
Anchor
value
value
value
  XValue that corresponds to the name value pair.NoN/AString