Skip to content

Commit 1f007d2

Browse files
nicecuikillme2008
authored andcommitted
refactor: link configuration file options to GitHub (#1051)
1 parent c8ab532 commit 1f007d2

File tree

8 files changed

+365
-307
lines changed

8 files changed

+365
-307
lines changed

docs/nightly/en/reference/command-lines.md

Lines changed: 118 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
# Greptime Command Line Interface
22

3-
The `greptime` command provided by the pre-built binary can start/stop GreptimeDB and pass configuration options. To execute the binary with `greptime` instead of the ad-hoc `./greptime`, you might need to move the binary into the system `bin` directory or add the binary path to the `PATH` environment variable.
3+
The `greptime` command can start/stop GreptimeDB and pass configuration options.
4+
5+
## Install the Greptime CLI
6+
7+
The Greptime CLI comes bundled with the GreptimeDB binary.
8+
After [installing GreptimeDB](/getting-started/installation/overview.md),
9+
you can execute the `./greptime` command within the GreptimeDB directory.
10+
11+
For convenience, if you wish to run commands using `greptime` instead of `./greptime`,
12+
consider moving the CLI binary to your system's `bin` directory or appending the binary's path to your `PATH` environment variable.
13+
14+
## CLI Options
415

516
The `help` command lists all available commands and options of `greptime`.
617

@@ -26,7 +37,111 @@ Options:
2637
- `--log-dir=[dir]` specify logs directory, `/tmp/greptimedb/logs` by default.
2738
- `--log-level=[info | debug | error | warn | trace]` specify the log level, `info` by default.
2839

29-
## Start service with configurations
40+
### Global options
41+
42+
- `-h`/`--help`: Print help information;
43+
- `-V`/`--version`: Print version information;
44+
- `--log-dir <LOG_DIR>`: The logging directory;
45+
- `--log-level <LOG_LEVEL>`: The logging level;
46+
47+
### Datanode subcommand options
48+
49+
You can list all the options from the following command:
50+
51+
```
52+
greptime datanode start --help
53+
```
54+
55+
- `-c`/`--config-file`: The configuration file for datanode;
56+
- `--data-home`: Database storage root directory;
57+
- `--env-prefix <ENV_PREFIX>`: The prefix of environment variables, default is `GREPTIMEDB_DATANODE`;
58+
- `--http-addr <HTTP_ADDR>`: HTTP server address;
59+
- `--http-timeout <HTTP_TIMEOUT>`: HTTP request timeout in seconds.
60+
- `--metasrv-addrs <METASRV_ADDR>`: Metasrv address list;
61+
- `--node-id <NODE_ID>`: The datanode ID;
62+
- `--rpc-addr <RPC_ADDR>`: The datanode RPC addr;
63+
- `--rpc-hostname <RPC_HOSTNAME>`: The datanode hostname;
64+
- `--wal-dir <WAL_DIR>`: The directory of WAL;
65+
66+
All the `addr` options are in the form of `ip:port`.
67+
68+
### Metasrv subcommand options
69+
70+
You can list all the options from the following command:
71+
72+
```
73+
greptime metasrv start --help
74+
```
75+
76+
- `-c`/`--config-file`: The configuration file for metasrv;
77+
- `--enable-region-failover`: Whether to enable region failover, default is `false`.
78+
- `--env-prefix <ENV_PREFIX>`: The prefix of environment variables, default is `GREPTIMEDB_METASRV`;
79+
- `--bind-addr <BIND_ADDR>`: The bind address of metasrv;
80+
- `--http-addr <HTTP_ADDR>`: HTTP server address;
81+
- `--http-timeout <HTTP_TIMEOUT>`: HTTP request timeout in seconds.
82+
- `--selector <SELECTOR>`: You can refer [selector-type](/contributor-guide/metasrv/selector#selector-type);
83+
- `--server-addr <SERVER_ADDR>`: The communication server address for frontend and datanode to connect to metasrv;
84+
- `--store-addrs <STORE_ADDR>`: Comma or space separated key-value storage server (default is etcd) address, used for storing metadata;
85+
- `--use-memory-store`: Use memory store instead of etcd, for test purpose only;
86+
87+
### Frontend subcommand options
88+
89+
You can list all the options from the following command:
90+
91+
```
92+
greptime frontend start --help
93+
```
94+
95+
- `-c`/`--config-file`: The configuration file for frontend;
96+
- `--disable-dashboard`: Disable dashboard http service, default is `false`.
97+
- `--env-prefix <ENV_PREFIX>`: The prefix of environment variables, default is `GREPTIMEDB_FRONTEND`;
98+
- `--rpc-addr <RPC_ADDR>`: GRPC server address;
99+
- `--http-addr <HTTP_ADDR>`: HTTP server address;
100+
- `--http-timeout <HTTP_TIMEOUT>`: HTTP request timeout in seconds.
101+
- `--influxdb-enable`: Whether to enable InfluxDB protocol in HTTP API;
102+
- `--metasrv-addrs <METASRV_ADDR>`: Metasrv address list;
103+
- `--mysql-addr <MYSQL_ADDR>`: MySQL server address;
104+
- `--postgres-addr <POSTGRES_ADDR>`: Postgres server address;
105+
- `--tls-cert-path <TLS_CERT_PATH>`: The TLS public key file path;
106+
- `--tls-key-path <TLS_KEY_PATH>`: The TLS private key file path;
107+
- `--tls-mode <TLS_MODE>`: TLS Mode;
108+
- `--user-provider <USER_PROVIDER>`: You can refer [authentication](/user-guide/clients/authentication);
109+
110+
### Flownode subcommand options
111+
112+
You can list all the options from the following command:
113+
114+
```
115+
greptime flownode start --help
116+
```
117+
118+
- `--node-id <NODE_ID>`: Flownode's id
119+
- `--rpc-addr <RPC_ADDR>`: Bind address for the gRPC server
120+
- `--rpc-hostname <RPC_HOSTNAME>`: Hostname for the gRPC server
121+
- `--metasrv-addrs <METASRV_ADDRS>...`: Metasrv address list
122+
- `-c, --config-file <CONFIG_FILE>`: The configuration file for the flownode
123+
- `--env-prefix <ENV_PREFIX>`: The prefix of environment variables, default is `GREPTIMEDB_FLOWNODE`
124+
125+
### Standalone subcommand options
126+
127+
You can list all the options from the following command:
128+
129+
130+
```
131+
greptime standalone start --help
132+
```
133+
134+
- `-c`/`--config-file`: The configuration file for frontend;
135+
- `--env-prefix <ENV_PREFIX>`: The prefix of environment variables, default is `GREPTIMEDB_STANDALONE`;
136+
- `--http-addr <HTTP_ADDR>`: HTTP server address;
137+
- `--influxdb-enable`: Whether to enable InfluxDB protocol in HTTP API;
138+
- `--mysql-addr <MYSQL_ADDR>`: MySQL server address;
139+
- `--postgres-addr <POSTGRES_ADDR>`: Postgres server address;
140+
- `--rpc-addr <RPC_ADDR>`: gRPC server address;
141+
142+
## Examples
143+
144+
### Start service with configurations
30145

31146
Starts GreptimeDB in standalone mode with customized configurations:
32147

@@ -80,7 +195,7 @@ Starts a flownode instance with command line arguments specifying the address of
80195
greptime flownode start --node-id=0 --rpc-addr=127.0.0.1:6800 --metasrv-addrs=127.0.0.1:3002;
81196
```
82197

83-
## Upgrade GreptimeDB version
198+
### Upgrade GreptimeDB version
84199

85200
Please refer to [the upgrade steps](/user-guide/upgrade.md)
86201

0 commit comments

Comments
 (0)