com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Application Resource Definition

The application provides the actual data required to create the clusters, start the instances and specifies how to connect them in the run-time. A sample application definition, together with information on all the properties that can be added in an application definition JSON are as follows:

Sample application definition JSON

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

{
  "applicationId": "wso2am-190-application",
  "multiTenant": true,
  "alias": "wso2am-190-application",
  "components": {
    "groups": [
      {
        "name": "keymanager-gw-manager-gw-worker",
        "alias": "keymanager-gw-manager-gw-worker",
        "groupMinInstances": 1,
        "groupMaxInstances": 1,
        "cartridges": [
          {
            "type": "wso2am-190-gw-manager",
            "cartridgeMin": 1,
            "cartridgeMax": 1,
            "subscribableInfo": {
              "alias": "gateway-manager",
              "deploymentPolicy": "deployment-policy-1",
              "autoscalingPolicy": "autoscaling-policy-1"
            }
          },
          {
            "type": "wso2am-190-gw-worker",
            "cartridgeMin": 1,
            "cartridgeMax": 1,
            "subscribableInfo": {
              "alias": "gateway-worker",
              "deploymentPolicy": "deployment-policy-1",
              "autoscalingPolicy": "autoscaling-policy-1"
            }
          },
          {
            "type": "wso2am-190-km",
            "cartridgeMin": 1,
            "cartridgeMax": 1,
            "subscribableInfo": {
              "alias": "key-manager",
              "deploymentPolicy": "deployment-policy-1",
              "autoscalingPolicy": "autoscaling-policy-1"
            }
          }
        ]
      },
      {
        "name": "pub-store-grp",
        "alias": "pub-store-grp",
        "groupMinInstances": 1,
        "groupMaxInstances": 1,
        "cartridges": [
          {
            "type": "wso2am-190-pub",
            "cartridgeMin": 1,
            "cartridgeMax": 1,
            "subscribableInfo": {
              "alias": "publisher",
              "deploymentPolicy": "deployment-policy-1",
              "autoscalingPolicy": "autoscaling-policy-1"
            }
          },
          {
            "type": "wso2am-190-store",
            "cartridgeMin": 1,
            "cartridgeMax": 1,
            "subscribableInfo": {
              "alias": "store",
              "deploymentPolicy": "deployment-policy-1",
              "autoscalingPolicy": "autoscaling-policy-1"
            }
          }
        ]
      }
    ],
    "dependencies": {
      "startupOrders": [
        {
          "aliases": [
            "group.keymanager-gw-manager-gw-worker",
            "group.pub-store-grp"
          ]
        }
      ],
      "terminationBehaviour": "terminate-none"
    }
  }
}

Property definitions

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

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

Main properties

PropertyWRUDescriptionMDVData
Type
Example
JSONUI

applicationId

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

multiTenant

 XWhether the application supports multi-tenancy.NofalseBooleantrue

name

   XThe name of the applicationNoN/AString 

description

   XA summarized description of the application.NoN/AString 

status

  X   String 

alias

AliasXThe alias for the applicationYesN/AString
phpapp2

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

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
PropertyWRUDescriptionMDVData
Type 
Example
JSONUI

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

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

cartridges

Cartridges  XDefines that cartridges that exist in the application. For more information on the sub-properties, see cartridges.NoN/Acartridges arrayN/A
groups
PropertyWRUDescriptionMDV

Data
Type

Example
JSONUI

name

nameXThe name of the group.Yes Stringgroup2
aliasaliasXThe alias of the group should be unique.Yes Stringmygroup2
groupMinInstancesgroupMinInstancesThe minimum number of instances that needs to be maintained in a group.Yes Int1
groupMaxInstancesgroupMaxInstancesThe maximum number of instances that needs to be maintained in a group.Yes Int2

deploymentPolicy

   XThe deployment policy being used for the group  String 

cartridges

 XDefines that sub-cartridges that exist within the group. For more information on the sub-properties, see cartridges.  cartridges array 
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

WRUDescriptionMDVData
Type 
Example
JSONUI
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:

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

    "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

scalingDependents  

 X   scalingDependents array 
terminationBehaviourTermination BehaviourX

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

"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

WRUDescriptionMDV

Data
Type 

Example
JSONUI
typeCartridge TypeXType of the cartridge.Yes StringPHP
cartridgeMinCartridge MinThe maximum number of instances that needs to be maintained in a cartridge.Yes Int1
cartridgeMaxCartridge MaxThe minimum number of instances that needs to be maintained in a cartridge.Yes Int2
subscribableInfoSubscribable 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

WRUDescriptionMDV

Data
Type

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

deploymentPolicy

 X   String 
autoscalingPolicyAuto-scaling PolicyXThe autoscaling policy used by the cartridge.YesN/AString
autoscaling_policy_1
maxMembers   X   Int 
minMembers   X   Int 
dependencyAliases   X   String 
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 
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 
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

WRUDescriptionMDVData
Type 
Example
JSONUI
isRequired   XWhether an extra volume is required to be attached to the cartridge to store content.  Boolean 
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

WRUDescriptionMData
Type 
Example
JSONUI
id    X  

String

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

String

 
device   X  

String

 
removeOnTermination   X

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.

 Booleantrue
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

 
snapshotId   X  

String

 
volumeId   XID of the persistence volume. 

String

 
artifactRepository
PropertyWRUDescriptionDVData
Type 
Example
JSONUI
aliasRepository URLAliasXThe URL of the Git repository.The alias of the cartridge.N/AString
www.mygit.com/php.git
mygroup2tomcat
privateRepoPrivate 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

repoUrl

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

Property

WRUDescriptionMDefault
Type 
Data
Type 
Example
JSONUI
name  XName of the property being passed as a name value pair.NoN/AString 
value  XValue that corresponds to the name value pair.NoN/AString 
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.