Forum Discussion
Packeteer_69831
Nimbostratus
Dec 02, 2010iRule design considerations for ISA to BigIP migration.
Hey there!
I hope I'm not out of line posting this here. My apologies if I am. My goal is to get some advice/guidance from the community.
I've recently been asked to assist with a project to migrate an old Microsoft ISA fronted environment into our strategic BigIP environment for the purposes of SSL termination and application routing.
From what I've seen so far in a horrendously long XML output from the ISA boxes, there appear to be over 200 URI translations which have no discernable pattern and are unique to each other.
For example:
The public URI /abc translates to /xyz at the application
The public URI /123 translates to /789 at the application
Repeat the above for 200+ unique endpoints and you can see what I'm dealing with. Easily adding new endpoints and removing old ones is also key. This will be performed across a cluster of BigIPs which are standalone units.
This cluster also performs an ASM function so the HTTP class feature will be used as an ASM policy will be applied to each endpoint. My preference is to have a single ASM policy for all the applications (in this instance anyway) but I suspect there may a requirement to break this out in the future (phase2).
Thankfully, there aren't all that many application servers (about a dozen pools from what I can see). As I am working on the basis that a single ASM policy will be required, my thought is to group the application URI's based on their final pool destinations, which should leave me with about 6 HTTP classes in total.
So my topic for possible discussion is how would one consider tackling the above external to internal URI mapping with iRules without it becoming a beast of an iRule and whilst remaining easily maintainable? I'm not a TCL coder (or any coder for that fact) and rather than re-invent the wheel, have sought guidance from the community of experts.
The platforms I'm working on are 8400 BigIP LTMs licensed with ASM and running 10.2.0 HF2.
Cheers,
Packeteer.
5 Replies
Sort By
- Packeteer_69831
Nimbostratus
So on the way home from work, I was thinking about the above and it dawned on me that this might not be as hard as I first thought. - hoolio
Cirrostratus
Hi Packeteer, - Packeteer_69831
Nimbostratus
Hi Aaron, - Packeteer_69831
Nimbostratus
I've had my first attempt at writing the iRule for this and this is what I've come up with so far. Not sure if it's CMP compliant but it's parsing on 6400 running 10.2.0 HF2.class uri_prepend_dgl { "/prependabc" { "/prependxyz" } } class uri_replace_dgl { { "/123" { "/789" } "/abc" { "/xyz" } } }
when HTTP_REQUEST { log local0. "Original URI is: [HTTP::uri]" set external_uri [HTTP::uri] log local0. "External URI is: $external_uri" if { [class match [HTTP::uri] equals "uri_replace_dgl"] } { log "We're in the replace if statement" set internal_uri [class search -value uri_replace_dgl eq [string tolower [HTTP::uri]]] log local0. "Internal URI is: $internal_uri" set HTTP::uri $internal_uri } elseif { [class match [HTTP::uri] starts_with "uri_prepend_dgl"] } { log local0. "We're in the prepend if statement" set prepend_uri [class search -value uri_prepend_dgl starts_with [string tolower [HTTP::uri]]] log local0. "Prepend URI is: $prepend_uri" HTTP::uri "$prepend_uri[HTTP::uri]" log local0. "Internal URI is: $prepend_uri[HTTP::uri]" return } else { log local0. "We're in the do nothing part of the iRule" log local0. "Passed URI is: [HTTP::uri]" } }
- hoolio
Cirrostratus
Hi Packeteer,
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects