Lab 2.10: Moving existing AS3 Application Services from BIG-IP to BIG-IQ

Note

Estimated time to complete: 5 minutes

In this lab, we are going to see the process to move AS3 Application Services already deployed directly on BIG-IP using the API on BIG-IQ.

The process consist simply to add the target property under the ADC class in the AS3 declaration and re-send the full declaration to the BIG-IQ declare or deploy-to-application APIs.

Lab environment access

If you have not yet visited the page Getting Started, please do so.

Deploy AS3 Application Service directly to the BIG-IP

This declaration will create an HTTP application on BIG-IQ using an HTTP template. This declaration abstracts the complexity of having to configure all the HTTP defaults such as cookies, persistence, etc…

  1. Copy below example of an AS3 Declaration into the IDE (Integrated development environment) available within the lab environment, click on the Access button of the Ubuntu Lamp Server system and select Visual Studio Code.

    Note

    It is recommended to validate your AS3 declaration against the schema using Microsoft Visual Studio Code.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
    "$schema": "https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/master/schema/latest/as3-schema.json",
    "class": "AS3",
    "action": "deploy",
    "persist": true,
    "declaration": {
        "class": "ADC",
        "schemaVersion": "3.7.0",
        "id": "example-declaration-01",
        "label": "Task1",
        "remark": "Task 1 - HTTP Application Service",
        "Task1": {
            "class": "Tenant",
            "MyWebApp1http": {
                "class": "Application",
                "template": "http",
                "statsProfile": {
                    "class": "Analytics_Profile",
                    "collectClientSideStatistics": true,
                    "collectOsAndBrowser": false,
                    "collectMethod": false
                },
                "serviceMain": {
                    "class": "Service_HTTP",
                    "virtualAddresses": [
                        "<virtual>"
                    ],
                    "pool": "web_pool",
                    "profileAnalytics": {
                        "use": "statsProfile"
                    }
                },
                "web_pool": {
                    "class": "Pool",
                    "monitors": [
                        "http"
                    ],
                    "members": [
                        {
                            "servicePort": 80,
                            "serverAddresses": [
                                "<node1>",
                                "<node2>"
                            ],
                            "shareNodes": true
                        }
                    ]
                }
            }
        }
    }
}
  1. Now that the AS3 declaration is validated, modify the Virtual Address to 10.1.10.110 and the serverAddresses to 10.1.20.110 and 10.1.20.111.

  2. Using Visual Studio code REST client extension, find the BIG-IQ Token call and replace IP address in the URL with 10.1.1.8 instead of 10.1.1.4 (BOS-vBIGIP01.termmarc.com instead of BIG-IQ). Replace in the body username and password with:

    {
        "username": "admin",
        "password": "purple123",
        "loginProviderName": "tmos"
    }
    

    Then, authenticate on the BIG-IP and save the token.

  3. Use the BIG-IQ AS3 Declaration call in order to create the service on the BIG-IP. Replace IP address in the URL with 10.1.1.8 instead of 10.1.1.4. The method and URL used will be POST https://10.1.1.8/mgmt/shared/appsvcs/declare. Copy/Paste the AS3 declaration to the body under the call using the REST client VS code extension.

    This will give you an ID which you can query using the BIG-IQ Check AS3 Deployment Task.

  4. Login on BOS-vBIGIP01.termmarc.com and verify the application is correctly deployed in partition Task1.

Deploy AS3 Application Service through BIG-IQ

  1. Now the application service has been deployed directly on the BIG-IP, let’s re-deploy the same AS3 declaration but through BIG-IQ.

  2. Add the target (BIG-IP device) to the AS3 declaration used earlier between remark and Task1:

    "remark": "Task 1 - HTTP Application Service",
    "target": {
        "address": "<BIG-IP ip address>"
    },
    "Task1": {
    
  3. Using Visual Studio code REST client extension, find the BIG-IQ Token call to authenticate you on the BIG-IQ and save the token. Replace IP address in the URL with 10.1.1.4 instead of 10.1.1.8.

  4. Use the BIG-IQ AS3 Declaration call in order to create the service on the BIG-IP through BIG-IQ. Replace IP address in the URL with 10.1.1.4 instead of 10.1.1.8. The method and URL used will be POST https://10.1.1.4/mgmt/shared/appsvcs/declare. Copy/Paste the AS3 declaration to the body under the call using the REST client VS code extension.

Warning

If the request is failing, check if the Boston BIG-IP Cluster in sync.

  1. Login on BIG-IQ as david, go to Applications tab and check the application is displayed and analytics are showing.

Warning

Starting 7.0, BIG-IQ displays AS3 application services created using the AS3 Declare API as Unknown Applications. You can move those application services using the GUI, the Move/Merge API, bigiq_move_app_dashboard F5 Ansible Galaxy role or create it directly into Application in BIG-IQ using the Deploy API to define the BIG-IQ Application name.