Methods of configuration for Content Based Routing
Learn about the methods that you can use to configure Content Based Routing (CBR). The documentation assumes use of the command line.
For Linux or UNIX systems: Stop Caching Proxy by finding its process identifier by using the ps -ef | grep ibmproxy command and then ending the process by using the kill process_id command.
For Windows systems: Stop Caching Proxy from the Services panel.
Command line
The command line is the most direct means of configuring Content Based Routing. The command parameter values must be entered in English characters. The only exceptions are host names (used, for example, in cluster and server commands) and file names.
- Start cbrserver, as follows:
Go to the <install_root>/cbr/servers/bin directory and issue the following command from the command prompt:
To stop the service, enter the following command:cbserver
cbserver stop
Click Start > Control Panel > Administrative Tools > Services. Right-click IBM Content Based Routing and select Start. To stop the service, follow the same steps and select Stop.
- Issue the CBR control commands you want in order to set up your configuration. The command is cbrcontrol. Read the Commands topic for more information about commands
- Start Caching Proxy by entering the ibmproxy command at a command prompt. You
must start the executor prior to starting Caching Proxy.
On Windows platforms, click Start > Settings (for Windows 2000) > Control Panel > Administrative Tools > Services.
cbcontrol he f
instead of cbcontrol help file
To start the command line interface issue cbcontrol to receive an cbcontrol command prompt. To end the command line interface issue the exit or quit commands.
![[Windows]](../images/windows.gif)
- In the Services window, right-click IBM Dispatcher.
- Select Properties.
- In the Startup type field, select Manual.
- Click OK, and close the Services window.
- ( ) right and left parentheses
- & ampersand
- | vertical bar
- ! exclamation point
- * asterisk
rule add 10.1.203.4@80@cbr_prod_rule_ek type content pattern uri=/nipoek/*
For
this same command to work at the operating system prompt, you must place double quotation marks
(″ ″) around the pattern as
follows:cbrcontrol rule add 10.1.203.4@80@cbr_prod_rule_ek type content pattern "uri=/nipoek/*"
If
the quotation marks are not used, some of the pattern might be truncated when the rule is saved in
CBR. Quotation marks are not supported when you use the cbrcontrol>> command
prompt.Scripts
- To update the current configuration, run the following executable commands from your script
file:
cbcontrol file appendload myscript
- To completely replace the current configuration, run the following executable commands from your
script file:
cbcontrol file newload myscript
cbcontrol file save savescript
This command saves the configuration script file in the install_root/servers/configurations/cbr directory.
GUI
- Ensure cbserver is running, as follows:
Run the following as root user by issuing the following command from the <install_root>/cbr/servers/bin directory:
cbserver
cbserver runs as a service that starts automatically.
- Start the GUI:
Run the following command:
lbadmin
Click Start > Programs > IBM WebSphere > Edge Components > IBM Load Balancer > Load Balancer
- Start Caching Proxy, as follows:
ibmproxy
Go to the Services panel by clicking Start > Settings (for Windows 2000) > Control Panel > Administrative Tools > Services
To configure the CBR component from the GUI, you must first select Content Based Routing in the tree structure. You can start the executor and manager after you connect to a Host. You can also create clusters that contain ports and servers, and start advisors for the manager.
The GUI can be used to do anything that you would do with the cbrcontrol command. For example, to define a cluster with the command line, you would enter cbcontrol cluster add cluster command. To define a cluster from the GUI, right-click Executor, then in the menu, left-click Add Cluster. Enter the cluster address in the window, then click OK.
You can load pre-existing CBR configuration files by using the Load New Configuration (for completely replacing the current configuration) and Append to Current Configuration (for updating the current configuration) options that are presented in the Host menu. Save your CBR configuration to a file periodically by using the Save Configuration File As option that is also presented in the Host menu. The File menu that is at the top of the GUI allows you to save your current host connections to a file or restore connections in existing files across all Load Balancer components.
- Help: Field level describes each field, default values
- Help: How do I lists tasks that can be done from that screen
- InfoCenter provides centralized access to product information
- Highlight the Host node from the GUI tree and select Send command... from the host menu.
- In the command entry field, type the command that you want to run, for example:
The results and history of the commands run in the current session and display in the window provided.executor report
The configuration wizard
- Go to the <install_root>/cbr/servers/bin directory and issue cbserver at the command prompt as root user or administrator.
- Start the wizard function of Content Based Routing by issuing the cbwizard command or select the Configuration wizard from the CBR component menu, as presented in the GUI.
- Start Caching Proxy to load balance HTTP or HTTPS (SSL) traffic, as follows:
ibmproxy
Start Caching Proxy on the Services panel by clicking Start > Settings (for Windows 2000) > Control Panel > Administrative Tools > Services.
The CBR wizard guides you step-by-step through the process of creating a basic configuration for the CBR component. The wizard asks you questions about your network and guides you as you set up a cluster that enables CBR to load balance traffic between a group of servers.