Is there an example of simple non-interactive iapp that configures a profile, monitor, node, pool, and virtual?
Greetings,
I was in a class recently where we used an iApp to change the configuration on the LTM. I thought this technique was brilliant because the actual amount of interaction with the device was very limited. Becuase of the way my organization implements its configurations, such an iApp would be very useful to me and reduce the time required to author routine configurations deliverables.
Unfortunately, the example iApps are extremely large and complex and interactive. I am looking just for the simplest of iApps, that just configures a profile, monitor, node, pool, and virtual, with the commands "hard-coded" into the script; no form fields for anyone to fill out. Just press a button and BOOM the configuration is added.
I just need a simple and practical example to start with. From there, I can tweak it into a template using variables and decision statements, but I need something simple to start from.
Any help would be greatly appreciated.
This should work for you:
sys application template /Common/f5.hardcoded { actions { definition { html-help { } implementation { proc tmsh_create { args } { set args [join $args] puts "tmsh create $args" tmsh::create $args return [lindex $args [lsearch -glob $args "*_*"]] } tmsh_create ltm virtual ${tmsh::app_name}_vip \ destination 10.10.10.1:80 \ pool [tmsh_create ltm pool ${tmsh::app_name}_pool \ members replace-all-with \{ \ 10.1.1.1:80 \ 10.1.1.2:80 \ 10.1.1.3:80 \ \} \ load-balancing-mode least-connections-member \ monitor [tmsh_create \ ltm monitor http ${tmsh::app_name}_http]] \ persist replace-all-with \{[tmsh_create \ ltm persistence source-addr ${tmsh::app_name}_source_ip]\} \ profiles replace-all-with \{[tmsh_create \ ltm profile http ${tmsh::app_name}_http]\} \ ip-protocol tcp \ snat automap } macro { } presentation { section intro { message hello } text { intro "Hard-Coded Implementation" intro.hello " " "Just click Finished." } } role-acl none run-as none } } }