Hi,
I am looking for your help on below issue:-
Is there any way to check and test the functioning of irule before applying the same in Virtual server or data group in production. For example:- if we have an iRule which needs to be applied and is logical and if some logic does not work.
Perhaps the fastest way of doing that is to use an extra IF condition
if {[IP::client_addr] == "yo.ur.test.ip"}{ your-irule-logic }
For a more complicated implementation where there are many testers accessing from various IP addresses, I use a secret HTTP path which inserts a special testing cookie. This will relieve from the burden of managing the “Allowed Testers IP addresses”.
Perhaps the fastest way of doing that is to use an extra IF condition
if {[IP::client_addr] == "yo.ur.test.ip"}{ your-irule-logic }
For a more complicated implementation where there are many testers accessing from various IP addresses, I use a secret HTTP path which inserts a special testing cookie. This will relieve from the burden of managing the “Allowed Testers IP addresses”.
If you want to test new features on a VS with a specific IP address, you can duplicate production VS and add source address condition on VS.
You can create multiple VS with the same destination port and address is source VLAN or source IP condition is different.
On the new VS, enable your iRule.
to duplicate virtual server configuration, execute in tmsh:
list ltm virtual
Edit the following line and replace source address: (don’t forget to change VS name)
source 0.0.0.0/0
To load the configuration, execute in tmsh (and paste the VS configuration):
load sys config from-terminal merge
Confirm load configuration with CTRL-D
If I may add, you actually have a few really good options:
-
You can create a duplicate VIP (perhaps on an internal address) and test your iRules there.
-
You can test your iRules on another BIG-IP. This is a popular use case for the $98 VE lab version.
-
You can wrap all of your iRules in a catch clause to make sure they don’t break your active application.
-
If you just need to test TCL logic (ie. without iRules events or protocol commands), you can use tclsh on the command line.
thanks alot this will help.. but i have not used secret HTTP path.. It would be good if you can help on this..
thanks alot this will help.. but i have not used secret HTTP path.. It would be good if you can help on this..
Kevin thanks for your support and guidance this will help us.