Cluster Lifecycle Management

The Lifecycle Manager (LCM) API provides tools for provisioning and configuring DSE on existing hardware or virtual machines. This is a RESTful API that supports everything provided by the OpsCenter LCM user interface and allows for greater control and automation by API users.

Lifecycle Manager implements a centralized approach to configuration management and installation. The OpsCenter server maintains what the state of the cluster should be and Jobs are what make it so. With the exception of a cluster import, LCM always pushes configuration to the nodes. It does not attempt to reconcile differences between configuration state on the nodes and what it thinks the state should be. Thus, any local hand-made changes to configs on the nodes are overwritten by the next configure job.

  • Repository yum/apt repository information for access to DSE packages.

  • Machine Credentials SSH credentials and privilege escalation (sudo/su).

  • Config Profile configuration settings for DSE components (cassandra.yaml, dse.yaml, etc.)

  • Config File Definitions - describing the structure, properties, and rendering options for config files.

  • Cluster information about the DSE cluster. Contains datacenters.

  • Datacenter information about DSE datacenters. Contains nodes.

  • Node information about individual DSE nodes.

  • Jobs information about the job system.

  • Cluster Install Walk-through a step-by-step walk-through for defining and installing a DSE cluster.

Common Response Properties

Most objects returned by API endpoints share a set of common properties, many of which are transient or read-only. These include:

Property Description of Value

id

A UUID surrogate key for the object. Used in URLs to identify the object.

type

The object type.

created-on

A timestamp indicating when the object was created.

created-by

Who created the object.

Currently only 'system' is used for created-by and modified-by. This will support user names for auditing in a future release.

modified-on

A timestamp indicating the last time the object was changed.

modified-by

Who changed the object.

Field filter support is currently very simple and has the following limitations:

  • timestamp fields are not currently supported (created-on, modified-on), although they can be used as an order field.

  • multiple filters are ANDed. OR is not supported.

  • only equality is supported, no ranges or inequalities.

  • IN and LIKE are not supported.

href

The full URL to the object.

related-resources

A map of resource name (i.e., "datacenters") to a full URL to the resource.

Example:

{
    "id": "ba908cb4-9116-4cf9-abe6-694ad75b70d3",
    "type": "machine-credential",
    "created-on": "2016-06-20T21:00:41.405Z",
    "created-by": "system",
    "modified-on": "2016-06-20T21:00:41.405Z",
    "modified-by": "system",
    "href": "http://localhost:8888/api/v2/lcm/machine_credentials/ba908cb4-9116-4cf9-abe6-694ad75b70d3",
    "related-resources": {
        "datacenters": "http://localhost:8888/api/v2/lcm/machine_credentials/ba908cb4-9116-4cf9-abe6-694ad75b70d3/datacenters/",
        "nodes": "http://localhost:8888/api/v2/lcm/machine_credentials/ba908cb4-9116-4cf9-abe6-694ad75b70d3/nodes/",
        "clusters": "http://localhost:8888/api/v2/lcm/machine_credentials/ba908cb4-9116-4cf9-abe6-694ad75b70d3/clusters/"
    },

    // type-specific properties...
    "name": "my cluster creds",
    "use-ssh-keys": false,
    "login-user": "johndoe"
}

Paginated Results

There are a number of API endpoints that return listings of objects. All of these return a paginated list of results, with each page limited to a certain [configurable] number of objects to avoid very large response sizes. All paginated results have the following properties:

Properties Description of Value

results

The list of objects in the current page.

count

The total number of results (across all pages).

per-page

Limits the number of objects per page.

current

The current page number.

previous

The previous page number. Is null when on the first page.

next

The next page number. Is null when on the last page.

Example:

{
    "next": null,
    "previous": null,
    "last": 1,
    "count": 1,
    "per-page": 50,
    "current": 1,
    "results": [
        {
            "created-on": "2016-06-20T21:00:41.405Z",
            "type": "machine-credential",
            "related-resources": {
                "datacenters": "http://localhost:8888/api/v2/lcm/machine_credentials/ba908cb4-9116-4cf9-abe6-694ad75b70d3/datacenters/",
                "nodes": "http://localhost:8888/api/v2/lcm/machine_credentials/ba908cb4-9116-4cf9-abe6-694ad75b70d3/nodes/",
                "clusters": "http://localhost:8888/api/v2/lcm/machine_credentials/ba908cb4-9116-4cf9-abe6-694ad75b70d3/clusters/"
            },
            "modified-on": "2016-06-20T21:00:41.405Z",
            "name": "my cluster creds",
            "login-user": "johndoe",
            "id": "ba908cb4-9116-4cf9-abe6-694ad75b70d3",
            "href": "http://localhost:8888/api/v2/lcm/machine_credentials/ba908cb4-9116-4cf9-abe6-694ad75b70d3"
        }
    ]
}

All endpoints with paginated results support the following query string parameters, in addition to supporting object-specific field filters for most fields.

Field filter support is currently very simple and has the following limitations:

  • timestamp fields are not currently supported (created-on, modified-on), although they can be used as an order field.

  • multiple filters are ANDed. OR is not supported.

  • only equality is supported, no ranges or inequalities.

  • IN and LIKE are not supported.

Query String Param Description of Value

per-page

Changes the page-size limit (up to 300 max).

page

The page number to fetch. Not required for page 1.

order

An object field to order by. Only 1 order field is supported at this time.

direction

Sort direction: ASC or DESC for ascending (default) or descending.

<object field>

Filter results by field value. Multiple field filters are supported, and are ANDed together. Specify null field values by including just the field name with no parameter value or = character. There are some limitations.

Field filter support is currently very simple and has the following limitations:

  • timestamp fields are not currently supported (created-on, modified-on), although they can be used as an order field.

  • multiple filters are ANDed. OR is not supported.

  • only equality is supported, no ranges or inequalities.

  • IN and LIKE are not supported.

Example:

 curl http://localhost:8888/api/v2/lcm/machine_credentials/?login-user=johndoe&page=5&per-page=10&order=created-on&direction=DESC

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com