Skip to content

Commit 8987f06

Browse files
committed
fix linux and docker docs
1 parent 6f9c478 commit 8987f06

File tree

4 files changed

+135
-49
lines changed

4 files changed

+135
-49
lines changed

docs/en/installation/docker.md

Lines changed: 109 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ This document is based on the official RustFS Linux binary package, creating a c
3232
Using the official Ubuntu base image, quickly pull the official RustFS image:
3333

3434
```bash
35-
podman pull quay.io/rustfs/rustfs
35+
docker pull quay.io/rustfs/rustfs
3636
```
3737

3838
Or use docker to pull:
3939

4040
```bash
41-
podman pull docker://rustfs/rustfs
41+
docker pull rustfs/rustfs
4242
```
4343

4444
---
@@ -48,8 +48,8 @@ podman pull docker://rustfs/rustfs
4848
Create configuration file `/etc/rustfs/config.toml` on the host, example content:
4949

5050
```bash
51-
RUSTFS_ROOT_USER=rustfsadmin
52-
RUSTFS_ROOT_PASSWORD=rustfsadmin
51+
RUSTFS_ACCESS_KEY=rustfsadmin
52+
RUSTFS_SECRET_KEY=rustfsadmin
5353
RUSTFS_VOLUMES="/data/rustfs{0...3}"
5454
RUSTFS_ADDRESS=":7000"
5555
#RUSTFS_SERVER_DOMAINS="play.rustfs.com:7000"
@@ -68,11 +68,10 @@ RUSTFS_TLS_PATH="/opt/tls"
6868
RustFS SNSD Docker runtime method, combining the above image and configuration, execute:
6969

7070
```bash
71-
podman run -d \
71+
docker run -d \
7272
--name rustfs_local \
7373
-p 7000:7000 \
7474
-v /mnt/rustfs/data:/data \
75-
-v /etc/rustfs/rustfs:/config/rustfs:ro \
7675
rustfs/rustfs:latest
7776
```
7877

@@ -86,6 +85,110 @@ Parameter descriptions:
8685

8786
---
8887

88+
### Complete parameter configuration example
89+
90+
```bash
91+
docker run -d \
92+
--name rustfs_container \
93+
-p 9000:9000 \
94+
-p 9001:9001 \
95+
-v /mnt/rustfs/data:/data \
96+
-e RUSTFS_ACCESS_KEY=myaccesskey \
97+
-e RUSTFS_SECRET_KEY=mysecretkey \
98+
-e RUSTFS_CONSOLE_ENABLE=true \
99+
-e RUSTFS_SERVER_DOMAINS=example.com \
100+
rustfs/rustfs:latest \
101+
--address :9000 \
102+
--console-address :9001 \
103+
--console-enable \
104+
--server-domains example.com \
105+
--access-key myaccesskey \
106+
--secret-key mysecretkey \
107+
/data
108+
```
109+
110+
### Parameter description and corresponding method
111+
112+
1. **Environment variable method** (recommended):
113+
```bash
114+
-e RUSTFS_ADDRESS=:9000 \
115+
-e RUSTFS_SERVER_DOMAINS=example.com \
116+
-e RUSTFS_ACCESS_KEY=myaccesskey \
117+
-e RUSTFS_SECRET_KEY=mysecretkey \
118+
-e RUSTFS_CONSOLE_ENABLE=true \
119+
-e RUSTFS_CONSOLE_ADDRESS=:9001 \
120+
```
121+
122+
2. **Command line parameter method**:
123+
```
124+
--address :9000 \
125+
--server-domains example.com \
126+
--access-key myaccesskey \
127+
--secret-key mysecretkey \
128+
--console-enable \
129+
--console-address :9001 \
130+
```
131+
132+
3. **Required parameters**:
133+
- `<VOLUMES>`: Specify at the end of the command, `/data`
134+
135+
### Common configuration combinations
136+
137+
1. **Basic Configuration**:
138+
```bash
139+
docker run -d \
140+
-p 9000:9000 \
141+
-v /mnt/data:/data \
142+
rustfs/rustfs:latest \
143+
/data
144+
```
145+
146+
2. **Enable console**:
147+
```bash
148+
docker run -d \
149+
-p 9000:9000 \
150+
-p 9001:9001 \
151+
-v /mnt/data:/data \
152+
-e RUSTFS_CONSOLE_ENABLE=true \
153+
rustfs/rustfs:latest \
154+
./target/debug/rustfs \
155+
--console-enable \
156+
/data
157+
```
158+
159+
3. **Custom authentication key**:
160+
```bash
161+
docker run -d \
162+
-p 9000:9000 \
163+
-v /mnt/data:/data \
164+
-e RUSTFS_ACCESS_KEY=admin123 \
165+
-e RUSTFS_SECRET_KEY=secret123 \
166+
rustfs/rustfs:latest \
167+
./target/debug/rustfs \
168+
--access-key admin123 \
169+
--secret-key secret123 \
170+
/data
171+
```
172+
173+
### Things to note
174+
175+
1. The port mapping must correspond to:
176+
- Service port default 9000(`-p 9000:9000`)
177+
- Console port default 9001(`-p 9001:9001`)
178+
179+
2. Data volumes should be persisted:
180+
- `-v /host/path:/container/path`
181+
182+
3. Environment variables and command line parameters can be used in a mixed manner, but command line parameters have higher priority
183+
184+
4. If using TLS, additional certificate paths are required:
185+
```bash
186+
-v /path/to/certs:/certs \
187+
-e RUSTFS_TLS_PATH=/certs \
188+
```
189+
190+
191+
89192
## 5. Verification and Access
90193

91194
1. **Check container status and logs:**

docs/en/installation/linux.md

Lines changed: 22 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,14 @@ mv rustfs /usr/local/bin/
111111

112112
```bash
113113
sudo tee /etc/default/rustfs <<EOF
114-
RUSTFS_ROOT_USER=rustfsadmin
115-
RUSTFS_ROOT_PASSWORD=rustfsadmin
114+
RUSTFS_ACCESS_KEY=rustfsadmin
115+
RUSTFS_SECRET_KEY=rustfsadmin
116116
RUSTFS_VOLUMES="/data/rustfs{0...3}"
117117
RUSTFS_ADDRESS=":7000"
118118
#RUSTFS_SERVER_DOMAINS="play.rustfs.com:7000"
119119
RUSTFS_CONSOLE_ENABLE=true
120120
RUSTFS_CONSOLE_ADDRESS=":7001"
121-
RUSTFS_OBS_CONFIG="/etc/default/obs.toml"
121+
RUSTFS_OBS_ENDPOINT=""
122122
RUSTFS_TLS_PATH="/opt/tls"
123123
EOF
124124
```
@@ -135,42 +135,25 @@ sudo chmod -R 750 /data/rustfs* /var/logs/rustfs
135135
1. Create observability configuration file
136136

137137
```bash
138-
sudo tee /etc/default/obs.toml <<EOF
139-
[observability]
140-
endpoint = "http://localhost:4317"
141-
use_stdout = false
142-
sample_ratio = 2.0
143-
meter_interval = 30
144-
service_name = "rustfs"
145-
service_version = "0.1.0"
146-
environments = "production"
147-
logger_level = "debug"
148-
local_logging_enabled = true
149-
150-
[sinks]
151-
[sinks.kafka]
152-
enabled = false
153-
bootstrap_servers = "localhost:9092"
154-
topic = "logs"
155-
batch_size = 100
156-
batch_timeout_ms = 1000
157-
158-
[sinks.webhook]
159-
enabled = false
160-
endpoint = "http://localhost:8080/webhook"
161-
auth_token = ""
162-
batch_size = 100
163-
batch_timeout_ms = 1000
164-
165-
[sinks.file]
166-
enabled = true
167-
path = "/var/logs/rustfs/app.log"
168-
batch_size = 10
169-
batch_timeout_ms = 1000
170-
171-
[logger]
172-
queue_capacity = 10
173-
EOF
138+
export RUSTFS_OBS_ENDPOINT=http://localhost:4317 # The address of OpenTelemetry Collector
139+
export RUSTFS_OBS_USE_STDOUT=false # Whether to use standard output
140+
export RUSTFS_OBS_SAMPLE_RATIO=2.0 # Sampling rate, between 0.0-1.0, 0.0 means no sampling, 1.0 means all samples
141+
export RUSTFS_OBS_METER_INTERVAL=1 # Sampling interval, unit in seconds
142+
export RUSTFS_OBS_SERVICE_NAME=rustfs # Service name
143+
export RUSTFS_OBS_SERVICE_VERSION=0.1.0 # Service Version
144+
export RUSTFS_OBS_ENVIRONMENT=develop # Environment name
145+
export RUSTFS_OBS_LOGGER_LEVEL=debug # Log level, support trace, debug, info, warning, error
146+
export RUSTFS_OBS_LOCAL_LOGGING_ENABLED=true # Whether to enable local logging
147+
# Log Directory When the value `RUSTFS_OBS_ENDPOINT` is empty, the following log processing rules are executed by default.
148+
export RUSTFS_OBS_LOG_DIRECTORY="$current_dir/deploy/logs" # 日志目录
149+
export RUSTFS_OBS_LOG_ROTATION_TIME="minute" # Log rotation time unit, can be "second", "minute", "hour", "day"
150+
export RUSTFS_OBS_LOG_ROTATION_SIZE_MB=1 # Log rotation size in MB
151+
152+
# Configure logging
153+
export RUSTFS_SINKS_FILE_PATH="$current_dir/deploy/logs/rustfs.log"
154+
export RUSTFS_SINKS_FILE_BUFFER_SIZE=12
155+
export RUSTFS_SINKS_FILE_FLUSH_INTERVAL_MS=1000
156+
export RUSTFS_SINKS_FILE_FLUSH_THRESHOLD=100
174157
```
175158

176159
2. Set up log rotation

docs/zh/installation/docker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ docker pull rustfs/rustfs
5050
在宿主机创建配置文件 `/etc/rustfs/config.toml`,示例内容:
5151

5252
```bash
53-
RUSTFS_ROOT_USER=rustfsadmin
54-
RUSTFS_ROOT_PASSWORD=rustfsadmin
53+
RUSTFS_ACCESS_KEY=rustfsadmin
54+
RUSTFS_SECRET_KEY=rustfsadmin
5555
RUSTFS_VOLUMES="/data/rustfs{0...3}"
5656
RUSTFS_ADDRESS=":9000"
5757
#RUSTFS_SERVER_DOMAINS="play.rustfs.com:7000"

docs/zh/installation/linux.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ mv rustfs /usr/local/bin/
134134

135135
```bash
136136
sudo tee /etc/default/rustfs <<EOF
137-
RUSTFS_ROOT_USER=rustfsadmin
138-
RUSTFS_ROOT_PASSWORD=rustfsadmin
137+
RUSTFS_ACCESS_KEY=rustfsadmin
138+
RUSTFS_SECRET_KEY=rustfsadmin
139139
RUSTFS_VOLUMES="/data/rustfs{0...3}"
140140
RUSTFS_ADDRESS=":9000"
141141
#RUSTFS_SERVER_DOMAINS="play.rustfs.com:9000"

0 commit comments

Comments
 (0)