kuzzleio / kuzzle-device-manager

IoT Devices & Assets Management providing digital twins, payload decoding, normalized measures, provisioning. Multi-Tenant ready for white labelled and B2B2C applications.
https://docs.kuzzle.io/official-plugins/device-manager/1
Apache License 2.0
14 stars 7 forks source link

feat(configuration): allow to specify Elasticsearch index settings #337

Closed alexandrebouthinon closed 3 months ago

alexandrebouthinon commented 7 months ago

What does this PR do ?

It add missing settings fields in the plugin configuration and make sure to use it during indices creation

How to test it?

Using the kuzzlerc file, you can now set the desired index settings. For example the following configuration:

{
  "plugins": {
    "device-manager": {
      "engineCollections": {
        "config": {
          "settings": {
            "number_of_shards": 3
          }
        },
        "asset": {
          "settings": {
            "number_of_shards": 4
          }
        },
        "assetGroup": {
          "settings": {
            "number_of_shards": 1
          }
        },
        "assetHistory": {
          "settings": {
            "number_of_shards": 3
          }
        },
        "device": {
          "settings": {
            "number_of_shards": 2
          }
        },
        "measures": {
          "settings": {
            "number_of_shards": 7
          }
        }
      }
    }
  }
}

gives you the following index configuration when you create a tenant:

image

Boyscout

Add a complete documentation about the plugin configuration usage

rolljee commented 5 months ago

Test are currently failing, but the rest looks good