fix readme and config command for new config style

still need to update readme to include info about environment variables, but at
least it isn't wrong anymore.
This commit is contained in:
Matt Jaffee 2017-03-17 20:42:41 -05:00
parent 3bf3bf0aa4
commit 77c25eeb06
2 changed files with 35 additions and 13 deletions

View file

@ -40,16 +40,22 @@ and should look like:
```
data-dir = "/tmp/pil0"
host = "127.0.0.1:10101"
bind = "127.0.0.1:10101"
[cluster]
replicas = 2
poll-interval = "2m0s"
replicas = 2
hosts = [
"127.0.0.1:10101",
"127.0.0.1:10102",
]
[[cluster.node]]
host = "127.0.0.1:10101"
[anti-entropy]
interval = "10m0s"
[[cluster.node]]
host = "127.0.0.1:15001"
[profile]
cpu = "/home/mycpuprofile"
cpu-time = "30s"
```
You can generate a template config file with default values with:
@ -62,13 +68,21 @@ The first two configuration options will be unique to each node in the cluster:
`data-dir`: directory in which data is stored to disk
`host`: IP and port of the pilosa node
`bind`: IP and port that pilosa will listen on
The remaining configuration options should be the same on every node in the cluster.
`replicas`: the number of replicas within the cluster
`[[cluster.node]]`: specifies each node within the cluster
`[cluster] hosts`: specifies each node within the cluster
`[cluster] poll-interval`: TODO
`[anti-entropy] interval`: TODO
`[profile] cpu`: Path at which to store cpu profiling data which will be taken when pilosa starts.
`[profile] cpu-time`: Amount of time for which to collect cpu profiling data at startup.
## Docker

View file

@ -25,16 +25,24 @@ func NewConfigCommand(stdin io.Reader, stdout, stderr io.Writer) *ConfigCommand
func (cmd *ConfigCommand) Run(ctx context.Context) error {
fmt.Fprintln(cmd.Stdout, strings.TrimSpace(`
data-dir = "~/.pilosa"
host = "localhost:10101"
bind = "localhost:10101"
[cluster]
replicas = 1
poll-interval = "2m0s"
replicas = 1
hosts = [
"localhost:10101",
]
[[cluster.node]]
host = "localhost:10101"
[anti-entropy]
interval = "10m0s"
[profile]
cpu = ""
cpu-time = "30s"
[plugins]
path = ""
path = ""
`)+"\n")
return nil
}