Browse Source

Merge pull request #9066 from spzala/etcdconfig

Doc: update etcd configuration detail with config file
Xiang Li 8 years ago
parent
commit
5e78da17fe
1 changed files with 8 additions and 1 deletions
  1. 8 1
      Documentation/op-guide/configuration.md

+ 8 - 1
Documentation/op-guide/configuration.md

@@ -1,6 +1,11 @@
 # Configuration flags
 # Configuration flags
 
 
-etcd is configurable through command-line flags and environment variables. Options set on the command line take precedence over those from the environment.
+etcd is configurable through a configuration file, various command-line flags, and environment variables.
+
+A reusable configuration file is a YAML file made with name and value of one or more command-line flags described below. In order to use this file, specify the file path as a value to the `--config-file` flag. The [sample configuration file][sample-config-file] can be used as a starting point to create a new configuration file as needed.
+
+Options set on the command line take precedence over those from the environment. If a configuration file is provided, other command line flags and environment variables will be ignored.
+For example, `etcd --config-file etcd.conf.yml.sample --data-dir /tmp` will ignore the `--data-dir` flag.
 
 
 The format of environment variable for flag `--my-flag` is `ETCD_MY_FLAG`. It applies to all flags.
 The format of environment variable for flag `--my-flag` is `ETCD_MY_FLAG`. It applies to all flags.
 
 
@@ -332,6 +337,7 @@ Follow the instructions when using these flags.
 ### --config-file
 ### --config-file
 + Load server configuration from a file.
 + Load server configuration from a file.
 + default: ""
 + default: ""
++ example: [sample configuration file][sample-config-file]
 
 
 ## Profiling flags
 ## Profiling flags
 
 
@@ -369,3 +375,4 @@ Follow the instructions when using these flags.
 [security]: security.md
 [security]: security.md
 [systemd-intro]: http://freedesktop.org/wiki/Software/systemd/
 [systemd-intro]: http://freedesktop.org/wiki/Software/systemd/
 [tuning]: ../tuning.md#time-parameters
 [tuning]: ../tuning.md#time-parameters
+[sample-config-file]: ../../etcd.conf.yml.sample