Deploy with REST

deploy resource

Syntax

curl -X POST [name] [resource jar/war/zip file / directory location / name] [url/deployments]

Description

A resource (Processing UnitClosed This is the unit of packaging and deployment in the GigaSpaces Data Grid, and is essentially the main GigaSpaces service. The Processing Unit (PU) itself is typically deployed onto the Service Grid. When a Processing Unit is deployed, a Processing Unit instance is the actual runtime entity.) can be easily deployed onto the Service GridClosed A built-in orchestration tool which contains a set of Grid Service Containers (GSCs) managed by a Grid Service Manager. The containers host various deployments of Processing Units and data grids. Each container can be run on a separate physical machine. This orchestration is available for Smart Cache only. For Smart DIH, we recommend using our Kubernetes orchestration.. In order to deploy a resource, the Processing Unit must follow the processing unit directory structure. Before deploying the processing unit you will need to jar it and then specify that jar file as the resource to the POST command. The deployment process will upload the jar file to all the GSMs it finds and unpack it under the deploy directory. It will then issue the deploy command.

Options

Option Description Mandetory
name Deployment unique name YES
resource Name of resource which contains binary files for deployment jar/war/zip YES
topology Deployment topology NO
sla SLA definitions NO
contextProperties Properties overriding puClosed This is the unit of packaging and deployment in the GigaSpaces Data Grid, and is essentially the main GigaSpaces service. The Processing Unit (PU) itself is typically deployed onto the Service Grid. When a Processing Unit is deployed, a Processing Unit instance is the actual runtime entity..properties NO

The number of backups per partition is zero or one.

Examples:

The following deploys a processing unit jar file named data-processor.jar using the sync_replicated cluster schema with 2 instances.

curl -X POST --header 'Content-Type: application/json' --header 'Accept: text/plain' -d '{
   "name": "data-processor", 
   "resource": "data-processor.jar", 
   "topology": { 
     "schema": "sync_replicated", 
     "instances": 2, 
     "partitions": 0,  
     "backupsPerPartition": 0 
   },  
   "sla": {  
     "requiresIsolation": true, 
     "zones": [ 
       "green" 
     ], 
     "maxInstancesPerVM": 1, 
     "maxInstancesPerMachine": 1 
   }, 
   "contextProperties": {}  
 }' 'http://localhost:8090/v1/deployments'

deploy space

Syntax

 curl -X POST  [url/spaces] [space name] [options]

Description

A SpaceClosed Where GigaSpaces data is stored. It is the logical cache that holds data objects in memory and might also hold them in layered in tiering. Data is hosted from multiple SoRs, consolidated as a unified data model. only Processing Unit can be easily deployed onto the Service Grid.

Options

Option Description Mandatory Default
name Name of the space YES
partitions Number of partitions NO 0
backups true if each partition should have a backup, false otherwise NO false
requiresIsolation

true if each instance should be provisioned in an isolated container, i.e. without any other instances at the same container, false otherwise.

 

NO false

The "requires isolation" configuration for Processing Units is deprecated and will be removed in a future release.

Examples:

The following deploys a simple space named mySpace:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: text/plain' 'http://localhost:8090/v1/spaces?name=mySpace&partitions=0&backups=false&requiresIsolation=false'

The following deploys a space named mySpace, using 4 partions with each a backup and the isolation level set to true, requesting that the instances need to be deployed on different machines.

curl -X POST --header 'Content-Type: application/json' --header 'Accept: text/plain' 'http://localhost:8090/v1/spaces?name=mySpace&partitions=4&backups=true&requiresIsolation=true'

undeploy resource

Syntax

curl -X DELETE [url]/deployments/resource_name

Description

Undeploys an application from the service grid, while respecting pu dependency order.

Example:

curl -X DELETE --header 'Accept: text/plain' 'http://localhost:8090/v1/deployments/myPu'