Home

Awesome

End User Definitions Documentation

The docs for the LifeCycle Manager API that serves definitions provide additional information about some of the definitions.

Definitions Concepts

File Formats

Definitions make use of both EDN (Extensible Data Notation) formatted files.

See: The Extensible Data Notation Reference

Config DDL Reference

The data definition language for config files provides a schema for configs that allows understanding all Cassandra and DSE configs as maps/dictionaries, even when the config itself is unstructured data like cassandra-env.sh. Config DDL files are found in directories like resources/cassandra-yaml/.

Base Files

Base files define a complete description of a config file, for example the cassandra.yaml for DSE 5.1.0.

Note: Certain fields and attributes are only useful in automatic rendering of a User Interface, and are not documented.

Simplified Example Base File

{:display-name "file name"
 :workload-file-group "workload name"
 :ui-visibility :editable
 :renderer {:renderer-type :yaml}
 :properties {:my-checkbox {:type "boolean"
                            :default_value true
                            :description "A boolean configuration option"}
              :my-textbox {:type "string"
                           :default_value "A string!"
                           :depends :my-checkbox
                           :description "A string that is only present when the checkbox is ticked."}
              :my-foo     {:type "string"
                           :depends :my-textbox
                           :conditional [{:eq "A string!"}]
                           :description "A field that has a transitive dependency on :my-checkbox."}
              }
 :groupings [{:name "My Group",
              :description "Both settings will be grouped under a 'My Group' heading in the UI",
              :list ["my-checkbox" "my-textbox"]}]}

Base File Attributes

Field Metadata

Field metadata is defined as a map of keys and values within the top-level 'properties' key. Each key defines a field-name, and each value is a dictionary describing the field.

User Defined Values

It's possible to create dictionary fields that contain members where the keys, not just the values, are user-defined. This is not currently documented, but there are examples in the definitions, grep for 'user_defined'.

Transforms

Transforms allow us to specify a series of changes to a basefile over time.

Basefiles are a useful way of specifying a complete set of definitions for a version of DSE or Cassandra, but they are extremely verbose. If definitions were expressed for every version as a basefile, correcting a mistake that affects definitions for 6 patch releases within a stable series would be extremely repetitive and error prone. Transforms allow the ability to efficiently express changes relative to a previous state.

Simplified Example Transforms File

This example covers DSE 5.1.0-5.1.5.

("5.1.0" "dse-default-dse-5.0.1.edn"
 "5.1.3" (transforms
          (add-field :new-field
                     {:type "int"
                      :default_value 14
                      :unit "seconds"}
                     :group "General"))
 "5.1.4" (transforms
          (add-field :another-new-field
                     {:type "int"
                      :default_value 15
                      :unit "seconds"}
                     :group "General"))
 "6.0.0" "dse-default-dse-6.0.0.edn)

Available Transforms

Transforms are expressed as an EDN list where odd members are DSE versions and even members are a valid transform. The available transforms are defined with helpful docstrings in lcm.config.generator, and are summarized below for convenience:

Dot Separated Paths

Dictionaries can can have members updated, added, and removed by referencing members via a dot-separated path. When updating large dictionaries this can save a large amount of error-prone duplication.

For example to update the my-bool member of my-dict:

 ("5.1.0" "dse-default-dse-5.0.1.edn"

 ;; Adds a dictionary my-dict with a member my-bool
 "5.1.1" (transforms
          (add-field :my-dict
                     {:type "dict"
                      :fields {:my-bool {:type "boolean"
                                         :default_value true}}}
                     :group "General"))

 ;; Changes the default value of my-bool using a dot-separated path
 "5.1.2" (transforms
          (update-field :my-dict.my-bool {:default_value false})))