houseme 01d5383ce3 Feature/bucket event notification (#365)
* add tracing instrument

* fix rebalance/decom

* modify Telemetry filter order

* feat: improve address binding and port handling mechanism (#366)

* feat: improve address binding and port handling mechanism

1. Add support for ":port" format to enable dual-stack binding (IPv4/IPv6)
2. Implement automatic port allocation when port 0 is specified
3. Optimize server startup process with unified address resolution
4. Enhance error handling and logging for address resolution
5. Improve graceful shutdown with signal listening
6. Clean up commented code in console.rs

Files:
- ecstore/src/utils/net.rs
- rustfs/src/console.rs
- rustfs/src/main.rs

Branch: feature/server-and-console-port

* improve code for console

* improve code

* improve code for console and net.rs

* Update rustfs/src/main.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update rustfs/src/utils/mod.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* upgrade config file

* modify

* fix readme

Signed-off-by: junxiang Mu <1948535941@qq.com>

* improve readme.md

* improve code for readme.md
add chinese readme.md

* Implement Storage Service Event Notification System

Added event notification capability to the storage module, enabling the storage service to publish object operation events. Key changes include:

1. Created `event_notifier` module providing core functionality:
   - `create_metadata()` - Creates event metadata objects with default configuration ID
   - `send_event()` - Asynchronously sends event notifications with error handling

2. Integrated the `rustfs_event_notifier` library:
   - Supports object creation, deletion, and access events
   - Provides event metadata building and management
   - Includes proper error propagation

These changes enable the system to trigger notifications when storage operations occur, facilitating auditing, monitoring, and integration with other systems.

* fix

---------

Signed-off-by: junxiang Mu <1948535941@qq.com>
Co-authored-by: weisd <im@weisd.in>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: junxiang Mu <1948535941@qq.com>
2025-04-30 00:31:55 +08:00
2025-04-23 15:11:43 +08:00
2025-04-08 22:32:24 +08:00
2025-04-23 16:48:57 +08:00
2025-04-11 20:53:51 +08:00
2025-04-28 14:37:28 +08:00
2025-04-09 02:41:06 +00:00
2025-04-29 10:53:03 +00:00
2025-04-11 20:53:51 +08:00
2025-04-24 08:21:09 +00:00
2025-04-11 20:53:51 +08:00
2025-04-22 09:14:09 +08:00
2025-04-29 10:53:03 +00:00
2025-03-14 23:26:54 +08:00
2025-03-11 16:12:34 +08:00
2024-07-01 19:33:20 +08:00
2025-03-20 01:16:55 +08:00

RustFS

English Documentation |中文文档

Prerequisites

Package Version Download Link
Rust 1.8.5+ rust-lang.org/tools/install
protoc 30.2+ protoc-30.2-linux-x86_64.zip
flatc 24.0+ Linux.flatc.binary.g++-13.zip

Building RustFS

Generate Protobuf Code

cargo run --bin gproto

Using Docker for Prerequisites

- uses: arduino/setup-protoc@v3
  with:
    version: "30.2"

- uses: Nugine/setup-flatc@v1
  with:
    version: "25.2.10"

Adding Console Web UI

  1. Download the latest console UI:
    wget https://dl.rustfs.com/artifacts/console/rustfs-console-latest.zip
    
  2. Create the static directory:
    mkdir -p ./rustfs/static
    
  3. Extract and compile RustFS:
    unzip rustfs-console-latest.zip -d ./rustfs/static
    cargo build
    

Running RustFS

Configuration

Set the required environment variables:

# Basic config
export RUSTFS_VOLUMES="./target/volume/test"
export RUSTFS_ADDRESS="0.0.0.0:9000"
export RUSTFS_CONSOLE_ENABLE=true
export RUSTFS_CONSOLE_ADDRESS="0.0.0.0:9001"

# Observability config (option 1: config file)
export RUSTFS_OBS_CONFIG="./deploy/config/obs.toml"

# Observability config (option 2: environment variables)
export RUSTFS__OBSERVABILITY__ENDPOINT=http://localhost:4317
export RUSTFS__OBSERVABILITY__USE_STDOUT=true
export RUSTFS__OBSERVABILITY__SAMPLE_RATIO=2.0
export RUSTFS__OBSERVABILITY__METER_INTERVAL=30
export RUSTFS__OBSERVABILITY__SERVICE_NAME=rustfs
export RUSTFS__OBSERVABILITY__SERVICE_VERSION=0.1.0
export RUSTFS__OBSERVABILITY__ENVIRONMENT=develop
export RUSTFS__OBSERVABILITY__LOGGER_LEVEL=info
export RUSTFS__OBSERVABILITY__LOCAL_LOGGING_ENABLED=true

# Logging sinks
export RUSTFS__SINKS__FILE__ENABLED=true
export RUSTFS__SINKS__FILE__PATH="./deploy/logs/rustfs.log"
export RUSTFS__SINKS__WEBHOOK__ENABLED=false
export RUSTFS__SINKS__WEBHOOK__ENDPOINT=""
export RUSTFS__SINKS__WEBHOOK__AUTH_TOKEN=""
export RUSTFS__SINKS__KAFKA__ENABLED=false
export RUSTFS__SINKS__KAFKA__BOOTSTRAP_SERVERS=""
export RUSTFS__SINKS__KAFKA__TOPIC=""
export RUSTFS__LOGGER__QUEUE_CAPACITY=10

Start the service

./rustfs /data/rustfs

Observability Stack

Deployment

  1. Navigate to the observability directory:

    cd .docker/observability
    
  2. Start the observability stack:

    docker compose -f docker-compose.yml  up -d
    

Access Monitoring Dashboards

  • Grafana: http://localhost:3000 (credentials: admin/admin)
  • Jaeger: http://localhost:16686
  • Prometheus: http://localhost:9090

Configuring Observability

  1. Copy the example configuration:

    cd deploy/config
    cp obs.toml.example obs.toml
    
  2. Edit obs.toml with the following parameters:

Parameter Description Example
endpoint OpenTelemetry Collector address http://localhost:4317
service_name Service name rustfs
service_version Service version 1.0.0
environment Runtime environment production
meter_interval Metrics export interval (seconds) 30
sample_ratio Sampling ratio 1.0
use_stdout Output to console true/false
logger_level Log level info
local_logging_enable stdout true/false
Languages
Rust 98.1%
Shell 1.5%
Makefile 0.2%
Just 0.1%