Forum Discussion

TJ_Vreugdenhil's avatar
Jan 27, 2015

Copy the config for APM customization section

Is there a way to back up the APM Customization section? We have put a lot of work in customizing 7 Vmware VDI deployments in v1.1.1 and now we have to re-deploy the new 1.2.0 Vmware iApp because of a compatibility issue with 11.6.0.

 

Is there a section in the config or file that I can copy and then use “load sys config x x” after we have re-deployed the new iApp for all sites?

 

Thanks!

 

4 Replies

  • Hi TJ,

     

    If you modify a file in the advanced editor of the customization section the file is stored in "/config/filestore/files_d/Common_d/customization_template_d". The customization section is really designed to be used with the GUI.

     

    Are you wanting to modify things that are in the advanced part (.inc and .css pages) or are you wanting to modify the values stored in the general part (form header value, etc)?

     

    You could work with the customization groups in the bigip.conf and the cache-path value as this points to the page you modified (if using advanced) but this wouldn't be the recommended way of setting up the customization.

     

    Seth

     

  • Hi TJ,

    It isn't quite as simple as just saying "apply customizations"... To give a bit of detail on how this is stored in the bigip.conf...

    Your access policy is stored and it lists the different items that make up the different options you flow through as the policy is evaluating. For this example we will dig into the "logon_page". You can see it is named "/Common/test_portal_wizard_act_logon_page".

    apm policy access-policy /Common/test_portal_wizard {
        caption general
        default-ending /Common/test_portal_wizard_end_deny
        items {
            /Common/test_portal_wizard_act_logon_page {
                priority 1
            }
            /Common/test_portal_wizard_act_resource_assign {
                priority 2
            }
            /Common/test_portal_wizard_act_sso_credential_mapping { }
            /Common/test_portal_wizard_act_variable_assign { }
            /Common/test_portal_wizard_end_allow {
                priority 4
            }
            /Common/test_portal_wizard_end_deny {
                priority 3
            }
            /Common/test_portal_wizard_ent_in { }
        }
        start-item /Common/test_portal_wizard_ent_in
    }
    

    So we can now look at the policy item that was referenced in the policy config section. This tells what the caption in the VPE is and what the next items in the flow will be, etc. It also has a section called "agents", lets find that in the config.

    apm policy policy-item /Common/test_portal_wizard_act_logon_page {
        agents {
            /Common/test_portal_wizard_act_logon_page_ag {
                type logon-page
            }
        }
        caption "Logon Page"
        color 1
        item-type action
        rules {
            {
                caption fallback
                next-item /Common/test_portal_wizard_act_variable_assign
            }
        }
    }
    

    Here is the logon-page agent... this section will tell us where the customization group is located in the config and also if we changed anything from the defaults on the page for example here I added a third option called "domain" on the logon page. Lets find the customization group config items now...

    apm policy agent logon-page /Common/test_portal_wizard_act_logon_page_ag {
        customization-group /Common/test_portal_wizard_act_logon_page_ag
        field-type3 text
        post-var-name3 domain
        sess-var-name3 domain
    }
    

    Here is the customization-group entry in the config... This points to two filesystem files one file in customization_group_d directory and one file int eh customization_template_d directory. These files contain the things that were changed using the advanced editor.

    apm policy customization-group /Common/test_portal_wizard_act_logon_page_ag {
        cache-path /config/filestore/files_d/Common_d/customization_group_d/:Common:test_portal_wizard_act_logon_page_ag_32266_8
        revision 8
        templates {
            logon.inc {
                cache-path /config/filestore/files_d/Common_d/customization_template_d/:Common:test_portal_wizard_act_logon_page_ag::logon.inc_39187_2
                name /Common/test_portal_wizard_act_logon_page_ag:logon.inc
                revision 2
            }
        }
    }
    

    Now lets look at the filesystem...

    [root@cooper-apm-11-6-0:Active:Standalone] customization_template_d  pwd
    /config/filestore/files_d/Common_d/customization_template_d
    [root@cooper-apm-11-6-0:Active:Standalone] customization_template_d  ls -l *test_portal*logon*
    -rw-r--r-- 1 tomcat tomcat 29202 Nov 14 10:51 :Common:test_portal_wizard_act_logon_page_ag::logon.inc_39187_2
    [root@cooper-apm-11-6-0:Active:Standalone] customization_template_d 
    
    
    [root@cooper-apm-11-6-0:Active:Standalone] customization_group_d  pwd
    /config/filestore/files_d/Common_d/customization_group_d
    [root@cooper-apm-11-6-0:Active:Standalone] customization_group_d  ls -l *test_portal*logon*
    -rw-r--r-- 1 apache apache 1696 Jan 27 12:15 :Common:test_portal_wizard_act_logon_page_ag_32266_8
    [root@cooper-apm-11-6-0:Active:Standalone] customization_group_d 
    

    If you look at these files you will see they have the information that you have changed in the customization GUI. You can see the files have unique numbers after them. If you make a change in the GUI you will see the last number increment to correspond with the revision number in the bigip.conf file.

    What you can try (this isn't supported by F5) is to copy the files you have customized to a different directory. Make a backup of the device. Deploy the new iApp and then you can copy the information in the customization files back to the corresponding files that were created as part of the new iApp. It is a very manual process. I would also suggest doing this on a test/dev device before you mess with your production device as the new iApp might have changed something that causes issues.

    I hope this helps give you a strategy on performing the iApp upgrades and reapplying the customizations. If you have any questions please let me know.

    Regards,

    Seth

  • Thanks Seth, I was looking and we might try copying the files from these directories below, delete the iApp, run the new iApp, and replace the files

    /config/filestore/files_d/Common_d/customization_group_d/*
    /config/filestore/files_d/Common_d/customization_image_d/*
    /config/filestore/files_d/Common_d/customization_template_d/*
    

    But like you said, if the new iApp changes any part of how the customization is loaded, it will not work. I think it's also important to use the same name when creating the new iApp. (for anybody else who may try this).

    I think F5 really needs a better ability to save and load these customization configs, because iApp's will continue to change all the time.

    • Seth_Cooper's avatar
      Seth_Cooper
      Icon for Employee rankEmployee
      TJ, be careful as you said "replace the files". You need to make sure the cache-path in the bigip.conf points to the valid file. If you replace you need to make sure to update the config file so it knows where to pull the data. You can also always request an RFE (request for enhancement) by contacting support. If you would like to see it in the product please let support know.