Forum Discussion
Use iRules-LX to Blue/Green Deployment
Hello I've been learning IRules-LX,I hope to get http post username through iRules,Then used the username call to node.js(mysql npm) select mysql database.if the username select result is "green".loadbalance to green pool. Or else loadbalance to blue pool.
Has anyone ever tested it ? Is there an I/O bottleneck?
Thanks everyone
- 235Nimbostratus
Hello everyone My Irules is below:
when HTTP_REQUEST { if { [HTTP::username] ne "" } { log local0. "User [HTTP::username] has been authorized to access virtual server [virtual name]" Client supplied a valid username, so initialize the iRulesLX extension
But My /var/log/ltm desplay erro log :Jun 21 15:22:12 v13 err tmm[28004]: 01220001:3: TCL error: /Common/iruleslx_mysql_plugin/mysql_irulelx - Could not find ILX extension mysql_extension in path iruleslx_mysql_plugin (line 4) invoked from within "ILX::init "iruleslx_mysql_plugin" "mysql_extension"" How to troubleshotting ?
Thanks
- 235Nimbostratus
@Niels van Sluis Thanks for you help : )
I've solved the problem. I rewrite my code then don't have display error log.
Not sure why it doesn't work in your case. I just setup something similar in my lab running 13.1.0.6 and it just works.
root@(nielsvs-bigip)(cfg-sync Standalone)(Active)(/Common)(tmos) list ilx plugin iruleslx_mysql_plugin ilx plugin iruleslx_mysql_plugin { extensions { mysql_extension { } } from-workspace iruleslx_mysql_workspace log-publisher local-db-publisher node-version 6.9.1 staged-directory /var/ilx/workspaces/Common/iruleslx_mysql_workspace } root@(nielsvs-bigip)(cfg-sync Standalone)(Active)(/Common)(tmos) quit [root@nielsvs-bigip:Active:Standalone] config ls -la /var/ilx/workspaces/Common/iruleslx_mysql_workspace/extensions/mysql_extension/ total 20 drwxrwxr-x. 3 root sdm 4096 2018-06-24 16:35 . drwxrwxr-x. 3 root sdm 4096 2018-06-24 16:35 .. -rw-rw-r--. 1 root sdm 951 2018-06-24 16:38 index.js drwxrwxr-x. 3 root sdm 4096 2018-06-24 16:35 node_modules -rw-rw-rw-. 1 root sdm 381 2018-01-16 17:45 package.json [root@nielsvs-bigip:Active:Standalone] config
Does
shows that the extension is running?tmsh show ilx plugin iruleslx_mysql_plugin
[root@nielsvs-bigip:Active:Standalone] config tmsh show ilx plugin iruleslx_mysql_plugin | grep -B 2 Status | Extension: mysql_extension ------------------------------- | Status running -- | Extension Process: mysql_extension ------------------------------------------ | Status running -- | Extension Process: mysql_extension ------------------------------------------ | Status running [root@nielsvs-bigip:Active:Standalone] config
- 235Nimbostratus
Hi Niels van Sluis
Thanks for your reply.My tmsh comamnd output is below:
[root@v13:Active:Standalone] config tmsh list ilx plugin iruleslx_mysql_plugin ilx plugin iruleslx_mysql_plugin { extensions { mysql_extension { } } from-workspace iruleslx_mysql_workspace log-publisher local-db-publisher node-version 6.9.1 staged-directory /var/ilx/workspaces/Common/iruleslx_mysql_workspace }
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