Forum Discussion

richard_76881's avatar
richard_76881
Icon for Nimbostratus rankNimbostratus
Apr 20, 2010

using msbuild to remove server from cluster, deploy code and place back in

Hi there

 

 

New to F5 and IControl so looking initially for a pointer to use the IControl interface with msbuild.. The idea is that I can deploy our corporate site to 4 servers without any down time.. What I wish to do is as follows:

 

 

1. Disable new connections/sessions on the 1st server.

 

2. Let all current sessions die and take the server out of the cluster

 

3. Deploy the site on the 1st server

 

4. Add the server back into the cluster

 

5. Repeat for all servers.

 

 

Generally I dont know at present what API call to make to do these tasks so if anyone can help I would be much appreciative as I have been looking at the documentation for a while now and I am getting there but maybe need a push. Also anyone done msbuild -> Icontrol?

 

 

Cheers

 

 

Richard

 

7 Replies

  • The PsPoolMemberControl PowerShell sample in the iControl CodeShare does steps 1 and 2.

     

     

    http://devcentral.f5.com/wiki/default.aspx/iControl/PsPoolMemberControl.html

     

     

    Adding a server (pool member) back into a cluster (pool) can be done with the LocalLB.Pool.add_member() method.

     

     

    http://devcentral.f5.com/wiki/default.aspx/iControl/LocalLB__Pool__add_member.html

     

     

    You'll likely need to tailor the PsPoolMemberControl script to do all that you need but it should be good to get you started.

     

     

    Let me know if you need any more pointers.

     

     

    -Joe

     

  • Hi Joe

     

     

    Am coming up with an issue. I can see all my pool and members etc when I login via the web interface and I can enable and disable etc. The issue is that I am trying to get a member list via the IControl Get-PoolMembers() call and I am getting back an array as follows: memberlist[1][] meaning there is nothing coming back. I believe I am putting in the correct pool name.

     

     

    I am actually using c to create a custom Nant task so I can debug etc (I know c not power builder) I have add the webservice reference etc and auto accepting the certificate and all is well. Its just that I am getting no member on my pool which is incorrect. Do you know of any issues with regards to using a .NET SOAP client with the cgi IControl interface?

     

     

    Many thanks for your help on this

     

     

    Richard
  • Further to my last mail.. The Data Centre have set me up with a new partition on bigip with a new user ONLY authorized to manage my subdomains. It seems that when I get a list of the pools via icontrol I get all of them APART from my new domains. which is probably the reason I am not getting any members because the pool does not exist through icontrol for my new user... (Once again I can everything through the UI interface)

     

     

    Do you know of any icontrol setup needed to apply the correct user apart from sending the username and password in the SOAP header and auto accepting the certificate?

     

     

    Cheers

     

     

    Rich
  • Ok, got a couple of replies to address so hopefully I get them all.

     

     

    First of all, I hope if you are using C that you are making use of the iControl assembly for .NET (iControl.dll) that has all of our web services bundled up into a proxy client with a nice interface wrapper around them. If not, you can get it from the iControl Assembly Labs project. The benefit here is that you will externalize all your iControl code from your application so as new builds come out you can just upgrade the iControl.dll without having to rebuild your app.

     

     

    Secondly, if you are using partitions, then you will likely need to set the active partition with the Management.Partition.set_active_partition() before making any object calls. By default, the iControl user is accessing the "Common" partition. If you want to programmatically determine the users's assigned partition, you can get that info from the Management.UserManagement.get_my_permission() method.

     

     

    Management.Partition.set_active_partition()

     

    http://devcentral.f5.com/wiki/default.aspx/iControl/Management__Partition__set_active_partition.html

     

     

    Management.UserManagement.get_my_permission()

     

    http://devcentral.f5.com/wiki/default.aspx/iControl/Management__UserManagement__get_my_permission.html

     

     

    I illustrated the use of the partition control methods in my CodeShare sample on PsPartitionAccess. It's in PowerShell but the syntax should be pretty close to C.

     

     

    http://devcentral.f5.com/wiki/default.aspx/iControl/PsPartitionAccess.html

     

     

    Please let me know if this helps out or if you need further assistance.

     

     

    -Joe

     

  • By the way a CR was filed a few weeks back for this. By default, you'd expect the system to drop you into YOUR partition, not common. Instead, it drops you into common and you've got to switch over to yours. Not too big a deal but it should be fixed up either way.

     

     

    -Matt
  • found the answer here: http://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/51/afv/topic/aft/813555/aff/1/showtab/groupforums/Default.aspx