Forum Discussion

M_125189's avatar
M_125189
Icon for Nimbostratus rankNimbostratus
Feb 21, 2013

How to Automate actions!

Hi All,

 

I'm so new to this technology! I have to automate actions within the BigIp product. For instance, when we deploy a new server, I want to have the process automatically add this new server into the pool!

 

Any thoughts?

 

13 Replies

  • It could be scripted, what's the actual requirement? Do you just want to a a new server to a large number of existing pools?
  • I'm no bash scripting expert but how about something like this (which I'm sure could be greatly improved but will still save you lots of time);

    
    !/bin/bash
    
    NEWMEMBERIP=1.1.1.1
    NEWMEMBERNAME=testnode
    NEWMEMBERPORT=8080
    
    tmsh create ltm node $NEWMEMBERNAME address $NEWMEMBERIP
    tmsh modify ltm pool pool1name members add \{ $NEWMEMBERNAME:$NEWMEMBERPORT \}
    tmsh modify ltm pool pool2name members add \{ $NEWMEMBERNAME:$NEWMEMBERPORT \}
    tmsh modify ltm pool pool3name members add \{ $NEWMEMBERNAME:$NEWMEMBERPORT \}
    tmsh modify ltm pool pool4name members add \{ $NEWMEMBERNAME:$NEWMEMBERPORT \}
    tmsh modify ltm pool pool5name members add \{ $NEWMEMBERNAME:$NEWMEMBERPORT \}
    tmsh modify ltm pool pool6name members add \{ $NEWMEMBERNAME:$NEWMEMBERPORT \}
    tmsh modify ltm pool pool7name members add \{ $NEWMEMBERNAME:$NEWMEMBERPORT \}
    tmsh modify ltm pool pool8name members add \{ $NEWMEMBERNAME:$NEWMEMBERPORT \}
    tmsh modify ltm pool pool9name members add \{ $NEWMEMBERNAME:$NEWMEMBERPORT \}
    
    exit 0