Database

Energy SOAR Base uses JanusGraph as its graph database layer. JanusGraph is configured in /etc/energysoar/application.conf.d/database.conf and uses two backends: Apache Cassandra for persistent storage and Elasticsearch for indexing.

Default configuration

db.janusgraph {
  storage {
    ## Cassandra configuration
    backend: cql
    hostname: ["127.0.0.1"]
    # Cassandra authentication (if configured)
    // username: "energysoar"
    // password: "password"
    cql {
      cluster-name: local
      keyspace: energysoar
    }
  }
  ## Index configuration
  index {
    search {
      backend: elasticsearch
      hostname: ["127.0.0.1"]
      index-name: energysoar
      elasticsearch {
        bulk-refresh: wait_for
      }
    }
  }
}

Cassandra

Energy SOAR uses Cassandra via the CQL backend (backend: cql). The hostname parameter accepts a list of Cassandra node addresses. For a single-node installation, the default 127.0.0.1 is correct.

To enable Cassandra authentication, uncomment and fill in the credentials:

storage {
  backend: cql
  hostname: ["127.0.0.1"]
  username: "energysoar"
  password: "password"
  cql {
    cluster-name: local
    keyspace: energysoar
  }
}

For a multi-node cluster, list all node addresses:

storage {
  backend: cql
  hostname: ["node1.example.com", "node2.example.com", "node3.example.com"]
  cql {
    cluster-name: energysoar-cluster
    keyspace: energysoar
  }
}

Elasticsearch

The Elasticsearch index is used by JanusGraph for full-text search and graph queries. The hostname parameter points to the Elasticsearch instance. Energy SOAR installs and manages its own Elasticsearch node; do not point this at a shared cluster.

To change the Elasticsearch address:

index {
  search {
    backend: elasticsearch
    hostname: ["127.0.0.1"]
    index-name: energysoar
  }
}

After modifying database.conf, restart the Energy SOAR service:

systemctl restart energysoar