help.go 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. // Copyright 2015 CoreOS, Inc.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package etcdmain
  15. import "strconv"
  16. var (
  17. usageline = `usage: etcd [flags]
  18. start an etcd server
  19. etcd --version
  20. show the version of etcd
  21. etcd -h | --help
  22. show the help information about etcd
  23. `
  24. flagsline = `
  25. member flags:
  26. --name 'default'
  27. human-readable name for this member.
  28. --data-dir '${name}.etcd'
  29. path to the data directory.
  30. --wal-dir ''
  31. path to the dedicated wal directory.
  32. --snapshot-count '10000'
  33. number of committed transactions to trigger a snapshot to disk.
  34. --heartbeat-interval '100'
  35. time (in milliseconds) of a heartbeat interval.
  36. --election-timeout '1000'
  37. time (in milliseconds) for an election to timeout. See tuning documentation for details.
  38. --listen-peer-urls 'http://localhost:2380,http://localhost:7001'
  39. list of URLs to listen on for peer traffic.
  40. --listen-client-urls 'http://localhost:2379,http://localhost:4001'
  41. list of URLs to listen on for client traffic.
  42. --max-snapshots '` + strconv.Itoa(defaultMaxSnapshots) + `'
  43. maximum number of snapshot files to retain (0 is unlimited).
  44. --max-wals '` + strconv.Itoa(defaultMaxWALs) + `'
  45. maximum number of wal files to retain (0 is unlimited).
  46. -cors ''
  47. comma-separated whitelist of origins for CORS (cross-origin resource sharing).
  48. clustering flags:
  49. --initial-advertise-peer-urls 'http://localhost:2380,http://localhost:7001'
  50. list of this member's peer URLs to advertise to the rest of the cluster.
  51. --initial-cluster 'default=http://localhost:2380,default=http://localhost:7001'
  52. initial cluster configuration for bootstrapping.
  53. --initial-cluster-state 'new'
  54. initial cluster state ('new' or 'existing').
  55. --initial-cluster-token 'etcd-cluster'
  56. initial cluster token for the etcd cluster during bootstrap.
  57. Specifying this can protect you from unintended cross-cluster interaction when running multiple clusters.
  58. --advertise-client-urls 'http://localhost:2379,http://localhost:4001'
  59. list of this member's client URLs to advertise to the public.
  60. The client URLs advertised should be accessible to machines that talk to etcd cluster. etcd client libraries parse these URLs to connect to the cluster.
  61. --discovery ''
  62. discovery URL used to bootstrap the cluster.
  63. --discovery-fallback 'proxy'
  64. expected behavior ('exit' or 'proxy') when discovery services fails.
  65. --discovery-proxy ''
  66. HTTP proxy to use for traffic to discovery service.
  67. --discovery-srv ''
  68. dns srv domain used to bootstrap the cluster.
  69. --strict-reconfig-check
  70. reject reconfiguration requests that would cause quorum loss.
  71. proxy flags:
  72. --proxy 'off'
  73. proxy mode setting ('off', 'readonly' or 'on').
  74. --proxy-failure-wait 5000
  75. time (in milliseconds) an endpoint will be held in a failed state.
  76. --proxy-refresh-interval 30000
  77. time (in milliseconds) of the endpoints refresh interval.
  78. --proxy-dial-timeout 1000
  79. time (in milliseconds) for a dial to timeout.
  80. --proxy-write-timeout 5000
  81. time (in milliseconds) for a write to timeout.
  82. --proxy-read-timeout 0
  83. time (in milliseconds) for a read to timeout.
  84. security flags:
  85. --ca-file '' [DEPRECATED]
  86. path to the client server TLS CA file. '-ca-file ca.crt' could be replaced by '-trusted-ca-file ca.crt -client-cert-auth' and etcd will perform the same.
  87. --cert-file ''
  88. path to the client server TLS cert file.
  89. --key-file ''
  90. path to the client server TLS key file.
  91. --client-cert-auth 'false'
  92. enable client cert authentication.
  93. --trusted-ca-file ''
  94. path to the client server TLS trusted CA key file.
  95. --peer-ca-file '' [DEPRECATED]
  96. path to the peer server TLS CA file. '-peer-ca-file ca.crt' could be replaced by '-peer-trusted-ca-file ca.crt -peer-client-cert-auth' and etcd will perform the same.
  97. --peer-cert-file ''
  98. path to the peer server TLS cert file.
  99. --peer-key-file ''
  100. path to the peer server TLS key file.
  101. --peer-client-cert-auth 'false'
  102. enable peer client cert authentication.
  103. --peer-trusted-ca-file ''
  104. path to the peer server TLS trusted CA file.
  105. logging flags
  106. --debug 'false'
  107. enable debug-level logging for etcd.
  108. --log-package-levels ''
  109. specify a particular log level for each etcd package (eg: 'etcdmain=CRITICAL,etcdserver=DEBUG').
  110. unsafe flags:
  111. Please be CAUTIOUS when using unsafe flags because it will break the guarantees
  112. given by the consensus protocol.
  113. --force-new-cluster 'false'
  114. force to create a new one-member cluster.
  115. experimental flags:
  116. --experimental-v3demo 'false'
  117. enable experimental v3 demo API.
  118. --experimental-auto-compaction-retention '0'
  119. auto compaction retention in hour. 0 means disable auto compaction.
  120. --experimental-gRPC-addr '127.0.0.1:2378'
  121. gRPC address for experimental v3 demo API.
  122. profiling flags:
  123. --enable-pprof 'false'
  124. Enable runtime profiling data via HTTP server. Address is at client URL + "/debug/pprof"
  125. `
  126. )