How to: Manage application services using BIG-IP Next Central Manager and AS3

Use this procedure to deploy, view, or delete AS3 declarative configuration to a specified instance managed by BIG-IP Next Central Manager using the BIG-IP Next Central Manager API. This API with endpoint /api/v1/spaces/default/appsvcs/declare supports using both AS3 class and ADC class in an AS3 declaration.

For more information about application observability after the application service is deployed and receiving traffic (including details about application health, alerts, security, and traffic data), see Overview: Application service observability.

BIG-IP Application Services 3 Extension (BIG-IP AS3)

The F5 BIG-IP AS3 is a flexible, low-overhead mechanism for managing application-specific configurations on a BIG-IP system. BIG-IP AS3 uses a declarative model, meaning you provide a JSON declaration rather than a set of imperative commands. The declaration represents the configuration which BIG-IP AS3 creates on a BIG-IP system. BIG-IP AS3 conforms to JSON Schema rules and its declarations are validated accordingly. BIG-IP AS3 accepts declaration updates via REST (push), reference (pull), or CLI (flat file editing).

For more information on downloading, installing, and using the BIG-IP AS3, see F5 BIG-IP Application Services 3 Extension Documentation.

While creating a declaration for AS3 on BIG-IP Next, see Schema Reference for the objects that you can use in your declarations.

Use Microsoft Visual Studio Code to validate your declarations, see Validating a declaration.

Use BIG-IP Next Central Manager API to deploy multiple tenants and application services

Use this procedure to deploy a tenant and application service to a managed BIG-IP Next instance using the BIG-IP Next Central Manager API. This workflow deploys an AS3 declaration with multiple tenants and application service.

  1. Authenticate with the BIG-IP Next Central Manager API, see How to: Authenticate with the BIG-IP Next Central Manager API.

  2. Deploy the AS3 declarative configuration with tenants and application services by sending a Post to the /api/v1/spaces/default/appsvcs/declare?target_address=<> endpoint.

POST /api/v1/spaces/default/appsvcs/declare?target_address=<>

For the API body, use the following with the substituting values appropriate for the tenants and application services you want to deploy.

{
"class": "ADC",
"id": "adc-canonical",
"schemaVersion": "3.0.0",
"my_tenant": {
   "class": "Tenant",
   "my_app": {
      "class": "Application",
      "my_pool": {
      "class": "Pool",
      "loadBalancingMode": "least-connections-member",
      "members": [
         {
            "serverAddresses": [
            "198.18.10.10"
            ],
            "servicePort": 80
         }
      ]
      },
      "my_service": {
      "class": "Service_HTTP",
      "enable": true,
      "persistenceMethods": [
         "source-address"
      ],
      "pool": "my_pool",
      "remark": "custom remark",
      "virtualAddresses": [
         "198.18.1.10"
      ],
      "virtualPort": 80
      },
      "remark": "canonical application"
   },
   "my_app_2": {
      "class": "Application",
      "my_pool": {
      "class": "Pool",
      "loadBalancingMode": "least-connections-member",
      "members": [
         {
            "serverAddresses": [
            "198.18.10.20"
            ],
            "servicePort": 80
         }
      ]
      },
      "my_service": {
      "class": "Service_HTTP",
      "enable": true,
      "persistenceMethods": [
         "source-address"
      ],
      "pool": "my_pool",
      "remark": "custom remark 2",
      "virtualAddresses": [
         "198.18.1.20"
      ],
      "virtualPort": 80
      },
      "remark": "canonical application 2"
   }
},
"my_tenant_2": {
   "class": "Tenant",
   "my_app": {
      "class": "Application",
      "my_pool": {
      "class": "Pool",
      "loadBalancingMode": "least-connections-member",
      "members": [
         {
            "serverAddresses": [
            "198.18.20.10"
            ],
            "servicePort": 80
         }
      ]
      },
      "my_service": {
      "class": "Service_HTTP",
      "enable": true,
      "persistenceMethods": [
         "source-address"
      ],
      "pool": "my_pool",
      "remark": "custom remark",
      "virtualAddresses": [
         "198.18.2.10"
      ],
      "virtualPort": 80
      },
      "remark": "canonical application"
   }
}
}

Use BIG-IP Next Central Manager API to view AS3 declaration

