Config Profile

Config profiles contain configuration information used by LCM to generate config files on the cluster’s nodes. These files include cassandra.yaml, cassandra-env.sh, dse.yaml, and more. See Config File Definitions for more information about the configuration options for each file.

Managing Config Profiles URL

Get a config-profile by ID

Get a list of config-profiles

Create a config-profile

Update a config-profile

Delete a config-profile

Clone a config-profile

Managing Config Profiles

Config Profile

{
    "id": <value>,
    "name": <value>,
    "datastax-version": <value>,
    "agent-version": <value>,
    "config-path": <value>,
    "json": {<file-id>: <config properties>},
    "comment": <value>
}

Property

Description of Values

id

A UUID for the Config Profile.

name

A user-defined name for the Config Profile. Required.

datastax-version

The version of DSE to install and configure. Config profiles are tied to a specific version. Required.

agent-version

Not used at this time.

config-path

The base path for configuration files - defaults to /etc/dse/. Note that at this time, only package installations are supported, so you will probably never need to use this. Also, dense nodes (multi-node instances) are not supported.

json

This is a JSON object containing the configuration information, keyed by file-id. See Config File Definitions.

GET /api/v2/lcm/config_profiles/{id}

Gets a specific config profile record by ID.

Path arguments: id: A Config Profile ID.

Returns a Config Profile object.

Example:

 curl http://localhost:8888/api/v2/lcm/config_profiles/c0c4c347-ad00-4b67-aa05-fbcd1be02041

Output:

{
   "agent-version": null,
   "created-on": "2016-06-20T14:36:15.833Z",
   "type": "config-profile",
   "datastax-version": "5.0.0",
   "related-resources": {
       "datacenters": "http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/datacenters/",
       "nodes": "http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/nodes/",
       "clusters": "http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/clusters/"
   },
   "modified-by": "system",
   "modified-on": "2016-06-20T14:36:15.833Z",
   "name": "dev",
   "config-path": null,
   "json": {
       "cassandra-yaml": {
           "gc_warn_threshold_in_ms": 1500
       }
   },
   "comment": "development profile",
   "id": "265c4d0f-70d9-449e-9439-bddd7d55a46b",
   "href": "http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b",
   "created-by": "system"
}

GET /api/v2/lcm/config_profiles/

Gets a paginated list of all Config Profile records. See Paginated Results for an overview of the query string parameters that can be used.

Notice that the response for listings does not include the json field. This is intentional, as this field could grow very large. To get the json field, you must request the specific config profile by ID (see GET /api/v2/lcm/config_profiles/{id}).

Example:

 curl http://localhost:8888/api/v2/lcm/config_profiles/

Output:

{

   "next": null,
   "previous": null,
   "last": 1,
   "count": 1,
   "per-page": 50,
   "current": 1,
   "results": [
       {
           "agent-version": null,
           "created-on": "2016-06-20T14:36:15.833Z",
           "type": "config-profile",
           "datastax-version": "5.0.0",
           "related-resources": {
               "datacenters": "http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/datacenters/",
               "nodes": "http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/nodes/",
               "clusters": "http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/clusters/"
           },
           "modified-on": "2016-06-20T14:36:15.833Z",
           "name": "dev",
           "config-path": null,
           "id": "265c4d0f-70d9-449e-9439-bddd7d55a46b",
           "href": "http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b"
       }
   ]
}

[[method- post-config-profile-object]] === POST /api/v2/lcm/config_profiles/

Creates a new config profile record.

Body: A Config Profile object (with no id property)

Returns the newly created Config Profile object.

Example:

Input:

{
   "datastax-version":"5.0.0",
   "name":"dev",
   "comment":"development profile",
   "json":{
       "cassandra-yaml":{
           "gc_warn_threshold_in_ms":1500
       }
   }
}
 curl -X POST -d '<example-input>' http://localhost:8888/api/v2/lcm/config_profiles/

Output:

{
   "agent-version": null,
   "created-on": "2016-06-20T14:36:15.833Z",
   "type": "config-profile",
   "datastax-version": "5.0.0",
   "related-resources": {
       "datacenters": "http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/datacenters/",
       "nodes": "http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/nodes/",
       "clusters": "http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/clusters/"},
   "modified-by": "system",
   "modified-on": "2016-06-20T14:36:15.833Z",
   "name": "dev",
   "config-path": null,
   "json": {
       "cassandra-yaml": {
           "gc_warn_threshold_in_ms": 1500
       }
   },
   "comment": "development profile",
   "id": "265c4d0f-70d9-449e-9439-bddd7d55a46b",
   "href": "http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b",
   "created-by": "system"
}

PUT /api/v2/lcm/config_profiles/{id}

Updates an existing config profile record by ID.

