.. _lcm-config-profile: 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 :ref:`lcm-definitions` for more information about the configuration options for each file. .. container:: api-toc =============================== ==================================== :ref:`managing-config-profiles` URL =============================== ==================================== Get a config-profile by ID :http:method:`get-config-profile-object` Get a list of config-profiles :http:method:`get-config-profile-list` Create a config-profile :http:method:`post-config-profile-object` Update a config-profile :http:method:`put-config-profile-object` Delete a config-profile :http:method:`delete-config-profile-object` =============================== ==================================== .. _managing-config-profiles: Managing Config Profiles ------------------------ .. http:response:: Config Profile .. code-block:: js { "id": , "name": , "datastax-version": , "agent-version": , "config-path": , "json": {: }, "comment": } ================== =================================================== 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 :ref:`lcm-definitions`. ================== =================================================== .. http:method:: GET /api/v1/lcm/config_profiles/{id} :label-name: get-config-profile-object :title: GET /api/v1/lcm/config_profiles/{id} Gets a specific config profile record by ID. :arg id: A :http:response:`config-profile` ID. Returns a :http:response:`config-profile` object. **Example**: .. code-block:: bash curl http://localhost:8888/api/v1/lcm/config_profiles/c0c4c347-ad00-4b67-aa05-fbcd1be02041 Output: .. code-block:: js { "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/v1/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/datacenters/", "nodes": "http://localhost:8888/api/v1/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/nodes/", "clusters": "http://localhost:8888/api/v1/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/v1/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b", "created-by": "system" } .. http:method:: GET /api/v1/lcm/config_profiles/ :label-name: get-config-profile-list :title: GET /api/v1/lcm/config_profiles/ Gets a paginated list of all :http:response:`config-profile` records. See :ref:`lcm-pagination` 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 :http:method:`get-config-profile-object`). **Example**: .. code-block:: bash curl http://localhost:8888/api/v1/lcm/config_profiles/ Output: .. code-block:: js { "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/v1/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/datacenters/", "nodes": "http://localhost:8888/api/v1/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/nodes/", "clusters": "http://localhost:8888/api/v1/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/v1/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b" } ] } .. http:method:: POST /api/v1/lcm/config_profiles/ :label-name: post-config-profile-object :title: POST /api/v1/lcm/config_profiles/ Creates a new config profile record. :body: A :http:response:`config-profile` object (with no ``id`` property) Returns the newly created :http:response:`config-profile` object. **Example**: Input: .. code-block:: js { "datastax-version":"5.0.0", "name":"dev", "comment":"development profile", "json":{ "cassandra-yaml":{ "gc_warn_threshold_in_ms":1500 } } } .. code-block:: bash curl -X POST -d '' http://localhost:8888/api/v1/lcm/config_profiles/ Output: .. code-block:: js { "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/v1/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/datacenters/", "nodes": "http://localhost:8888/api/v1/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/nodes/", "clusters": "http://localhost:8888/api/v1/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/v1/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b", "created-by": "system" } .. http:method:: PUT /api/v1/lcm/config_profiles/{id} :label-name: put-config-profile-object :title: PUT /api/v1/lcm/config_profiles/{id} Update an existing config profile record by ID. :arg id: A :http:response:`config-profile` ID. Returns an updated :http:response:`config-profile` object. **Example**: Input: .. code-block:: js { "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/v1/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/datacenters/", "nodes":"http://localhost:8888/api/v1/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/nodes/", "clusters":"http://localhost:8888/api/v1/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" } .. code-block:: bash curl -X PUT -d '' http://localhost:8888/api/v1/lcm/config_profiles/9ead66db-a104-4cbf-a653-1a756a20fabb Output: .. code-block:: js { "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/v1/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/datacenters/", "nodes": "http://localhost:8888/api/v1/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b/nodes/", "clusters": "http://localhost:8888/api/v1/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/v1/lcm/config_profiles/265c4d0f-70d9-449e-9439-bddd7d55a46b", "created-by": "system" } .. http:method:: DELETE /api/v1/lcm/config_profiles/{id} :label-name: delete-config-profile-object :title: DELETE /api/v1/lcm/config_profiles/{id} Delete an existing config profile record by ID. This is subject to foreign key constraint violations. :arg id: A :http:response:`config-profile` ID. Returns the IDs of the deleted objects. **Example**: .. code-block:: bash curl -X DELETE http://localhost:8888/api/v1/lcm/config_profiles/ab280412-03da-4306-beca-62e5ac8738fa Output: .. code-block:: js {"deleted": {"config-profile": ["265c4d0f-70d9-449e-9439-bddd7d55a46b"]}}