Managing Containers


Starting a Container

To start a container:

Command:

xap container create <host>

Description:

This commands starts a container.

Input Example:

<XAP-HOME>/bin/xap container start myHost

Parameters and Options:

Item Name Description
Parameter host Provide the name of the host where the container should be started.
Option —memory:<memory> Define the maximum amount of JVM memory for the new container.
Option —zone=<zone name> Define the zone where the new container should be started.
Option —property=<String=String> Provide additional system properties.

Path

POST /containers

Description:

This option starts a container.

Example Request:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: text/plain' -d '{ \ 
   "host": "myHost", \ 
   "memory": "12g", \ 
   "zone": "green", \ 
 }' 'http://localhost:8090/v2/containers'

Options:

Option Description Required
memory Define the maximum amount of JVM memory for the new container. No
zone Define the zone where the new container should be started. No
vmArguments Provide additional system properties.
  1. In the Hosts view, click the Actions icon for the Grid Service Agent where you want to start a container.
  2. Select the relevant option:

    • StartGSM - to start a Grid Service Manager
    • StartGSC - to start a Grid Service Container
    • Start Lookup - to start a Lookup Service (LUS)

    The container is started.

Note

If you try to start a global container that is already running under this Grid Service Agent, you get a notification message and the container isn’t started.

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

Refer to the Admin API topics in the Developer Guide.

Terminating a Container

To terminate a container:

Command:

xap container kill <container ID>

Description:

This command stops (terminates) the specified container.

Input Example:

<XAP-HOME>/bin/xap container kill admin~22200

Parameters and Options:

Item Name Description
Parameter container ID ID of the container to be terminated.

Path

DELETE /containers/{id}

Description:

This option stops (terminates) the specified container.

Example Request:

curl -X DELETE --header 'Accept: text/plain' 'http://localhost:8090/v2/containers/admin~13972'

Options:

Option Description Required
containerId ID of the container to be terminated. Yes
  1. In the Hosts view, expand the tree.
  2. In the row with the required container, click the Actions icon and select Terminate from the menu.
  3. Click Yes in the confirmation message.
  4. Click OK.

The container is terminated. The Host view and the status bar at the bottom of the window are updated.

Note

If you terminated a global container, it is started again with a new name.

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

Refer to the Admin API topics in the Developer Guide.

Restarting a Container

To restart a container:

Command:

xap container restart <container ID>

Description:

This command restarts the specified container.

Input Example:

<XAP-HOME>/bin/xap container restart admin~11100

Parameters and Options:

Item Name Description
Parameter container ID ID of the container to be restarted.

Path

DELETE /containers/{id}/restart

Description:

This option restarts the specified container.

Example Request:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: text/plain' 'http://localhost:8090/v2/containers/admin~13972/restart'

Options:

Option Description Required
containerId ID of the container to be restarted. Yes
  1. In the Hosts view, expand the tree.
  2. In the row with the required container, click the Actions icon and select Restart from the menu.
  3. Click Yes in the confirmation message.
  4. Click OK.

The container is terminated and restarted with the same name. The Host view and the status bar at the bottom of the window are updated during the restart progress.

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

Refer to the Admin API topics in the Developer Guide.