From 04aeda21e0ad2f7e8dd2bad3328e6ce0ba38f6a9 Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Fri, 29 Jul 2016 00:59:48 +0100 Subject: Support mongo datastores --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 0c33657..6077556 100644 --- a/README.md +++ b/README.md @@ -87,10 +87,11 @@ Configuration is divided into different sections: `server`, `auth`, `ssh`, and ` #### Datastore Datastores contain a record of issued certificates for audit and revocation purposes. The connection string is of the form `engine:username:password:host[:port]`. -Currently two engines are supported: `mysql` and `mem`. +Supported database providers: `mysql`, `mongo` and `mem`. `mem` is an in-memory database intended for testing and takes no additional config options. -`mysql` is the MySQL database and the `username`, `password` and `host` arguments are required. `port` is assumed to be 3306 unless otherwise specified. +`mysql` is the MySQL database and accepts `username`, `password` and `host` arguments. Only `username` and `host` arguments are required. `port` is assumed to be 3306 unless otherwise specified. +`mongo` is MongoDB and accepts `username`, `password` and `host` arguments. All arguments are optional and multiple hosts can be specified using comma-separated values: `mongo:dbuser:dbpasswd:host1,host2`. If no datastore is specified the `mem` store is used. @@ -100,11 +101,14 @@ Examples: server { datastore = "mem" # use the in-memory database. datastore = "mysql:root::localhost" # mysql running on localhost with the user 'root' and no password. - datastore = "mysql:cashier:aMaZiNgPaSsWoRd:mydbprovider.example.com:5150" # mysql running on a remote host on port 5150 + datastore = "mysql:cashier:PaSsWoRd:mydbprovider.example.com:5150" # mysql running on a remote host on port 5150 + datastore = "mongo:cashier:PaSsWoRd:mydbprovider.example.com:27018" # mongo running on a remote host on port 27018 + datastore = "mongo:cashier:PaSsWoRd:server1.example.com:27018,server2.example.com:27018" # mongo running on multiple servers on port 27018 } ``` -Prior to using the MySQL datastore, you need to create the database and tables using the [dbinit tool](cmd/dbinit/dbinit.go). +Prior to using MySQL or MongoDB datastores you need to create the database and tables using the [dbinit tool](cmd/dbinit/dbinit.go). +Note that dbinit has no support for replica sets. ### auth - `provider` : string. Name of the oauth provider. At present the only valid value is "google". -- cgit v1.2.3