Add the application defined in the <PRIVATE_PAAS_CARTRIDGES>/wso2am/1.9.0/samples/applications/wso2am-190-application/artifacts/wso2am-190-application.json file.
The path to the JSON file that defines the application needs to be defined as the <JSON_PAYLOAD> value.
By default, <USERNAME>:<PASSWORD> is admin:admin.
By default, <PRIVATE_PAAS_HOST> is localhost. However, if you are using a public IP, the respective IP address or domain needs to be specified.
By default, <PRIVATE_PAAS_HTTPS_PORT> has been set to 9443. However, if the port offset has been incremented by n, the default port value needs to be incremented by n.
Example
Add the application defined in the <PRIVATE_PAAS_CARTRIDGES>/wso2am/1.9.0/samples/applications/wso2am-190-application/artifacts/wso2am-190-application.json file.
Code Block
cd <PRIVATE_PAAS_CARTRIDGES>/wso2am/1.9.0/samples
curl -X POST -H "Content-Type: application/json" -d @'applications/wso2am-190-application/artifacts/wso2am-190-application.json' -k -v -u admin:admin https://localhost:9443/api/applications
Define the Application ID and Alias for the application.
Define the Startup Order based on the application you wish to create.
Click +Startup Order.
Click +alias to add dependencies to the startup order. Example: cartridge.<CARTRIDGE_ALIAS>,group.<GROUP_ALIAS>
Info
When creating an application, you need to use the same cartridge alias and group alias, which you used when creating a cartridge group
Define the Scaling Dependents based on the application you wish to create.
Click +Scaling Dependent
Click +alias to add dependencies to the startup order. Example: cartridge.<ALIAS>,group.<ALIAS>
Add dependencies to the application.
To add a cartridge to the application
Click cartridges to expand the cartridge pane. This step can be skipped if the cartridge pane is already expanded.
Optionally, if you wish to view the details of a cartridge, click on the respective cartridge in the cartridge pane. The cartridge details will appear in the information pane.
Double click on the cartridge that you wish to add to the application for the selected cartridge to appear in the main pane.
Drag the application connector, which appears underneath the application in the shape of a rectangle, and drop it on top of the cartridge connector, which appears in the shape of a half circle, on top of the cartridge.
To add a cartridge group to the application.
Click Group to expand the group template pane. This step can be skipped if the group pane is already expanded.
Optionally, if you wish to view the details of a cartridge group, click once on the respective cartridge group in the group pane. The topology view of the group will appear in the information pane.
Double click on the cartridge group that you wish to add to the application for the selected cartridge group to appear in the main pane.
Drag the application connector, which appears underneath the application in the shape of a rectangle, and drop it on top of the cartridge group connector, which appears in the shape of a half circle, on top of the cartridge group.
Optionally, if you wish to delete a dependency.
Right click on the respective cartridge or cartridge group and click Delete.
Click Yes to confirm the deleting process.
Repeat steps (a) and (b) based on the application that you wish to create. The overall topology view of the application appears in the main pane. If you wish to reposition the nodes in a more organized manner, click reposition nodes.
Define component details.
To define cartridge details.
Click on the respective cartridge, which is added to the applicationon the main pane, to expand the corresponding Components pane. This step can be skipped if the components pane is already expanded.
Enter the required details. Make sure to give a unique Alias for each cartridge added.
Click Update.
Note
The fields under artifactRepository must be updated when a cartridge belonging to the framework category is added (e.g., PHP cartridge and Tomcat cartridge).
To define cartridge group details.
Click on the respective cartridge group, which is added to the application on the main pane, to expand the Components pane. This step can be skipped if the components pane is already expanded.
Enter the required details. Make sure to give a unique Alias for each cartridge group added.
Click Update.
Optionally, if you wish to edit a dependency.
Right click on the respective cartridge or group and click Edit.
Edit the required details in the component pane and click Update.
Repeat steps (a) and (b) based on the application that you wish to define. The overall topology view of the application will appear in the main pane.
Click SAVE to deploy the application.
...
Sample application definition JSON
Panel
The following are sample configurations that can be used in a JSON to define an application: