Move things around in the config file for clarity and add comments.
parent
a8aab8507b
commit
bc8b3b94e0
|
@ -1,11 +1,4 @@
|
||||||
# A command separated list of servers to seed
|
# Welcome to the InfluxDB configuration file.
|
||||||
# this server. this is only relevant when the
|
|
||||||
# server is joining a new cluster. Otherwise
|
|
||||||
# the server will use the list of known servers
|
|
||||||
# prior to shutting down
|
|
||||||
|
|
||||||
# seed-servers =
|
|
||||||
datadir = "/tmp/influxdb/development/db"
|
|
||||||
|
|
||||||
[logging]
|
[logging]
|
||||||
# logging level can be one of "debug", "info", "warn" or "error"
|
# logging level can be one of "debug", "info", "warn" or "error"
|
||||||
|
@ -23,9 +16,30 @@ assets = "./admin"
|
||||||
|
|
||||||
# Raft configuration
|
# Raft configuration
|
||||||
[raft]
|
[raft]
|
||||||
|
# The raft port should be open between all servers in a cluster.
|
||||||
|
# However, this port shouldn't be accessible from the internet.
|
||||||
|
|
||||||
# port = 8090
|
# port = 8090
|
||||||
|
|
||||||
|
# Where the raft logs are stored. The user running InfluxDB will need read/write access.
|
||||||
dir = "/tmp/influxdb/development/raft"
|
dir = "/tmp/influxdb/development/raft"
|
||||||
|
|
||||||
# Protobuf configuration
|
[storage]
|
||||||
[protobuf]
|
dir = "/tmp/influxdb/development/db"
|
||||||
port = 8099
|
|
||||||
|
[cluster]
|
||||||
|
# A comma separated list of servers to seed
|
||||||
|
# this server. this is only relevant when the
|
||||||
|
# server is joining a new cluster. Otherwise
|
||||||
|
# the server will use the list of known servers
|
||||||
|
# prior to shutting down. Any server can be pointed to
|
||||||
|
# as a seed. It will find the Raft leader automatically.
|
||||||
|
|
||||||
|
# Here's an example. Note that the port on the host is the same as the raft port.
|
||||||
|
# seed-servers = "hosta:8090,hostb:8090"
|
||||||
|
|
||||||
|
# Replication happens over a TCP connection with a Protobuf protocol.
|
||||||
|
# This port should be reachable between all servers in a cluster.
|
||||||
|
# However, this port shouldn't be accessible from the internet.
|
||||||
|
|
||||||
|
# protobuf_port = 8099
|
||||||
|
|
|
@ -41,9 +41,9 @@ func parseTomlConfiguration(filename string) (*Configuration, error) {
|
||||||
apiHttpPort := configSet.Int("api.port", 8086)
|
apiHttpPort := configSet.Int("api.port", 8086)
|
||||||
raftPort := configSet.Int("raft.port", 8090)
|
raftPort := configSet.Int("raft.port", 8090)
|
||||||
raftDir := configSet.String("raft.dir", "/tmp/influxdb/development/raft")
|
raftDir := configSet.String("raft.dir", "/tmp/influxdb/development/raft")
|
||||||
seedServers := configSet.String("seed-servers", "")
|
seedServers := configSet.String("cluster.seed-servers", "")
|
||||||
dataDir := configSet.String("datadir", "/tmp/influxdb/development/db")
|
dataDir := configSet.String("storage.dir", "/tmp/influxdb/development/db")
|
||||||
protobufPort := configSet.Int("protobuf.port", 8099)
|
protobufPort := configSet.Int("cluster.protobuf_port", 8099)
|
||||||
logFile := configSet.String("logging.file", "influxdb.log")
|
logFile := configSet.String("logging.file", "influxdb.log")
|
||||||
logLevel := configSet.String("logging.level", "info")
|
logLevel := configSet.String("logging.level", "info")
|
||||||
|
|
||||||
|
@ -69,6 +69,9 @@ func parseTomlConfiguration(filename string) (*Configuration, error) {
|
||||||
if server == "" {
|
if server == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if !strings.HasPrefix(server, "http://") {
|
||||||
|
server = "http://" + server
|
||||||
|
}
|
||||||
config.SeedServers = append(config.SeedServers, server)
|
config.SeedServers = append(config.SeedServers, server)
|
||||||
}
|
}
|
||||||
return config, nil
|
return config, nil
|
||||||
|
|
Loading…
Reference in New Issue