How to: Manage application services using BIG-IP Next Central Manager and AS3¶
Use this procedure to deploy, view, or delete BIG-IP AS3 declarative configuration for a BIG-IP Next instance managed by BIG-IP Next Central Manager using the BIG-IP Next Central Manager API.
The API endpoint
/api/v1/spaces/default/appsvcs/declare
supports both theAS3
class andADC
class and manages application configuration declaratively for a BIG-IP Next instance.The API endpoint
/api/v1/spaces/default/appsvcs/documents
supports configuring a single application service using theApplication
class.
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 Application Services 3 (referred to as BIG-IP AS3) workflow provides a flexible, low-overhead mechanism for managing application-specific configurations on a BIG-IP Next system. BIG-IP AS3 uses a declarative model, meaning you provide a single JSON declaration instead of a set of imperative commands. The declaration represents the application configuration which BIG-IP AS3 creates on a BIG-IP system. BIG-IP AS3 provides a JSON Schema specification and its declarations are validated accordingly.
For more information on 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.
Procedures¶
Use BIG-IP Next Central Manager API to deploy multiple application services in a declaration¶
Use this procedure to deploy multiple tenants and application services to a managed BIG-IP Next instance using the BIG-IP Next Central Manager API.
Authenticate with the BIG-IP Next Central Manager API, see How to: Authenticate with the BIG-IP Next Central Manager API.
Deploy the AS3 declarative configuration by sending a request to the
/api/v1/spaces/default/appsvcs/declare
endpoint.
POST /api/v1/spaces/default/appsvcs/declare?target_address=203.0.113.10
For the API body, use the following while substituting values appropriate for the configuration 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.51.100.10"
],
"servicePort": 80
}
]
},
"my_service": {
"class": "Service_HTTP",
"enable": true,
"persistenceMethods": [
"source-address"
],
"pool": "my_pool",
"remark": "custom remark",
"virtualAddresses": [
"192.0.2.10"
],
"virtualPort": 80
},
"remark": "canonical application"
},
"my_app_2": {
"class": "Application",
"my_pool": {
"class": "Pool",
"loadBalancingMode": "least-connections-member",
"members": [
{
"serverAddresses": [
"198.51.100.20"
],
"servicePort": 80
}
]
},
"my_service": {
"class": "Service_HTTP",
"enable": true,
"persistenceMethods": [
"source-address"
],
"pool": "my_pool",
"remark": "custom remark 2",
"virtualAddresses": [
"192.0.2.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.51.100.100"
],
"servicePort": 80
}
]
},
"my_service": {
"class": "Service_HTTP",
"enable": true,
"persistenceMethods": [
"source-address"
],
"pool": "my_pool",
"remark": "custom remark",
"virtualAddresses": [
"192.0.2.100"
],
"virtualPort": 80
},
"remark": "canonical application"
}
}
}
Use BIG-IP Next Central Manager API to view 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 203.0.113.10
.
Authenticate with the BIG-IP Next Central Manager API, see How to: Authenticate with the BIG-IP Next Central Manager API.
Get the AS3 declarative configuration by sending a request to the
/api/v1/spaces/default/appsvcs/declare
endpoint.GET /api/v1/spaces/default/appsvcs/declare?target_address=203.0.113.10
Example response.
{ "class": "ADC", "schemaVersion": "3.0.0", "my_tenant": { "class": "Tenant", "my_app": { "class": "Application", "my_pool": { "class": "Pool", "loadBalancingMode": "least-connections-member", "members": [ { "serverAddresses": [ "198.51.100.10" ], "servicePort": 80 } ] }, "my_service": { "class": "Service_HTTP", "enable": true, "persistenceMethods": [ "source-address" ], "pool": "my_pool", "remark": "custom remark", "virtualAddresses": [ "192.0.2.10" ], "virtualPort": 80 }, "remark": "canonical application" }, "my_app_2": { "class": "Application", "my_pool": { "class": "Pool", "loadBalancingMode": "least-connections-member", "members": [ { "serverAddresses": [ "198.51.100.20" ], "servicePort": 80 } ] }, "my_service": { "class": "Service_HTTP", "enable": true, "persistenceMethods": [ "source-address" ], "pool": "my_pool", "remark": "custom remark 2", "virtualAddresses": [ "192.0.2.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.51.100.100" ], "servicePort": 80 } ] }, "my_service": { "class": "Service_HTTP", "enable": true, "persistenceMethods": [ "source-address" ], "pool": "my_pool", "remark": "custom remark", "virtualAddresses": [ "192.0.2.100" ], "virtualPort": 80 }, "remark": "canonical application" } } }
Use BIG-IP Next Central Manager API to delete a tenant from the declaration¶
Use the following procedure to remove a tenant from an AS3 declaration using the BIG-IP Next Central Manager API.
Authenticate with the BIG-IP Next Central Manager API, see How to: Authenticate with the BIG-IP Next Central Manager API.
Delete a tenant from the AS3 declaration by sending a request to the
/api/v1/spaces/default/appsvcs/declare/<tenant>
endpoint.
The below example shows deleting my_tenant_2
from the AS3 declaration for the BIG-IP Next instance 203.0.113.10
.
DELETE /api/v1/spaces/default/appsvcs/declare/my_tenant_2?target_address=203.0.113.10
Note: The DELETE method does not require any request body to be included.
Use BIG-IP Next Central Manager API to delete declaration¶
Use the following procedure to remove AS3 declarative configuration from a managed BIG-IP Next instance using the BIG-IP Next Central Manager API.
Authenticate with the BIG-IP Next Central Manager API, see How to: Authenticate with the BIG-IP Next Central Manager API.
Delete AS3 declarative configuration by sending a request to the
/api/v1/spaces/default/appsvcs/declare
endpoint.
The below example shows deleting all tenants from the AS3 declaration for the BIG-IP Next instance 203.0.113.10
.
DELETE /api/v1/spaces/default/appsvcs/declare?target_address=203.0.113.10
Note: The DELETE method does not require any request body to be included.
Use BIG-IP Next Central Manager API to deploy a single application service¶
Use this procedure to deploy a single application service to a managed BIG-IP Next instance using the BIG-IP Next Central Manager API.
Authenticate with the BIG-IP Next Central Manager API, see How to: Authenticate with the BIG-IP Next Central Manager API.
Draft the AS3 application service by sending a request to the
/api/v1/spaces/default/appsvcs/documents
endpoint.
POST /api/v1/spaces/default/appsvcs/documents
For the API body, use the following while substituting values appropriate for the configuration you want to deploy.
{
"document": {
"my_app": {
"class": "Application",
"my_pool": {
"class": "Pool",
"loadBalancingMode": "least-connections-member",
"members": [
{
"serverAddresses": [
"198.51.100.10"
],
"servicePort": 80
}
]
},
"my_service": {
"class": "Service_HTTP",
"enable": true,
"persistenceMethods": [
"source-address"
],
"pool": "my_pool",
"remark": "custom remark",
"virtualAddresses": [
"192.0.2.10"
],
"virtualPort": 80
},
"remark": "canonical application"
}
}
}
Deploy the AS3 application service to a BIG-IP Next instance in inventory by sending a request to the
/api/v1/spaces/default/appsvcs/documents/<id>/deployments
endpoint.
POST /api/v1/spaces/default/appsvcs/documents/<id>/deployments
For the API body, use the following while substituting values appropriate for the configuration you want to deploy.
{
"target": "203.0.113.10"
}
View the AS3 application service by sending a request to the
/api/v1/spaces/default/appsvcs/documents/<id>s
endpoint.
GET /api/v1/spaces/default/appsvcs/documents/<id>
Example response.
{
"app_data": {
"my_app": {
"class": "Application",
"my_pool": {
"class": "Pool",
"loadBalancingMode": "least-connections-member",
"members": [
{
"serverAddresses": [
"198.51.100.10"
],
"servicePort": 80
}
]
},
"my_service": {
"class": "Service_HTTP",
"enable": true,
"persistenceMethods": [
"source-address"
],
"pool": "my_pool",
"remark": "custom remark",
"virtualAddresses": [
"192.0.2.10"
],
"virtualPort": 80
},
"remark": "canonical application"
}
},
"name": "my_app",
"tenant_name": "default",
"type": "AS3"
}