Path arguments: id: A Config Profile ID.

Returns an updated Config Profile object.

Example:

Input:

{
   "agent-version":null,
   "created-on":"2016-06-20T14:36:15.833Z",
   "type":"config-profile",
   "datastax-version":"5.0.0",
   "related-resources":{
       "datacenters":"http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/datacenters/",
       "nodes":"http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/nodes/",
       "clusters":"http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/clusters/"
   },
   "modified-by":"system",
   "modified-on":"2016-06-20T14:36:15.833Z",
   "name":"dev2",
   "config-path":null,
   "json":{
       "cassandra-yaml":{
           "gc_warn_threshold_in_ms":1600
       }
   },
   "comment":"development profile 2",
   "id":"265c4d0f-70d9-449e-9439-bddd7d55a46b",
   "created-by":"system"
}
 curl -X PUT -d '<example input>' http://localhost:8888/api/v2/lcm/config_profiles/9ead66db-a104-4cbf-a653-1a756a20fabb

Output:

{
   "agent-version": null,
   "created-on": "2016-06-20T14:36:15.833Z",
   "type": "config-profile",
   "datastax-version": "5.0.0",
   "related-resources": {
       "datacenters": "http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/datacenters/",
       "nodes": "http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/nodes/",
       "clusters": "http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/clusters/"
   },
   "modified-by": "system",
   "modified-on": "2016-06-20T15:05:51.602Z",
   "name": "dev2",
   "config-path": null,
   "json": {
       "cassandra-yaml": {
           "gc_warn_threshold_in_ms": 1600
       }
   },
   "comment": "development profile 2",
   "id": "265c4d0f-70d9-449e-9439-bddd7d55a46b",
   "href": "http://localhost:8888/api/v2/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b",
   "created-by": "system"
}

DELETE /api/v2/lcm/config_profiles/{id}

Deletes an existing config profile record by ID. This is subject to foreign key constraint violations.

Path arguments: id: A Config Profile ID.

Returns the IDs of the deleted objects.

Example:

 curl -X DELETE http://localhost:8888/api/v2/lcm/config_profiles/ab280412-03da-4306-beca-62e5ac8738fa

Output:

 {"deleted": {"config-profile": ["265c4d0f-70d9-449e-9439-bddd7d55a46b"]}}

Cloning Configuration Profiles

Configuration profiles can be cloned. The primary purpose for this is to support DSE upgrades, but it could be also used to copy a profile of the same DSE version. Cloning a profile requires a name for the new profile (must be unique among all profiles), a DSE version (must be >= the profile being cloned), and the ID of the profile being cloned.

POST /api/v2/lcm/config_profiles/{id}/clone

Clones the profile specified by ID.

Path arguments: id: A Config Profile ID.

Returns a Config Profile object. Typically contains an array of config-notifications that indicates config properties that have been added, removed, or defaults changed.

Example:

Input:

{
   "new-dse-version": "5.1.2",
   "name": "my-cloned-profile-5.1.2"
}
 curl -X POST -d '{"new-dse-version": "5.1.2", "name": "my-cloned-profile-5.1.2"}' http://localhost:8888/api/v2/lcm/config_profiles/ab280412-03da-4306-beca-62e5ac8738fa/clone

Output:

{
   "id" : "99b0d929-10ae-4eb1-b170-e5b1f8a30510",
   "modified-by" : "system",
   "type" : "config-profile",
   "name" : "clone-5.0.3-1",
   "datastax-version" : "5.0.3",
   "modified-on" : "2017-09-25T17:44:48.089Z",
   "json" : {
       "cassandra-yaml" : {
           "roles_update_interval_in_ms" : 1001
       }
   },
   "created-by" : "system",
   "comment" : null,
   "config-path" : null,
   "created-on" : "2017-09-25T17:44:48.089Z",
   "agent-version" : null,
   "config-notifications" : [
       {
           "user-preference" : null,
           "title" : "New field has been added.",
           "source" : {
               "pointer" : "json/cassandra-yaml/otc_coalescing_strategy"
           },
           "code" : "field-added",
           "new-default" : "DISABLED",
           "detail" : "The field 'otc_coalescing_strategy' has been newly introduced since DSE 5.0.2. The cloned profile will inherit the default value.",
           "action-taken" : "use-new-field-default",
           "old-default" : null
       },
       {
           "title" : "New field has been added.",
           "source" : {
               "pointer" : "json/dse-default/wait-for-start"
           },
           "user-preference" : null,
           "old-default" : null,
           "action-taken" : "use-new-field-default",
           "new-default" : 14,
           "code" : "field-added",
           "detail" : "The field 'wait-for-start' has been newly introduced since DSE 5.0.2. The cloned profile will inherit the default value."
       }
   ]
}

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