The Pivot state contains information about Pivot users, data cubes, alerts, customizations, and more.
By default, Pivot is configured to store its state in a local SQLite file. If you want to deploy Pivot on more than one server, you'll need to configure Pivot to use an external database for state storage.
The types of databases supported as Pivot state stores are MySQL (
mysql), Postgres (
pg), and SQLite (
Saving state in a file
The simplest place to save Pivot's state is in a SQLite file located somewhere relative to the config.
The default configuration files,
conf-quickstart/pivot/config.yaml, are both configured to do so, as determined by the following configuration:
stateStore: type: sqlite connection: var/pivot/pivot-settings.sqlite
Since the state file is located in a directory relative to the Imply home directory,
var/pivot/, Pivot instances on other machines can't access the same state file. For that, you need to configure state storage in a database.
For details on this setting, see Pivot server config.
Saving state in a database
To implement a Pivot cluster, Pivot's state needs to be saved in an external database.
To do so, add the following to the config:
stateStore: type: mysql connection: 'mysql://username:password@hostname:3306/database' tablePrefix: 'imply-state-'
This creates a number of tables, all of which are prefixed with the value of
imply-state- in this example.