Very new here so please bear with me.
We have an application that sits in two datacentres, one has a number of servers which will be active, the other datacentre will be standby. The application requires manual change-over of the service between the datacentres.
My plan is to configure virtual servers for each element of the application, with a server pool in datacentre1 and another server pool in datacrentre2. I will then use iControl to substitute the Pool from datacentre2 into the vServers for each part of the application.
i.e. Multiple vServers with two Pools and swap over between those pools when necesary. Ideally I would like to trigger this change-over and change-back with a single phrse either in command line or somewhere on the gui.
Has anyone any examples of this type of thing?
Have you looked at priority group activation? You could disable the pool members through a disable string in a health monitor and leave only the standby boxes available, which would trigger the activation of the secondary priority group. Once the primary servers came back online, the standby boxes would automatically fall out of the pool.
IMO, this feature would greatly simplify the process over a custom API call.
I agree with that, it’s how I would prefer to configure it and it would be ideal. However the app developers see it as too much of a risk to accidentally auto-changeover which they can’t cope with apparently. It’s a bit like Dr Frankenstein and a big electric switch to switch the lightning to its destination.
Hi Nic!
Have you considered using iControl? Then you could script the activation/deactivation of the pool members with ie. powershell.
/Patrik
Yes, that’s what I was thinking would really be the only option, but I have zero experience of iControl. Looking through the iControl pages I have found a script that adds the default_pool to a vServer. Can you “pile” these commands on top of each other, and can anyone advise how you can store and run the scripts from a simple command?
Example of command;
Do you have any experience with powershell or scripting? If you write the script in meta code I might be able to write one for you tomorrow. 
/Patrik
No experience at all I’m afraid, just playing with the above page i used the list of vServers and pools as follows;
set_default_pool_name( in String vs-22-receivers-mediation virtual_servers, in String po-receivers-mediation-csn2 default_pools, in String vs-22-receivers-opengate-FTP virtual_servers, in String po-receivers-opengate-csn2 default_pools, in String vs-22-receivers-dsp virtual_servers, in String po-receivers-dsp-csn2 default_pools, in String vs-22-receivers-opengate-SNMP virtual_servers, in String po-receivers-opengate-csn2 default_pools, in String vs-22-opengate-cmdb virtual_servers, in String po-opengate-cmdb-csn2 default_pools, in String vs-22-opengate-ch virtual_servers, in String po-opengate-ch-csn2 default_pools, in String vs-22-opengate-ggsn virtual_servers, in String po-opengate-ggsn-csn2 default_pools, in String vs-22-opengate-dsp virtual_servers, in String po-opengate-dsp-csn2 default_pools, in String vs-22-opengate-remedy virtual_servers, in String po-opengate-remedy-csn2 default_pools, in String vs-22-opengatefw-ch virtual_servers, in String po-opengate-ch-csn2 default_pools, in String vs-22-opengate-nvision virtual_servers, in String po-opengate-nvision-csn2 default_pools, in String vs-22-opengate-mesh virtual_servers, in String po-opengate-mesh-csn2 default_pools );
of course I could be completely wrong!
and then i realised the page removed my line feeds but you get the idea
Hehe, actually I am not sure. A guess would be that you want to set the default pool for a couple of virtual servers?
Do you have any scripting experience with any other language? If so, it’d be a breeze to learn some PS and iControl if you get an example. 
/Patrik
I probably just need walking through it by someone who really knows.
Basically inserting a default_pool in each vServer with the script. Does it replace the previous default pool automatically?
I must find somewhere to learn this scripting :-/
Hi Nic
Scripting is nice to know for sure.
But if you don’t know the basics of scripting perhaps a more manual approach would be preferred?
Have you considered logging into the load balancers and change what you need with tmsh? You can have a list of commands ready and just paste them.
/Patrik
Thanks Patrik, if I need to learn scripting to achieve this then I will just have to learn, or find someone who can do it for me.
Admittedly I can write a fault management process to manually enter the tmsh, or gui commands necesary but in designing a new service I would prefer to get it lined up so it has the minimum steps possible in the event that a change-over is required. Even better would be to trigger the script by a single action so it automatically transfers the traffic over to the DR site. We are going to be getting professional services involed anyway, I just thought I could learn a bit more about it in the meantime.
Noted! I’ll fix something. Get back to you later.
What version are you running?
/Patrik
Thanks Patrik, I really appreciate the help.
We will be running 11.4HF3 on 4480N hardware (single blades in the chassis).
Regards, Nic.
That’s great. I assume that you have admin access? Is the web servers IIS? When you want to fail over, will you want to kill the IIS site too? This can be done via powershell and I can include some sample lines for you.
/Patrik
As far as I know none are using IIS. Some of the flows are udp only and encrypted with DTLS.
Basically yes, I’d like to clear and reset any existing sessions and force a reconnect. There may be some persistence … sorry to be vague, even the application designers are vague about their requirements.
I think the simplest approach is just to reset all existing connections, change-over to the DR pool and allow sessions to re-establish. It really is as clunky as that 
Hi!
I have finished the script. There’s not as much parameter validation as I would like but it works and hopefully it’s enough to get you started. 
You need to install the F5 powershell snap-in before you proceed:
Here is the script:
http://climbi.com/b/HPgL7u
Let me know if something is unclear.
/Patrik