You can deploy an application using the CLI tool, REST API or the PPaaS Console as shown below:
Deploying an application via the CLI
Overview
CLI command | deploy-application |
Description | Deploy an application. |
Command format | deploy-application -a <APPLICATION_ID> -ap <APPLICATION_POLICY_ID>
|
Parameter definition
Short option | Long option | Description | Required | Example value |
---|---|---|---|---|
-a |
| Unique ID of the application | Yes | wso2am-190-application |
|
| Unique ID of the application policy. | Yes | application-policy-1 |
Example
Deploy an application with the application ID: wso2am-190-application
.
deploy-application -a wso2am-190-application -ap application-policy-1
Sample output
Application deployed successfully: [application] wso2am-190-application
Deploying an application via the REST API
Overview
Description | Deploy an application. |
Resource Path | /applications/{applicationId}/deploy/{applicationPolicyId} |
HTTP Method | POST |
Request/Response Format | application/json |
Command format | curl -X POST -H "Content-Type: application/json" -k -v -u <USERNAME>:<PASSWORD> https://<PRIVATE_PAAS_HOST>:<PRIVATE_PAAS_HTTPS_PORT>//api/applications/{applicationId}/deploy/{applicationPolicyId}
|
Example
Deploy an application with the application ID: wso2am-190-application
.
cd <PRIVATE_PAAS_CARTRIDGES>/wso2am/1.9.0/samples curl -X POST -H "Content-Type: application/json" -k -v -u admin:admin https://localhost:9443/api/applications/wso2am-190-application/deploy/application-policy-1
Sample output
> POST /api/applications/wso2am-190-application/deploy/application-policy-1 HTTP/1.1 > Host: localhost:9443 > Authorization: Basic YWRtaW46YWRtaW4= > User-Agent: curl/7.43.0 > Accept: */* > Content-Type: application/json > < HTTP/1.1 202 Accepted < Date: Mon, 12 Oct 2015 06:05:01 GMT < Content-Type: application/json < Transfer-Encoding: chunked < Server: WSO2 Carbon Server < {"status":"success","message":"Application deployed successfully: [application] wso2am-190-application"}
You will come across the following HTTP status codes while deploying an application:
HTTP status code | 202, 400, 409, 500 See the descriptions of the HTTP status codes here. |
Deploying an application via the PPaaS Console
Follow the instructions below to deploy an application:
- Click Applications on the home page.
- Hover your mouse pointer over the application that you wish to deploy for the Deploy button to appear and click Deploy.
- Select the application policy from the Select Policy drop-down menu.
- Click Deploy Application.
Overview
Content Tools
Activity