Forum Discussion

GavinW_29074's avatar
GavinW_29074
Icon for Nimbostratus rankNimbostratus
Nov 28, 2011

Access iApp details from within iRule...

Hi there,

 

 

I've started to develop using iApps on our v11 F5's... At the moment I've got a standard iApp for each of our products that we host...

 

I've then created a tweaked version of the ProxyPass rule to work with our application scenarios, and have Data classes defined to suit each app...

 

 

However I've hit a scenario whereby we have multiple release versions of the app in place, and there are some subtle differences between the URI's used by each app which means I need to tweak the Data class used for the ProxyPass rule... The ideal solution would be to pick up the iApp template version and derive the Data class from there... However I'm struggling to find a documented way to do it...

 

 

Any ideas on this, or any other ways that you can think of to achieve the above?

 

 

Cheers

 

Gavin

 

3 Replies

  • Mark_Crosland_2's avatar
    Mark_Crosland_2
    Historic F5 Account
    Hello,

     

     

    By Data classes, do you mean "tmsh ltm data-group"?

     

     

    By "versioned template" do you mean you have created separate templates to match each of the backend versioned apps?

     

     

    Do you create the tweaked version of the ProxyPass rule and the Data classes in the iApp template script?

     

     

    If you create the iRule from the app template script then you could customize it when the iRule/Datagroup is created and would not need to do the version check at runtime?

     

  • Mark

     

     

    Yes, I'm using data-groups for the ProxyPass rule...

     

     

    Yes, the intention is to create a different template version for each of the different backend application versions.

     

     

    Intention is to create the Data classes outside of the template, and the ProxyPass rule has been set-up such that it doesnt need tweaking for each deployment.

     

     

    I guess that would be another option, however I think it would then create a lot of potentially unnecessary rule duplication...

     

     

    Cheers

     

    Gavin

     

  • So you want to create data classes outside of the iApp, and its getting the data from where?? The iApp template file?? I'm afraid its still not very clear to me what you are trying to do.

     

     

    You can create data groups from within the iApp. You can create the data group from an outside program using an iControl SDK. If the values for the different data groups are within the iApp template, and you want to run a template file and pick out the values and create the data groups, that can also be done using an iControl SDK. I've done something like this before where I ported an iRule into an iApp, and extracted from the iRule comments the values and created the required data group using iControl calls. Is that what you are trying to do??