diff --git a/guac/guac-configuration.md b/guac/guac-configuration.md index adaa786..f52b18d 100644 --- a/guac/guac-configuration.md +++ b/guac/guac-configuration.md @@ -22,12 +22,17 @@ the two differ, the binary default is called out alongside the entry. The keys that currently differ: -| Key | `guac.yaml` | Binary default | -| ------------- | ----------------------- | -------------------------------------------------------- | -| `pubsub-addr` | `nats://localhost:4222` | `nats://127.0.0.1:4222` | -| `interval` | `20m` | `5m` | -| `gql-debug` | `true` | `false` | -| `db-address` | not set | `postgres://guac:guac@0.0.0.0:5432/guac?sslmode=disable` | +| Key | `guac.yaml` | Binary default | +| -------------- | ----------------------- | -------------------------------------------------------- | +| `pubsub-addr` | `nats://localhost:4222` | `nats://127.0.0.1:4222` | +| `interval` | `20m` | `5m` | +| `gql-debug` | `true` | `false` | +| `db-address` | not set | `postgres://guac:guac@0.0.0.0:5432/guac?sslmode=disable` | +| `arango-user` | `root` | empty | +| `arango-pass` | `test123` | empty | +| `neo4j-user` | `neo4j` | empty | +| `neo4j-pass` | `s3cr3t` | empty | +| `neptune-user` | `username` | empty | ## Setting configuration values @@ -57,6 +62,49 @@ GUAC_DB_ADDRESS="postgres://guac:guac@localhost:5432/guac?sslmode=disable" guacg ## Database Configuration +The GraphQL server selects its graph backend with `gql-backend`. The binary +default is `keyvalue`, and the registered backend names are `keyvalue`, +`arango`, `ent`, `neo4j`, and `neptune`. + +Backend-specific options are registered alongside the common `guacgql` flags, so +they can use the same command-line, environment-variable, or `guac.yaml` +configuration forms described above. + +### Key-value backend + +The `keyvalue` backend supports three stores: `memmap`, Redis, and TiKV. + +- **kv-store**: `memmap` + - **Description**: Selects the key-value store. Supported values are `memmap`, + `redis`, and `tikv`. + - **When to Change**: Use `redis` or `tikv` when the graph must persist + outside the `guacgql` process. + +{: .warning } + +The default `memmap` store keeps graph data in an in-memory Go map. Data stored +there is lost when the `guacgql` process stops or restarts. + +- **kv-redis**: `redis://user@localhost:6379/0` + - **Description**: Experimental Redis connection string used when `kv-store` + is `redis`. + - **When to Change**: Point this at the Redis instance that should persist the + key-value graph. + +- **kv-tikv**: `127.0.0.1:2379` + - **Description**: Experimental TiKV placement-driver address used when + `kv-store` is `tikv`. + - **When to Change**: Point this at the TiKV placement driver for your + deployment. + +For example, to use Redis: + +```yaml +gql-backend: keyvalue +kv-store: redis +kv-redis: redis://user@redis:6379/0 +``` + ### Ent config - **db-driver**: `postgres` @@ -77,56 +125,74 @@ GUAC_DB_ADDRESS="postgres://guac:guac@localhost:5432/guac?sslmode=disable" guacg - **When to Change**: Set to `false` if you do not want automatic database migration. - + - **Description**: Authentication realm used for the Neo4j-compatible + connection to Neptune. + - **When to Change**: Change this only when your authentication setup requires + another realm. ## Pub/Sub Configuration @@ -220,8 +286,11 @@ GUAC_DB_ADDRESS="postgres://guac:guac@localhost:5432/guac?sslmode=disable" guacg ## GraphQL Configuration - **gql-backend**: `keyvalue` - - **Description**: The backend used for the GraphQL server. - - **When to Change**: Modify if using a different backend for GraphQL. + - **Description**: The graph backend used by the GraphQL server. Registered + values are `keyvalue`, `arango`, `ent`, `neo4j`, and `neptune`. + - **When to Change**: Select the backend that matches your database + deployment, then configure its backend-specific options in the Database + Configuration section above. - **gql-listen-port**: `8080` - **Description**: The port on which the GraphQL server listens.