Forum Discussion
Configure many Virtual Servers pool with one iRule?
Hello,
We have an environment that uses a single virtual server to host our main website. When we release code, we swap the virtual server pool membership between Prod/Non-Prod legs, where the non-active pool has the updated code, and by switching to the non-active pool, that is how we send all of our traffic to the servers with the new code.
There is also have an application server cluster that has many services listening across multiple Virtual Servers that also needs to swap when we perform a release. Right now our pain point is that we have 20-30 of these applications load balanced, and we have 20-30 swaps to perform to redirect app traffic down the path to the updated servers.
Could one write an iRule to automatically swap these application pools based on what the active leg is of our main websites virtual server? We use fairly consistent naming conventions across our virtual servers/pools.
Thanks.
Hello to you too,
not an iRule but you could automate this task with a tmsh command.
tmsh modify ltm virtual <your_vs_name> pool <your_new_pool_name>
For doing this 30 times you could write a small shell script.
That would be (don't take offense) the lowest level of automation. You could as well achieve the same using the Rest API (see here) or some configuration management tool like Ansible (start from here).
Good luck.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com