Deploying a Processing Unit

To deploy a Processing Unit to the Service Grid:

Command:

xap pu deploy or insightedge pu deploy

Description:

Deploys a Processing Unit to the service grid.

Parameters and Options:

Item Name Description
Parameter name Name of the Processing Unit to deploy
Parameter file Path to the Processing Unit file (.jar or .zip).
Option backups=<backups> Specify the number of backups per partition. Can be zero or one.
Option instances=<instances> Number of instances.
Option max-instances-per-machine=<maxInstancesPerMachine> Define the maximum number of instances on same machine (from each partition).
Option max-instances-per-vm=<maxInstancesPerVM> Define the maximum number of instances on same VM (from each partition).
Option partitions=<partitions> Number of partitions.
Option property=<String,String> Context properties.
Option schema=<schema> Cluster schema/topology (partitioned, sync_replicated, async_replicated).
Option requires-isolation

If this Processing Unit should not share a container, adding this option provisions the Processing Unit in a dedicated container.

Option zones=<zones> Define which zones can host this Processing Unit.
Option primary-zones=<a,b,c> Define a list of preferred zones for primary instances (applies only when Deterministic Deployment is configured).

Input Example:

This example deploys a PU named myPu with 2 partitions using the mypu.jar file.

$GS_HOME/bin/xap pu deploy --partitions=2  myPu  mypu.jar

Path

POST /pus

Description:

Deploys a Processing Unit to the service grid.

Example:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: text/plain' -d '{ \ 
    "name": "myPu", \ 
    "resource": "myPu.jar", \ 
    "sla": { \ 
      "requiresIsolation": true, \ 
      "zones": [ \ 
        "string" \ 
      ], \ 
      "maxInstancesPerVM": 1, \ 
      "maxInstancesPerMachine": 1 \ 
    }, \ 
    "contextProperties": {} \ 
  }' 'http://localhost:8090/v1/deployments'

Options:

Option Description Required
name Name of the Processing Unit. Yes
resource File/Path to the Processing Unit file (.jar or .zip). Yes
schema Type of clustering schema/topology to use. No
instances Number of instances to deploy. No
partitions Number of partitions. No
backupsPerPartition Number of backups per partition. Can be zero or one. No
requiresIsolation If this Processing Unit should not share a container, adding this option provisions the Processing Unit in a dedicated container. No
zones Which zones can host this processing unit. No
primaryZones Define a list of preferred zones for primary instances (applies only when Deterministic Deployment is configured). No
contextProperties Context properties. No
  1. From the Deploy menu on the menu bar, select Processing Unit.
  2. In the Processing Unit Deployment dialog box, do the following:

    1. To search an external repository for the relevant resource file, select the Upload jar/war/zip file option, click the Browse button next to the Upload file box, and select the required file.
    2. To use a local resource file, select the Select from list option and select the required file from the dropdown list.
    3. (Optional) If you want this Processing Unit to have a different name from the one specified in the resource file, type the new name in the Override Processing Unit name box.
    4. (Optional) If you want this Processing Unit to be secure, do the following In the User Login Details area:
      • Select Secured Space.
      • Provide the user credentials in the User Name and Password boxes.
  3. In the Cluster Info area, apply the required configuration details:

    1. In the Cluster schema box, specify the SLA definitions (cluster topology):
      • None - A standalone Processing Unit with an embedded Space.
      • Partitioned - A cluster that is partitioned across the instances that are specified.
      • Sync_replicated - A cluster with synchronous replication across the instances that are specified.
      • Async_replicated - A cluster with asynchronous replication across the instances that are specified.
    2. In the Number of Instances box, specify the number of primary Processing Unit instances to deploy in the cluster.
    3. (For partitioned clusters) In the Number of Backups box, define the number of backup Processing Units for each primary Processing Unit.

      The number of backups can be zero or one.

    4. In the Max Inst. per VM box, define the maximum number of Processing Unit instances each virtual host may contain (the default is 1).
    5. In the Max Inst. per VM box, define the maximum number of Processing Unit instances each physical host may contain.
    6. If you have more than one host, you can specify on which host to deploy the primary Processing Unit instances.
  4. Click Deploy.

Refer to the GigaSpaces Management Center topics in the Administration section.

Refer to the Admin API topics in the Developer Guide.