How Do I Configure Unicast Discovery for Magic xpi 4.x? (Magic xpi 4.7)
| Unicast should be used for all deployment scenarios, including when you are working with a single development machine. |
Unicast means that the Lookup Service (LUS) is located on a specific machine, and that you know the host name or the IP address of this machine. This topic demonstrates how to configure unicast discovery to work with Magic xpi 4.x.
Unicast discovery configuration can be done both manually and automatically.
Manual Configuration of the Lookup Settings
To configure unicast discovery manually, you need to update some files, including defining the same Lookup Group entry and the same Lookup Locator entry in the files, as shown below:
-
In the magicxpi-setenv.bat file (located under: <Magic xpi installation>\Runtime\Gigaspaces\bin):
-
Set the MAGIC_MULTICAST_ENABLED entry to false.
-
Set the LOOKUPLOCATORS entry to the hosts that will run the Lookup Services (LUS). These values should be comma-separated.
-
Leave the LOOKUPGROUPS entry's value as is.
-
In the Magic.ini file's [MAGICXPI_GS] section:
-
Set the LookupLocators entry to the host that will run the Lookup Service (LUS).
-
If the LookupLocators entry does not exist in the Magic.ini file, you should create it.
-
Leave the LookupGroupName entry's value as is.
-
Configure the Mgreq.ini file (located in the <Magic xpi installation>\Runtime folder) with the same settings as those in the Magic.ini file (step 2).
-
Configure the Web requester's Mgreq.ini file (located in the scripts\config folder) with the same settings as those in the Magic.ini file (step 2).
-
Systinet uses the configuration settings from the Mgreq.ini file (located in the <Magic xpi installation>\Runtime folder). The location of the Mgreq.ini file is controlled by the -Dcom.magicsoftware.requester.conf JVM property, which is found in the %WASP_HOME%/bin/Install_GSA_service.bat file and in the %WASP_HOME%/bin/Server.bat file. If you make any changes to the Install_GSA_service.bat file, you must perform the following steps:
-
Uninstall the Systinet service. To do this, open the command console as an administrator (CMD), and navigate to %WASP_HOME%/bin. Then, run the Uninstall_GSA_service.bat file.
-
Install the Systinet service. To do this, open the command console as administrator (CMD) and navigate to %WASP_HOME%/bin. Then, run the Install_GSA_service.bat file.
| You need to have administrator rights to be able to uninstall or install a service. |
Configuring the Grid Services Agent (GSA)
When running in the Unicast discovery mode, the LUS should be started locally on the computer designated in the LookupLocators entry. The rest of the installations should be configured to point to a specific LUS, and therefore should not start one.
-
Since the Grid Services Agent (GSA) loads the LUS, you also need to configure the GSA. This is done in the magicxpi-gs-agent.bat file (located under: <Magic xpi installation>\Runtime\Gigaspaces\bin). To configure the installation that starts the LUS, make the following changes to the magicxpi-gs-agent.bat file :
-
Open the file with Notepad.
-
Comment any existing line starting with call gs-agent.bat. You do this by adding rem at the beginning of the line.
-
Locate the commented line that starts with: any machine with lus service:
-
Copy the text from the call operator and paste it to the end of the script.
The line should be as follows: call gs-agent.bat gsa.gsc 2 gsa.global.gsm 1 gsa.lus 1 gsa.global.lus 0 gsa.mgdeploy 1
The gsa.lus 1 element indicates that the LUS should start with one instance and should be managed locally by the GSA, and not globally on the grid. The gsa.global.lus 0 element indicates that no global LUSs should be started.
-
To configure an installation that only uses the LUS, without starting it, make the following changes to the magicxpi-gs-agent.bat file:
-
Open the file in Notepad.
-
Comment any existing line starting with call gs-agent.bat. You do this by adding rem at the beginning of the line.
-
Locate the commented line that starts with: any machine without lus service:
-
Copy the text from the call operator and paste it to the end of the script.
The line should be as follows: call gs-agent.bat gsa.gsc 2 gsa.global.gsm 1 gsa.lus 0 gsa.global.lus 0 gsa.mgdeploy 1
The gsa.lus 0 element indicates that no local LUSs should be started. The gsa.global.lus 0 element indicates that no global LUSs should be started.