Application Deploy

Overview

Use this API to deploy an application to BIG-IP when using Application Services 3 Extension (AS3) from BIG-IQ. You can use AS3 on BIG-IQ in largely the same way as on BIG-IP and described in the AS3 documentation: Using AS3 with BIG-IQ. With BIG-IQ, declarations use an AS3 template which is defined in BIG-IQ. For an example of an AS3 declaration that uses an AS3 template, see the AS3 documentation: Using declarations with AS3 templates . You can use the AS3 Template API to define your AS3 templates on BIG-IQ and you can use the AS3 Declare API post the AS3 declaration to BIG-IP.

For information about the compatibility of BIG-IQ and BIG-IP with F5 Application Services 3 Extension (AS3) and F5 Declarative Onboarding (DO) releases, please refer to the support article: K54909607: BIG-IQ Centralized Management compatibility with F5 Application Services 3 Extension and F5 Declarative Onboarding .

Warning

This API cannot be used to delete an application.

REST Endpoint: /mgmt/cm/global/tasks/deploy-to-application

Requests

POST /mgmt/cm/global/tasks/deploy-to-application

To create a task to deploy to an application when using AS3, you can send a POST request to the deploy-to-application endpoint.

Request Parameters

The request parameters in the POST request can include the following.

Name Type Required Description
applicationDescription string False If applicationName is not provided, then the value in this field will be ignored.
applicationName string False If you provide an applicationName which already exists, the API returns an error. If you provide no applicationName, and an applicationName already exists, the application service is added to the existing application. If you provide no applicationName, and the application service is new, the application is added to “Unknown Applications”.
applyTemplateTaskState string Required if appSvcsDeclaration is not provided. Exactly one of appSvcsDeclaration or applyTemplateTaskState or classicAppServiceTaskStask is required. The full JSON body of a service catalog template.
appSvcsDeclaration string Required if applyTemplateTaskState is not provided. Exactly one of appSvcsDeclaration or applyTemplateTaskState or classicAppServiceTaskStask is required. The full JSON body of an AS3 declaration.
classicAppServiceTaskState string Required if applyTemplateTaskState is not provided. Exactly one of appSvcsDeclaration or applyTemplateTaskState or classicAppServiceTaskStask is required. The full JSON body of a Legacy App Definition.
requiredNewApplication string False The value “true” is optional and indicates a required new application. The default value is “false”.

Query Parameters

None

Response

HTTP/1.1 200 OK

Name Type Description
applicationDescription string If applicationName is not provided, this the value in this field will be ignored.
applicationName string If you provide an applicationName which already exists, the API returns an error. If you provide no applicationName, and an applicationName already exists, the application service is added to the existing application. If you provide no applicationName, and the application service is new, the application is added to “Unknown Applications”.
applyTemplateTaskState string The full JSON body of a service catalog template.
appSvcsDeclaration string The full JSON body of an AS3 declaration.
classicAppServiceTaskState string The full JSON body of a Legacy App Definition.
requiredNewApplication string The value “true” is optional and indicates a required new application. The default value is “false”.
selfLink string A url to the task’s endpoint. You can poll selfLink for the state of this task by sending GET requests to this url.
state string The state of the task. The value will only be available after the state have transitioned to “FINISHED”.

Permissions

Role Allow
Application_Creator Yes
Application_Manager Yes

After creating the task, you can poll the task’s state by sending GET requests to selfLink to confirm when the task completes.

Examples

POST to create task to deploy an application

You can send a POST to the deploy-to-application endpoint to create a deploy task.

POST https://<BIG-IQ>/mgmt/cm/global/tasks/deploy-to-application

The JSON in the body of the POST can be similar to the following.

{
    "applicationDescription": "This is an HTTP AS3 Application service",
    "applicationName": "MyApplication",
    "appSvcsDeclaration": {
            "class": "ADC",
            "schemaVersion": "3.12.0",
            "target": {
                    "address": "10.1.1.10"
            },
            "MyApplicationTenant": {
                    "class": "Tenant",
                    "MyApplicationService1": {
                            "class": "Application",
                            "template": "http",
                            "serviceMain": {
                                    "virtualPort": 80,
                                    "virtualAddresses": [
                                            "10.1.10.10"
                                    ],
                                    "profileAnalytics": {
                                            "use": "Analytics_Profile"
                                    },
                                    "pool": "Pool",
                                    "class": "Service_HTTP"
                            },
                            "Analytics_Profile": {
                                    "class": "Analytics_Profile",
                                    "collectClientSideStatistics": true,
                                    "collectOsAndBrowser": false,
                                    "collectMethod": false,
                                    "collectResponseCode": true
                            },
                            "Pool": {
                                    "members": [{
                                            "serverAddresses": [
                                                    "10.1.20.102",
                                                    "10.1.20.102"
                                            ],
                                            "servicePort": 80,
                                            "monitors": [
                                                    "http"
                                            ],
                                            "adminState": "enable",
                                            "shareNodes": true
                                    }],
                                    "class": "Pool",
                                    "monitors": [
                                            "http"
                                    ]
                            }
                    }
            }
    }
}

Response

The JSON in the response to the POST can look similar to the body of the POST request. The response can include a status and selfLink. The value of status can be “STARTED” initially, which means the task has been started. The value of selfLink is the url for the task.

GET to check the status of the deploy task

You can send repeated GET requests to check the status of the deploy task. You can send the GET request to the task’s url, returned as the value of selfLink in the response to the initial POST.

GET https://<BIG-IQ>/mgmt/cm/global/tasks/deploy-to-application/<id>

Response

The value of status in the GET response can eventually update to “DONE” and “FINISHED”.