Technical Articles
F5 SMEs share good practice.
cancel
Showing results for 
Search instead for 
Did you mean: 
Guoqiang_Wu
F5 Employee
F5 Employee

To continue Part-1, I wil introduce option-2 in Part-2

Option-2: Send API calls towards to BIG-IP via Declaration Onboarding (DO), automatic assign, revoke and relicense a license (pull) from an ELA/Utility license pool on a BIG-IQ LM.

 

With this option, we will leverage one of F5 automation tool chain components – Declaration Onboarding (DO) to pull the license on BIG-IP from BIG-IQ LM.

 

API calls target: BIG-IP

API type: Declarative API

Licenses Action: BIG-IP pulls license from BIG-IQ LM

BIG-IP DO API Endpoint:

POST https://{{big-ip}}/mgmt/shared/declarative-onboarding/ 

F5 BIG-IP API Document: Clouddocs Link

 

Prerequisite:

 

Install DO on BIG-IP (could be part of IaC code when use IaC automation tools like Terraform to provision F5 BIG-IP VE in Cloud)

CloudDocs Link

 

Note: BIG-IQ LM doesn’t support DO, but BIG-IQ CM support DO. We don’t cover the BIG-IQ CM API use case in this doc.

CloudDocs Link

 

Check if F5 BIG-IP DO install successful and version.

Guoqiang_Wu_0-1664876554884.png

 

 

Declaration Onboarding (DO) API could be used to pull license from BIG-IQ LM and configure L1-L3 configurations on BIG-IP, also could be part of the IaC code and configure these initial configurations on new provisioned BIG-IP.

 

License assign from BIG-IQ LM

 

In my below example, I specified BIG-IQ LM management IP address, login credential, license pool name, keywords, BIG-IP login credential and chargebackTag etc. and post API call towards BIG-IP DO API Endpoint.

{

    "schemaVersion": "1.0.0",

    "class": "Device",

    "async": true,

    "label": "License BIG-IP via BIG-IQ utility license when BIG-IP is reachable from BIG-IQ",

    "Common": {

        "class": "Tenant",

        "hostname": "bigip-f5vm01.example",

        "myLicense": {

            "class": "License",

            "licenseType": "licensePool",

            "bigIqHost": "10.1.1.5",

            "bigIqUsername": "admin",

            "bigIqPassword": "xxxxxx",

            "licensePool": "loadv10",

            "skuKeyword1": "MSP",

            "skuKeyword2": "BTAWF200M",

            "unitOfMeasure": "yearly",

            "reachable": true,

            "bigIpUsername": "admin",

            "bigIpPassword": "xxxxxx",

            "chargebackTag": "f5vm01"

        }

 

Guoqiang_Wu_1-1664876554902.png

 

Check the DO API task status by searching task id on Postman

Guoqiang_Wu_2-1664876554914.png

 

You also can check or monitor the whole backend process/logs on BIG-IP.

 

tail -f /var/log/restnoded/restnoded.log

 

On the new provisioned BIG-IP, you can find the BEST+AWAF 200Mbps MSP license was applied successfully.

 

Guoqiang_Wu_3-1664876554928.png

 

On BIG-IQ LM, Devices>License Management>Assignments, you can find this BIG-IP was assigned a right license successfully as expected.

 

Guoqiang_Wu_4-1664876554936.png

 

License revoke from BIG-IQ LM

 

Specified BIG-IQ LM management IP address, login credential, revoke license pool name, keywords, BIG-IP login credential and chargebackTag etc. and post API call towards BIG-IP DO API Endpoint.

 

Compare the license assignment declaration, the revoke declaration needs to specify a “revokeFrom” with the right license pool name to revoke this license back to the pool.

 

{

    "schemaVersion": "1.0.0",

    "class": "Device",

    "async": true,

    "label": "Revoke BIG-IP via BIG-IQ utility license when BIG-IP is reachable from BIG-IQ",

    "Common": {

        "class": "Tenant",

        "hostname": "bigip-f5vm01.example",

        "myLicense": {

            "class": "License",

            "licenseType": "licensePool",

            "bigIqHost": "10.1.1.5",

            "bigIqUsername": "admin",

            "bigIqPassword": "xxxxxx",

            "revokeFrom": "loadv10",

            "reachable": true,

            "bigIpUsername": "admin",

            "bigIpPassword": "xxxxxx",

            "chargebackTag": "f5vm01"

        }

    }

}

Guoqiang_Wu_5-1664876554946.png

 

 

Check the DO API task status by searching task id on Postman

 

Guoqiang_Wu_6-1664876554958.png

 

 

Check on the BIG-IP and BIG-IQ LM, there is no license applied/assigned to this BIG-IP.

 

 

Guoqiang_Wu_7-1664876554960.png

 

Guoqiang_Wu_8-1664876554962.png

 

 

 

Summary

 

Both F5 BIG-IQ License Manager (LM) and BIG-IP VE could be supported to use automation tools/APIs to automate the license assignment/revoke/relicense etc. operations based on business requirements. Customer could choose their desired automation tools to integrate with F5 provided APIs to archive their automation goals.

 

All of the examples APIs and postman collections in this testing you can find in this Github Repo.

Version history
Last update:
‎24-Oct-2022 18:27
Updated by:
Contributors