/mgmt/deployments

Documentation

Home » Documentation » Enterprise Manager Guide

/mgmt/deployments

/mgmt/deployments — Manage deployment resources

Synopsis

/mgmt/deployments

/mgmt/deployments/{deployment-id}

Methods

GET

Fetches information about the deployments defined within the Enterprise Manager. A call without a deployment ID returns a list of the known deployments. A call with a deployment ID returns the attributes for that deployment.

POST

Adds a deployment to the Enterprise Manager. You must provide the attributes of the deployment as arguments in the body of the request.

PUT

Updates the deployment specified by ID in the URL with the attribute values in the body of the request.

DELETE

Deletes the specified deployment from the Enterprise Manager. You must specify a valid deployment ID in the URL and the deployment cannot be currently included in any active database object.

Arguments

A deployment is a set of attributes used for configuring the database servers at startup. These attributes are similar to the arguments you specify in a deployment file when starting a VoltDB database manually.

For the POST and PUT methods, you must provide the attribute values in the body of the call. You specify the attributes as a JSON-encoded string. The structure of the deployment object is as follows:

Argument NameTypeDescription
nameTextThe name of the deployment
voltrootTextThe destination directory where files are stored on the cluster nodes
kfactorIntegerThe K-safety value for the cluster
sitesperhostIntegerThe number of sites per host to create on each node
elasticBoolean (read-only)Whether elastic scaling is enabled or not
httpportIntegerThe HTTP port
jsonenabledBooleanWhether the JSON API is to be enabled or not
snapshotpathStringThe path where automated snapshots are stored on the cluster nodes. Paths are relative to the VoltDB root path, which is a subfolder of voltroot, using the database ID as the subfolder name.
snapshotfrequencyIntegerThe frequency (in seconds) for automated snapshots. A frequency of zero disables automated snapshots.
snapshotretainIntegerThe number of automated snapshots to keep on the server(s). If more automated snapshots are created, any older snapshots above the retention limit are purged.
exportBooleanWhether export is enabled or not
exportoverflowpathStringThe path where export overflow data is stored on the cluster nodes. Paths are relative to the VoltDB root path, which is a subfolder of voltroot, using the database ID as the subfolder name.
exporttypeStringThe target for export, Allowable values are "file" and "jdbc".
exportparametersObjectThe configuration properties for the selected export type. The properties are returned and set as a simple JSON object consisting of name/value pairs. The name/value pairs are the same as the properties set using the <property> tags within <export> and <configuration> in the deployment file.
securityBooleanWhether security is enabled or not
partitiondetectionBooleanWhether network partition detection is enabled or not
adminportIntegerThe admin port number
userbytesByte StringThe contents of a VoltDB deployment containing user definitions to import
heartbeattimeoutIntegerThe cluster heartbeat timeout interval (in seconds)
commandlogenabledBooleanWhether command logging is enabled or not
commandlogsyncBooleanWhether command logging is synchronous (true) or not (false)
commandlogfreqtimeIntegerThe frequency of command logging (in milliseconds)
commandlogfreqtxnsIntegerThe frequency of command logging (in number of transactions)
commandlog​pathStringThe path where command logs are written. Paths are relative to the VoltDB root path, which is a subfolder of voltroot, using the database ID as the subfolder name.
commandlogsnapshot​pathStringThe path where command log snapshots are stored. Paths are relative to the VoltDB root path, which is a subfolder of voltroot, using the database ID as the subfolder name.
commandlogsizeIntegerThe initial space allocated for the command logs (in megabytes)
snapshotpriorityIntegerThe priority of snapshot activity (from 0 to 10)
maxtemptablememoryIntegerThe maximum size of temp table memory usage (in megabytes)

Examples

Since no arguments are required, it is possible to specify an empty top-level JSON object, to create a deployment with the default settings:

curl --data '{"Deployment":{}}' \
http://localhost:9000/man/api/1.0/mgmt/deployments/

The next example uses several attributes to create a deployment useful for local testing (in this case, without K-safety and with a destination directory in /tmp):

curl --data '{"Deployment":{"name":"test", 
                            "kfactor":"0",
                            "voltroot":"/tmp/test"}}' \
http://localhost:9000/man/api/1.0/mgmt/deployments/

The last example demonstrates how to load user names and passwords into the deployment object. Security credentials are imported from an existing VoltDB deployment file. In this example, two user definitions are written to a file, Base64 encoded, then inserted using the userbytes argument:

echo '<deployment><users>
   <user name="spade" password="hammett" groups="users"/>
   <user name="marlowe" password="chandler" groups="users"/>
      </users></deployment>' > userdef.xml
BYTES=$( base64 userdef.xml )
curl --data "{\"Deployment\":{\"name\":\"test\", \
            \"userbytes\":\"$BYTES\"}}" \
http://localhost:9000/man/api/1.0/mgmt/deployments/