mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-12 02:06:37 +08:00
[新增] 同步更新英文版文档
This commit is contained in:
+48
-10
@@ -1,16 +1,29 @@
|
||||
# Upgrade and Maintenance
|
||||
|
||||
You will learn: How to upgrade the Server and Agent, how to clean up observability data, and which verification commands to execute before and after maintenance.
|
||||
|
||||
Before upgrading, it is recommended to confirm the current activated version, the latest Agent application result, and the database backup policy. Do not upgrade in production environments while configuration publishing, large-scale Agent reconnection, or database migrations are in progress.
|
||||
|
||||
## Server Upgrade
|
||||
|
||||
Root users can check and upgrade stable Server releases from the console header. Manual binary upload is also supported.
|
||||
Root users can check and upgrade the Server stable version from the top bar of the management console. Upgrades can also be confirmed and executed by uploading the Server binary.
|
||||
|
||||
Preview releases require manual selection. Stable releases are recommended for production.
|
||||
To try a preview version, you can manually check the corresponding release. It is recommended to prioritize the stable version in production environments.
|
||||
|
||||
After upgrading, confirm:
|
||||
|
||||
```bash
|
||||
docker compose ps
|
||||
docker compose logs -n 100 openflare
|
||||
```
|
||||
|
||||
If it is a source deployment, confirm that there are no database migration or startup errors in the logs after restarting the Server.
|
||||
|
||||
## Agent Upgrade
|
||||
|
||||
Agents follow stable releases by default. Preview upgrades must be triggered manually.
|
||||
Node Agents follow stable versions by default for automatic updates. Preview upgrades must be triggered manually.
|
||||
|
||||
The install script can be re-run for reinstall or upgrade:
|
||||
The installation script can be executed repeatedly to reinstall or upgrade the Agent:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://raw.githubusercontent.com/Rain-kl/OpenFlare/main/scripts/install-agent.sh | bash -s -- \
|
||||
@@ -18,30 +31,55 @@ curl -fsSL https://raw.githubusercontent.com/Rain-kl/OpenFlare/main/scripts/inst
|
||||
--agent-token YOUR_AGENT_TOKEN
|
||||
```
|
||||
|
||||
Note: Currently, the installation script will delete the entire installation directory during reinstallation, including the old `agent.json`, local state, cache data, and downloaded binaries. Please confirm that you still have a usable Token on hand before executing.
|
||||
|
||||
After upgrading, confirm:
|
||||
|
||||
```bash
|
||||
systemctl status openflare-agent
|
||||
journalctl -u openflare-agent -n 100 --no-pager
|
||||
```
|
||||
|
||||
## Data Maintenance
|
||||
|
||||
The settings page controls observability cleanup:
|
||||
The settings page of the management console can maintain the observability data automatic cleanup policy:
|
||||
|
||||
| Option | Description |
|
||||
| Configuration Item | Description |
|
||||
| --- | --- |
|
||||
| `DatabaseAutoCleanupEnabled` | Enable daily cleanup |
|
||||
| `DatabaseAutoCleanupRetentionDays` | Retention days, minimum 1 |
|
||||
| `DatabaseAutoCleanupEnabled` | Whether to enable daily automatic cleanup |
|
||||
| `DatabaseAutoCleanupRetentionDays` | Automatic cleanup retention days, at least 1 day |
|
||||
|
||||
When enabled, Server cleans access logs, metric snapshots, and request reports at 03:00 every day.
|
||||
Once enabled, the Server will clean up access logs, metric snapshots, and request reports at 3 AM every day.
|
||||
|
||||
## Validation Commands
|
||||
## Common Verification Commands
|
||||
|
||||
Server:
|
||||
|
||||
```bash
|
||||
cd openflare_server
|
||||
GOCACHE=/tmp/openflare-go-cache go test ./...
|
||||
```
|
||||
|
||||
Agent:
|
||||
|
||||
```bash
|
||||
cd openflare_agent
|
||||
GOCACHE=/tmp/openflare-go-cache go test ./...
|
||||
```
|
||||
|
||||
Frontend:
|
||||
|
||||
```bash
|
||||
cd openflare_server/web
|
||||
pnpm lint
|
||||
pnpm typecheck
|
||||
pnpm test
|
||||
pnpm build
|
||||
```
|
||||
|
||||
Docs:
|
||||
|
||||
```bash
|
||||
cd docs
|
||||
pnpm build
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user