mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-17 09:40:32 +00:00
* feat: improve code for notify * upgrade starshard version * upgrade version * Fix ETag format to comply with HTTP standards by wrapping with quotes (#592) * Initial plan * Fix ETag format to comply with HTTP standards by wrapping with quotes Co-authored-by: overtrue <1472352+overtrue@users.noreply.github.com> * bufigx --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: overtrue <1472352+overtrue@users.noreply.github.com> Co-authored-by: overtrue <anzhengchao@gmail.com> * Improve lock (#596) * improve lock Signed-off-by: Mu junxiang <1948535941@qq.com> * feat(tests): add wait_for_object_absence helper and improve lifecycle test reliability Signed-off-by: Mu junxiang <1948535941@qq.com> * chore: remove dirty docs Signed-off-by: Mu junxiang <1948535941@qq.com> --------- Signed-off-by: Mu junxiang <1948535941@qq.com> * feat(append): implement object append operations with state tracking (#599) * feat(append): implement object append operations with state tracking Signed-off-by: junxiang Mu <1948535941@qq.com> * chore: rebase Signed-off-by: junxiang Mu <1948535941@qq.com> --------- Signed-off-by: junxiang Mu <1948535941@qq.com> * build(deps): upgrade s3s (#595) Co-authored-by: loverustfs <155562731+loverustfs@users.noreply.github.com> * fix: validate mqtt broker * improve code for `import` * fix * improve * remove logger from `rustfs-obs` crate * remove code for config Observability * fix * improve code * fix comment * up * up * upgrade version * fix * fmt * upgrade tokio version to 1.48.0 * upgrade `datafusion` and `reed-solomon-simd` version * fix * fmt * improve code for notify webhook example * improve code * fix * fix * fmt --------- Signed-off-by: Mu junxiang <1948535941@qq.com> Signed-off-by: junxiang Mu <1948535941@qq.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: overtrue <1472352+overtrue@users.noreply.github.com> Co-authored-by: overtrue <anzhengchao@gmail.com> Co-authored-by: guojidan <63799833+guojidan@users.noreply.github.com> Co-authored-by: Nugine <nugine@foxmail.com> Co-authored-by: loverustfs <155562731+loverustfs@users.noreply.github.com>
124 lines
4.8 KiB
Bash
Executable File
124 lines
4.8 KiB
Bash
Executable File
#!/bin/bash -e
|
|
# Copyright 2024 RustFS Team
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
|
|
# check ./rustfs/static/index.html not exists
|
|
if [ ! -f ./rustfs/static/index.html ]; then
|
|
echo "Downloading rustfs-console-latest.zip"
|
|
# download rustfs-console-latest.zip do not show log
|
|
curl -s -L "https://dl.rustfs.com/artifacts/console/rustfs-console-latest.zip" -o tempfile.zip && unzip -q -o tempfile.zip -d ./rustfs/static && rm tempfile.zip
|
|
fi
|
|
|
|
if [ -z "$SKIP_BUILD" ]; then
|
|
cargo build -p rustfs --bins
|
|
fi
|
|
|
|
current_dir=$(pwd)
|
|
echo "Current directory: $current_dir"
|
|
|
|
# mkdir -p ./target/volume/test
|
|
mkdir -p ./target/volume/test{1..4}
|
|
|
|
|
|
if [ -z "$RUST_LOG" ]; then
|
|
export RUST_BACKTRACE=1
|
|
export RUST_LOG="rustfs=debug,ecstore=info,s3s=debug,iam=info"
|
|
fi
|
|
|
|
# export RUSTFS_ERASURE_SET_DRIVE_COUNT=5
|
|
|
|
# export RUSTFS_STORAGE_CLASS_INLINE_BLOCK="512 KB"
|
|
|
|
export RUSTFS_VOLUMES="./target/volume/test{1...4}"
|
|
# export RUSTFS_VOLUMES="./target/volume/test"
|
|
export RUSTFS_ADDRESS=":9000"
|
|
export RUSTFS_CONSOLE_ENABLE=true
|
|
export RUSTFS_CONSOLE_ADDRESS=":9001"
|
|
export RUSTFS_EXTERNAL_ADDRESS=":9000"
|
|
# export RUSTFS_SERVER_DOMAINS="localhost:9000"
|
|
# HTTPS certificate directory
|
|
# export RUSTFS_TLS_PATH="./deploy/certs"
|
|
|
|
# Observability related configuration
|
|
#export RUSTFS_OBS_ENDPOINT=http://localhost:4317 # OpenTelemetry Collector address
|
|
#export RUSTFS_OBS_USE_STDOUT=false # Whether to use standard output
|
|
#export RUSTFS_OBS_SAMPLE_RATIO=2.0 # Sample ratio, between 0.0-1.0, 0.0 means no sampling, 1.0 means full sampling
|
|
#export RUSTFS_OBS_METER_INTERVAL=1 # Sampling interval in seconds
|
|
#export RUSTFS_OBS_SERVICE_NAME=rustfs # Service name
|
|
#export RUSTFS_OBS_SERVICE_VERSION=0.1.0 # Service version
|
|
export RUSTFS_OBS_ENVIRONMENT=develop # Environment name
|
|
export RUSTFS_OBS_LOGGER_LEVEL=info # Log level, supports trace, debug, info, warn, error
|
|
export RUSTFS_OBS_LOCAL_LOGGING_ENABLED=true # Whether to enable local logging
|
|
export RUSTFS_OBS_LOG_DIRECTORY="$current_dir/deploy/logs" # Log directory
|
|
export RUSTFS_OBS_LOG_ROTATION_TIME="hour" # Log rotation time unit, can be "second", "minute", "hour", "day"
|
|
export RUSTFS_OBS_LOG_ROTATION_SIZE_MB=100 # Log rotation size in MB
|
|
export RUSTFS_OBS_LOG_POOL_CAPA=10240
|
|
export RUSTFS_OBS_LOG_MESSAGE_CAPA=32768
|
|
export RUSTFS_OBS_LOG_FLUSH_MS=300
|
|
|
|
#tokio runtime
|
|
export RUSTFS_RUNTIME_WORKER_THREADS=16
|
|
export RUSTFS_RUNTIME_MAX_BLOCKING_THREADS=1024
|
|
export RUSTFS_RUNTIME_THREAD_PRINT_ENABLED=true
|
|
# shellcheck disable=SC2125
|
|
export RUSTFS_RUNTIME_THREAD_STACK_SIZE=1024*1024
|
|
export RUSTFS_RUNTIME_THREAD_KEEP_ALIVE=60
|
|
export RUSTFS_RUNTIME_GLOBAL_QUEUE_INTERVAL=31
|
|
|
|
export OTEL_INSTRUMENTATION_NAME="rustfs"
|
|
export OTEL_INSTRUMENTATION_VERSION="0.1.1"
|
|
export OTEL_INSTRUMENTATION_SCHEMA_URL="https://opentelemetry.io/schemas/1.31.0"
|
|
export OTEL_INSTRUMENTATION_ATTRIBUTES="env=production"
|
|
|
|
# notify
|
|
export RUSTFS_NOTIFY_WEBHOOK_ENABLE="on" # Whether to enable webhook notification
|
|
export RUSTFS_NOTIFY_WEBHOOK_ENDPOINT="http://[::]:3020/webhook" # Webhook notification address
|
|
export RUSTFS_NOTIFY_WEBHOOK_QUEUE_DIR="$current_dir/deploy/logs/notify"
|
|
|
|
export RUSTFS_NOTIFY_WEBHOOK_ENABLE_PRIMARY="on" # Whether to enable webhook notification
|
|
export RUSTFS_NOTIFY_WEBHOOK_ENDPOINT_PRIMARY="http://[::]:3020/webhook" # Webhook notification address
|
|
export RUSTFS_NOTIFY_WEBHOOK_QUEUE_DIR_PRIMARY="$current_dir/deploy/logs/notify"
|
|
|
|
export RUSTFS_NOTIFY_WEBHOOK_ENABLE_MASTER="on" # Whether to enable webhook notification
|
|
export RUSTFS_NOTIFY_WEBHOOK_ENDPOINT_MASTER="http://[::]:3020/webhook" # Webhook notification address
|
|
export RUSTFS_NOTIFY_WEBHOOK_QUEUE_DIR_MASTER="$current_dir/deploy/logs/notify"
|
|
|
|
# export RUSTFS_POLICY_PLUGIN_URL="http://localhost:8181/v1/data/rustfs/authz/allow" # The URL of the OPA system
|
|
# export RUSTFS_POLICY_PLUGIN_AUTH_TOKEN="your-opa-token" # The authentication token for the OPA system is optional
|
|
|
|
|
|
export RUSTFS_NS_SCANNER_INTERVAL=60 # Object scanning interval in seconds
|
|
# exportRUSTFS_SKIP_BACKGROUND_TASK=true
|
|
|
|
export RUSTFS_COMPRESSION_ENABLED=true # Whether to enable compression
|
|
|
|
#export RUSTFS_REGION="us-east-1"
|
|
|
|
export RUSTFS_ENABLE_SCANNER=false
|
|
|
|
export RUSTFS_ENABLE_HEAL=false
|
|
|
|
# Event message configuration
|
|
#export RUSTFS_EVENT_CONFIG="./deploy/config/event.example.toml"
|
|
|
|
if [ -n "$1" ]; then
|
|
export RUSTFS_VOLUMES="$1"
|
|
fi
|
|
|
|
# Start webhook server
|
|
#cargo run --example webhook -p rustfs-notify &
|
|
# Start main service
|
|
cargo run --bin rustfs
|