Overview
CLI command | subscribe-cartridge
|
Description | Used to subscribe to a cartridge in Private PaaS. |
Command formats | Subscribing to a data cartridge subscribe-cartridge <CARTRIDGE-TYPE> <CARTRIDGE-ALIAS> -dp <DEPLOYMENT-POLICY> -ap <AUTO-SCALING-POLICY> -pv <PERSISTENCE-VOLUME> -v <VOLUME-SIZE> -t <REMOVE-ON-TERMINATION> |
Subscribing to a framework cartridge subscribe-cartridge <CARTRIDGE-TYPE> <CARTRIDGE-ALIAS> -r <REPO-URL> -u <REPO-USERNAME> -p <REPO-PASSWORD> -cm -dp <DEPLOYMENT-POLICY> -ap <AUTO-SCALING-POLICY> -pv <PERSISTENCE-VOLUME> -v <VOLUME-SIZE> -t <REMOVE-ON-TERMINATION> | |
Subscribing to an application cartridge subscribe-cartridge <CARTRIDGE-TYPE> <CARTRIDGE-ALIAS> -dp <DEPLOYMENT-POLICY> -ap <AUTO-SCALING-POLICY> -pv <PERSISTENCE-VOLUME> -v <VOLUME-SIZE> -t <REMOVE-ON-TERMINATION> |
Parameter Definitions
Parameter definition for data cartridges
Short Option | Long Option | Description | Required | Example Value |
---|---|---|---|---|
N/A | N/A | Type of the cartridge | Yes | mysql |
N/A | --data-alias | Alias used in the cartridge definition | Yes | mysql111 |
-dp | --deployment-policy | Deployment policy used in the cartridge definition | Yes | economyDeploymentPolicy |
-ap | --autoscaling-policy | Auto-scaling policy used in the cartridge definition | Yes | simpleAutoscalePolicy |
-pv | --persistence-volume | Whether a persistence volume should be attached to the cartridge | No | true |
-v | --volume-size | Size of the persistence volume that should be attached to the cartridge | No | 2GB |
-t | --remove-on-termination | Whether the attached persistence volume should be removed when the instance is terminated | No | true |
Parameter definition for framework cartridges
Short Option | Long Option | Description | Required | Example Value |
---|---|---|---|---|
N/A | N/A | Type of the cartridge | Yes | php |
N/A | --data-alias | Alias used in the cartridge definition | Yes | php111 |
-r | --repo-url | URL of the repository where the source of the cartridge is stored. | Yes | https://github.com/test/testphp.git |
-u | --username | Username of the source repository | No | test |
-p | --password | Password of the source repository | No | test123 |
-cm | --enable-commits | Whether auto commits are allowed in the Git repo of the cartridge | No | N/A |
-dp | --deployment-policy | Deployment policy used in the cartridge definition | Yes | economyDeploymentPolicy |
-ap | --autoscaling-policy | Auto-scaling policy used in the cartridge definition | true | simpleAutoscalePolicy |
-pv | --persistence-volume | Whether a persistence volume should be attached to the cartridge | No | true |
-v | --volume-size | Size of the persistence volume that should be attached to the cartridge | No | 2GB |
-t | --remove-on-termination | Whether the attached persistence volume should be removed when the instance is terminated | No | true |
Parameter definition for application cartridges
Short Option | Long Option | Description | Required | Example Value |
---|---|---|---|---|
N/A | N/A | Type of the cartridge | Yes | wordpress |
N/A | --data-alias | Alias used in the cartridge definition | Yes | wordpress111 |
-dp | --deployment-policy | Deployment policy used in the cartridge definition | Yes | economyDeploymentPolicy |
-ap | --autoscaling-policy | Auto-scaling policy used in the cartridge definition | Yes | simpleAutoscalePolicy |
-pv | --persistence-volume | Whether a persistence volume should be attached to the cartridge | No | true |
-v | --volume-size | Size of the persistence volume that should be attached to the cartridge | No | 2GB |
-t | --remove-on-termination | Whether the attached persistence volume should be removed when the instance is terminated | No | true |
Example
Use case: Subscribe to the cartridge with the type defined as 'php', the alias defined as 'php111', the URL of the source repo defined as https://github.com/test/testphp.git, the deployment policy defined as economyDeploymentPolicy, and the auto-scaling policy defined as simpleAutoscalePolicy.
subscribe-cartridge php php111 -r https://github.com/test/testphp.git -dp economyDeploymentPolicy -ap simpleAutoscalePolicy
Sample Output
You have successfully subscribed to php cartridge with alias php111. GIT Repository URL: https://github.com/test/testphp.git (This might take few minutes... depending on repo size) Please map the host name "php111.apachestratos.org" to LB IP