Summary: How to start a Grid Service Monitor and Grid Service Container, using the CLI or Admin UI.

Overview

The Grid Service Container (GSC) is a container that provides remote access to services running on a specific machine. The Grid Service Manager (GSM) is a service that monitors a specific set of GSCs and automates the provisioning and deployment of services on these GSCs. The GSC and GSM are called the Service Grid's infrastructure services. In the GigaSpaces Management Center Deployments tab, these appear under the Service Grid Infrastructure node.

For the Service Grid to operate, at least one GSC and one GSM must be deployed. You can deploy one or more GSC and GSM by executing a script in the Service Grid bin folder, or via the Admin UI. Deploying through the Admin UI offers more startup options.

If you deploy more than one GSM using the same Jini Lookup Service, the GSMs will function as one logical unit: if one GSM fails, another GSM takes its place and takes responsibility for its GSCs. However, if you deploy two GSMs using two different lookup services, they function as two separate units.

The GSC and GSM configuration is located under <GigaSpaces Root>\config\services\services.config.

For details about the GSC and GSM configuration parameters, see the following packages:

Running GSM and GSC

There are two ways to run the GSM and GSC:

Using Deployments Tab

Running the GSM/GSC using the GigaSpaces Management Center is meant for development and testing purposes only. This option shouldn't be used for production, mainly since it starts local processes of the GSC/GSM.

Launching the GSM/GSC using the GigaSpaces Management Center is new in GigaSpaces version 6.5 and onwards.

The Deployments tab Launch menu allows you to run GSMs and GSCs services as local processes on the machine which runs the GigaSpaces Management Center. There are two options:

Launching Directly

In the GigaSpaces Management Center (either in the Space Browser tab or the Deployments tab) top menu, click Launch > Grid Service Container or Grid Service Manager:

In the bottom Details area, you can view the GSM/GSC, which is represented by a tab showing the service output.


Launching with Service Grid Launch Utility

  1. In the GigaSpaces Management Center (either in the Space Browser tab or the Deployments tab) top menu, click Launch > Service Launcher. The Service Grid Launch Utility window opens.
  2. In the Select Service to Launch area, select either Grid Service Container or Grid Service Manager.



  3. Type a label in the Label text box. This is the name of the service displayed in the Details area (see step 11 below).
  4. Uncheck the Launch and Leave checkbox if you would like to launch additional GSCs and GSMs before you close the window.
  5. If you would like to configure your GSM/GSC, click the Properties tab. Otherwise, continue to step 9 below.
  6. Edit the Properties tab fields - use the browse button ( ) to browse to your JVM location, or for the rest of the fields, use the set buttons ( ), which open an editor that allows you to conveniently view and edit each field:





    The Properties tab fields allow you to configure the JVM running your GSM/GSC.
    If you choose to launch additional GSMs or GSCs before you close this window (see step 9 below), any edited fields are automatically defined for any additional GSC or GSM. If you want to return the default values in all fields, press Defaults.

  7. Press Save.
  8. Press Launch GSC or Launch GSM.
  9. If you left the Launch and Leave checkbox checked, the window closes. If you unchecked it, the window stays open. In this case, continue launching additional GSMs and/or GSCs as desired, and when finished, press Close.

    In the Details area, each GSM/GSC is represented by a tab, which includes the service output. The tab's name is defined in the Label text box (see step 2 above).



    GSMs/GSCs launched by executing script (see the following section), are not shown in the Details area.

    Terminating GSM/GSC
    • The x button in each GSC/GSM tab ( ) terminates the GSM/GSC.
    • Closing the GigaSpaces Management Center terminates all running GSMs/GSCs.

Executing Script

You can deploy both infrastructure services at the same time, or only one of them. Repeat the procedures below to deploy multiple GSMs or GSCs on the local machine.

To deploy one GSC instance on the local machine:

  • Execute <GigaSpaces Root>\bin\gsc.bat or .sh
    A console window opens, showing the startup sequence for the GSC. When the startup sequence ends, one GSC has been launched on the local machine.

To deploy one GSM instance on the local machine:

  • Execute <GigaSpaces Root>\bin\gsm.bat or .sh
    A console window opens, showing the startup sequence for the GSM. When the startup sequence ends, one GSM has been launched on the local machine.

After deploying the GSM and GSC, you can see them running in the GigaSpaces Management Center Deployments tab.

Setting Initialization Properties on Startup

You can set the Service Grid to load a service bean on on startup, with a mechanism to set initialization properties for your applications. Your initializing service must be written as a ServiceBean using the Rio component model. This will allow you to obtain the ServiceBeanContext to do the things you require on startup.

To load an initialization service bean on startup:

  1. Add a PlatformCapability to the GSC.
  2. Declare the PlatformCapability in the deployment descriptor of the services which require your platform to be initialized.

Example

For an example of setting initialization properties on startup, see the attached ZIP file. It contains the following:

  • A sample deployment descriptor declaration
  • Two sample services - an initialization service and a dependent service
  • A build.xml file
  • A properties file (showing how to load it from the service bean)

To run the example:

  1. Extract the attached ZIP file under the <GigaSpaces Root>\examples\Advanced\ServiceGrid directory.
  2. Go to <GigaSpaces Root>/examples/Advanced/ServiceGrid/sample and run ant.
  3. Copy sample.jar, sample-dl.jar and sample.properties to <GigaSpaces Root>/lib.
  4. Run gsc, gsm and gs-ui.
  5. Deploy <GigaSpaces Root>\examples\Advanced\ServiceGrid\sample\config\sample.xml, verify the codebase, then click Deploy.
GigaSpaces.com - Legal Notice - 3rd Party Licenses - Site Map - API Docs - Forum - Downloads - Blog - White Papers - Contact Tech Writing - Gen. by Atlassian Confluence