Use the following procedure to view an existing AS3 declaration using the BIG-IP Next Central Manager API. The below example is an AS3 declaration for the BIG-IP Next instance x.x.x.x.

  1. Authenticate with the BIG-IP Next Central Manager API, see How to: Authenticate with the BIG-IP Next Central Manager API.

  2. Deploy the AS3 declarative configuration with tenants and application services by sending a Post to the /api/v1/spaces/default/appsvcs/declare?target_address=<> endpoint.

GET /api/v1/spaces/default/appsvcs/declare?target_address=<>

For the API body, use the following with the substituting values appropriate for the tenants and application services you want to deploy.

{
   "class": "ADC",
   "controls": null,
   "my_tenant": {
      "class": "Tenant",
      "my_app": {
            "class": "Application",
            "my_pool": {
               "class": "Pool",
               "loadBalancingMode": "least-connections-member",
               "members": [
                  {
                        "serverAddresses": [
                           "198.18.10.10"
                        ],
                        "servicePort": 80
                  }
               ]
            },
            "my_service": {
               "class": "Service_HTTP",
               "enable": true,
               "persistenceMethods": [
                  "source-address"
               ],
               "pool": "my_pool",
               "remark": "custom remark",
               "virtualAddresses": [
                  "198.18.1.10"
               ],
               "virtualPort": 80
            },
            "remark": "canonical application"
      },
      "my_app_2": {
            "class": "Application",
            "my_pool": {
               "class": "Pool",
               "loadBalancingMode": "least-connections-member",
               "members": [
                  {
                        "serverAddresses": [
                           "198.18.10.20"
                        ],
                        "servicePort": 80
                  }
               ]
            },
            "my_service": {
               "class": "Service_HTTP",
               "enable": true,
               "persistenceMethods": [
                  "source-address"
               ],
               "pool": "my_pool",
               "remark": "custom remark 2",
               "virtualAddresses": [
                  "198.18.1.20"
               ],
               "virtualPort": 80
            },
            "remark": "canonical application 2"
      }
   },
   "my_tenant_2": {
      "class": "Tenant",
      "my_app": {
            "class": "Application",
            "my_pool": {
               "class": "Pool",
               "loadBalancingMode": "least-connections-member",
               "members": [
                  {
                        "serverAddresses": [
                           "198.18.20.10"
                        ],
                        "servicePort": 80
                  }
               ]
            },
            "my_service": {
               "class": "Service_HTTP",
               "enable": true,
               "persistenceMethods": [
                  "source-address"
               ],
               "pool": "my_pool",
               "remark": "custom remark",
               "virtualAddresses": [
                  "198.18.2.10"
               ],
               "virtualPort": 80
            },
            "remark": "canonical application"
      }
   },
   "schemaVersion": "3.0.0",
   "target": {
      "address": "198.18.10.100"
   }
}

Use BIG-IP Next Central Manager API to delete a tenant configuration

Use the following procedure to remove a tenant configuration from an AS3 declaration using the BIG-IP Next Central Manager API.

  1. Authenticate with the BIG-IP Next Central Manager API, see How to: Authenticate with the BIG-IP Next Central Manager API.

  2. Delete a tenant configuration from an AS3 declaration by sending a DELETE to the /api/v1/spaces/default/appsvcs/declare?target_address=<> endpoint.

The below example shows deleting my_tenant_2 from the AS3 declaration for the BIG-IP Next instance x.x.x.x.

DELETE /api/v1/spaces/default/appsvcs/declare/my_tenant_2?target_address=x.x.x.x

Note: The DELETE method does not require any request body to be included.

Use BIG-IP Next Central Manager API to delete AS3 declarative configuration

Use the following procedure to delete AS3 declarative configuration using the BIG-IP Next Central Manager API.

  1. Authenticate with the BIG-IP Next Central Manager API, see How to: Authenticate with the BIG-IP Next Central Manager API.

  2. Delete AS3 declarative configuration by sending a DELETE to the /api/v1/spaces/default/appsvcs/declare?target_address=<> endpoint.

The below example shows deleting all tenants from the AS3 declaration for the BIG-IP Next instance x.x.x.x.

DELETE /api/v1/spaces/default/appsvcs/declare?target_address= x.x.x.x

Note: The DELETE method does not require any request body to be included.