Forum Discussion

Greg_Jewett's avatar
May 16, 2024
Solved

AS3 Deployments (shared objects)

BIG-IP LTM: 17.1.1
AS3 Plugin: 3.49.0

We are migrating from older hardware to newer r5900 series hardware.   In that process we are moving to configuration as code, using AS3.

Working through all the hiccups and hurdles, came across a "need", that I was wondering if possible?!

Can you have a "global" (or "shared") partition with configurations within that all partitions can reference?  

I inherited the previous configurations from a colleague, and everything is located within the Common partition, which has kinda worked out nicely, as we can share "objects" (iRules, profiles, etc..) between most configurations.  This also has been beneficial when we need to make a global change (certificate chain change, for example) that allowed us to fix all configurations quickly by changing just the one object that was shared.

Is this possible across partitions, or is that a hard silo division, and nothing can be shared between them?

  • In the past, I have found you have to do one of two things if you want to use shared objects.

    1. (what I normally do): instead of the 'use' command, enter the 'bigip' command. The 'use' expects the element in the declaration, and the bigip expects the element just already exists.
    2. Ensure you are posting with both 'Shared' and 'application' at the same time. I'm not sure if this would even work with /Common/Shared and /OtherPartition/OtherApp... But if I remember correctly, this does work with /OtherPartition/Shared and /OtherPartition/OtherAppp when declaring at the same time.

    Hopefully this link helps:

    Cloud Docs - big-ip-as3-pointers-in-declarations and overview-of-the-big-ip-as3-declaration

     

5 Replies

  • MJ_1024 

    Thank you!  I really appreciate the information!   That worked perfectly!   Past another hurdle.. charging down the track..

    Thanks again!

  • In the past, I have found you have to do one of two things if you want to use shared objects.

    1. (what I normally do): instead of the 'use' command, enter the 'bigip' command. The 'use' expects the element in the declaration, and the bigip expects the element just already exists.
    2. Ensure you are posting with both 'Shared' and 'application' at the same time. I'm not sure if this would even work with /Common/Shared and /OtherPartition/OtherApp... But if I remember correctly, this does work with /OtherPartition/Shared and /OtherPartition/OtherAppp when declaring at the same time.

    Hopefully this link helps:

    Cloud Docs - big-ip-as3-pointers-in-declarations and overview-of-the-big-ip-as3-declaration

     

  • I found the following at the very bottom of this F5 document:

    Object referencing between partitions

    Certain BIG-IP® system objects, such as virtual servers, can reference other objects. Examples of objects that a virtual server can reference are pools, profiles, and iRules®. On the BIG-IP system, there are rules for object referencing with respect to the administrative partitions in which those objects reside.

    Valid object referencing

    The rules for valid object referencing are:

    • An object and the object that it references can reside in the same partition.
    • An object can reside in a user-created partition, such as partition A, while the object it references resides in partition Common.
    • An iRule can reference any object, regardless of the partition in which the referenced object resides. For example, an iRule that resides in partition A can contain a pool statement that specifies a pool residing in partition B. Neither object is required to reside in Common.

     

    What I do not understand is why I am getting this error message when deploying a declaration:

    fatal: [f5-r5900-qual-a.its.utexas.edu]: FAILED! => {"changed": false, "msg": "{'code': 422, 'errors': ['/big_ip_ltm/Shared/testf5_response/profileHTTP/use: contains path to non-existent object Common'], 'declarationFullId': '', 'message': 'declaration is invalid'}"}

    where the referenced object:

    "profileHTTP": {
        "use": "/Common/Shared/std_http_prof"

    is defined in Common:

    "Common": {
        "Shared": {
            "class": "Application",
            "std_http_prof": {
                "class": "HTTP_Profile",
                "insertHeader": {
                    "name": "nsclientip",
                    "value": "[IP::remote_addr]"
                },
                "proxyType": "reverse",
                "unknownMethodAction": "allow",
                "xForwardedFor": true
            },
            "template": "shared"
        },
        "class": "Tenant"
    },
    "class": "ADC",
    "id": "",
    "label": "",
    "remark": "",
    "schemaVersion": "3.37.0",
    "updateMode": "selective"