Forum Discussion

Robert_Booth's avatar
Robert_Booth
Icon for Nimbostratus rankNimbostratus
Sep 26, 2018

How to set the "create new pool" option in stock http iapp to auto populate for fqdn as the default

Hello, I am new to iapps and have taken the default http iapp, copied it to a new one and make some changes so that it can be used to deploy a virtual server that uses fqdn for the backend nodes. Everything works great except that the newly created pool does not get built with auto populate for the pool. The fqdn node which is created before using the iapp, is but since the pool is not, the pool members do not change with dns like it does when the pool is created with auto populate. I have tried to figure out how to set the configuration using the copy of the stock http iapp so that when then new pool is created Auto populate is the default and cannot figure that part out.

 

Can anyone assist?

 

  • The way that I normally do this is to do the presentation part first and then do the implementation. For presentation, you probably want to change section pool>table members

    table members {
                editchoice addr display "large" tcl {
                    package require iapp 1.1.1
                    return [iapp::get_items ltm node]
                }
    

    And to change the implementation side, find where it mentions pool__members and modify the commands:

     array keys: $new_pool,$no_pool
    array set pool_arr {
        1,0 { [iapp::conf create ltm pool ${app}_pool \
              [iapp::substa pool_ramp_pga_arr($advanced,$do_slow_ramp,$do_pga)] \
              [iapp::substa pool_lb_queue_arr($advanced,$is_edge,$tcp_queuing)] \
              [iapp::substa monitor_arr($new_pool,$new_monitor,$advanced)] \
              [iapp::pool_members $::pool__members]] }
        0,0 { [expr { $::net__server_mode ne "tunnel" ? \
              $::pool__pool_to_use : $::pool__pool_to_use_wom }] }
        *   { none }
    }
    

    I find it easiest to work out the tmsh command that you want to use first and then implement that. It's easier than it looks, honest!