GavinW_29074
Apr 10, 2012Nimbostratus
Name-Based Virtual Host iApp...
Hi there,
I'm trying to create an iApp template which will support Name Based virtual hosting as found in Apache...
I've created an iRule to handle the pool selection logic, which will look-up the Hostname against a computed Data-group name and return the relevant pool.
Will attach a copy of the iRule for reference.
I'm now trying to create an iApp template that will handle the creation of the required application components. I can safely handle the creation of the VS & empty Data-group, however I'm struggling with the pool creation and Data-group population logic.
Currently I've got a table in the iApp presentation layer as follows:
table vhosts {
string hostname required
string desc
string addr required validator "IpAddress"
string port default "8080" required validator "PortNumber" display "small"
optional ( lb_method_choice == "ratio-member" ||
lb_method_choice == "ratio-node" ||
lb_method_choice == "ratio-session" ||
lb_method_choice == "ratio-least-connections-memeber" ||
lb_method_choice == "ratio-least-connections-node" ||
lb_method_choice == "dynamic-ratio-member" ||
lb_method_choice == "dynamic-ratio-node" ) {
string ratio default "1" validator "NonNegativeNumber" display "small"
}
}
This table allows the entry of:
HTTP Hostname
Back-end server hostname
Back-end server IP Address
Back-end server Port
Back-end connection ratio.
What I want to do is parse the above table and use it to do the following:
Create a pool for each unique hostname, which could contain 1 or more back-end servers.
Populate a Data-group with the http hostname and corresponding pool name.
Any thoughts/pointers welcome.
Regards
Gavin