Running Service Grid - GSC and GSM

  GigaSpaces 5.X

Documentation Home
Quick Start Guide
Release Notes

Previous release

  Search Here
Searching GigaSpaces Platform 5.X Documentation

                                               

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 Service Grid Admin UI, these appear under the node Service Grid Infrastructure.

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>\ServiceGrid\config\services\services.config.

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

Changing Jini Lookup Service Port
  1. To change the lookup service port when using the Service Grid, use an override. For example, if the machine you are using is pc-lab:1234:
    <overrides>
        <component Name="com.sun.jini.reggie">
            <parameter Name="initialUnicastDiscoveryPort" Value="1234"/>
        </component>
    </overrides>
  2. Set the LOOKUPLOCATORS system property in <GigaSpaces Root>\bin\setenv.bat/sh to match the port number you defined (in this case, pc-lab:1234).

Deploying Infrastructure Services By 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 GSM instance and one GSC instance on the local machine:

  • Execute <Service Grid>/bin/gs-all.bat or .sh
    A console window opens, showing the startup sequence for the GSC and GSM. When the startup sequence ends, one GSM and one GSC have been launched on the local machine.

To deploy one GSC instance on the local machine:

  • Execute <Service Grid>/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 <Service Grid>/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 you deploy the infrastructure services, you can see them running in the Service Grid Admin UI (see Testing Service Grid Environment).

Loading Services Automatically

If you want to load some services automatically when the GSC and GSM start, use the override configuration to specify this. Under the relevant component in the Service Deployment Descriptor, add or edit the tag <Parameter Name="initialOpStrings">. Inside it, add the path of the SDD of the service you want to start automatically, using the following format:

<Parameter Name="initialOpStrings"> 
            <![CDATA[ 
            new String[] {"${GRID_HOME}/config/deployment/computegrid.xml"} 
            ]]> 
</Parameter>

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 <Service Grid Root>/examples directory.
  2. Go to <Service Grid Root>/examples/sample and run ant.
  3. Copy sample.jar, sample-dl.jar and sample.properties to ServiceGrid/lib.
  4. Run gsc, gsm and gs-ui.
  5. Deploy ServiceGrid/examples/sample/config/sample.xml, verify the codebase, then click Deploy.

RELATED TOPICS

Declaring Elements Globally in Deployment Descriptor
Declaring Service UI in Deployment Descriptor
Deployment Descriptor Codebase Element
Deployment Descriptor DeploymentSchedule Element
Deployment Descriptor Parameters and Configuration Elements
Deployment Descriptor SharedComponent Element
Deployment Descriptor SLA Element
deploy - Service Grid CLI
Fixed and Dynamic ServiceBean ProvisionType
Injecting Deployment Descriptor Properties into POJOs
POJO Lifecycle in Service Grid
Proactive Cache
redeploy - Service Grid CLI
Rio OperationalString
Service Associations
Service Deployment Descriptor
Service Grid ClassLoader Hierarchy
undeploy - Service Grid CLI
Using Service Grid to Deploy Partitioned Space
Using Service Grid to Deploy Partitioned Space with Backup
Using Service Grid to Deploy Replicated Space
Using Service Grid to Deploy Space
Using Service Grid to Deploy Spring Applications
Using System Properties for Deployment Descriptor Element Values

Wiki Content Tree


Your Feedback Needed!

We need your help to improve this wiki site. If you have any suggestions or corrections, write to us at techw@gigaspaces.com. Please provide a link to the wiki page you are referring to.

Labels