Bootstrap

Crystalline can optionally be provided with a bootstrap config file. This is a JSON file that contains the configuration for your application. It allows you to define things like:

  • Indices
  • Inputs

If Crystalline starts and find a database that has not been initialised, it will check the CRYSTALLINE_BOOTSTRAP_CONFIG environment variable for a path to a bootstrap config file. If this is set, Crystalline will use this to initialise the database before starting up.

Example Bootstrap Config File

This example shows how you can define an index and input in your bootstrap config file (note that the uuid for the input index field must match the id of an index):

{
    "indices": [
        {
            "id": "65e636bb-dfa5-48b1-a827-162ab1b2f816",
            "name": "syslog",
            "storage_type": "Directory",
            "retention": {
                "Simple": {
                    "buckets": 30
                }
            }
        }
    ],
    "inputs": [
        {
            "id": "7475e32f-ca86-4324-8945-4fd23401d9ec",
            "label": "syslog",
            "index": "65e636bb-dfa5-48b1-a827-162ab1b2f816",
            "token_required": false
        }
    ]
}