aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2016-07-29 00:59:48 +0100
committerNiall Sheridan <nsheridan@gmail.com>2016-07-31 22:09:59 +0100
commit04aeda21e0ad2f7e8dd2bad3328e6ce0ba38f6a9 (patch)
tree3da48edf177826aeaae69447fd1fb001e873c43a /README.md
parent531f63e5a9e82d86a6ee1f5d44bebee0bc51d828 (diff)
Support mongo datastores
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 8 insertions, 4 deletions
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".