mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-27 16:48:58 +00:00
a9d5fbac54
* build(deps): bump the dependencies group with 6 updates Bumps the dependencies group with 6 updates: | Package | From | To | | --- | --- | --- | | [axum-extra](https://github.com/tokio-rs/axum) | `0.10.3` | `0.12.0` | | [aws-config](https://github.com/smithy-lang/smithy-rs) | `1.8.8` | `1.8.10` | | [aws-sdk-s3](https://github.com/awslabs/aws-sdk-rust) | `1.109.0` | `1.110.0` | | [aws-smithy-types](https://github.com/smithy-lang/smithy-rs) | `1.3.3` | `1.3.4` | | [clap](https://github.com/clap-rs/clap) | `4.5.50` | `4.5.51` | | [matchit](https://github.com/ibraheemdev/matchit) | `0.8.4` | `0.9.0` | Updates `axum-extra` from 0.10.3 to 0.12.0 - [Release notes](https://github.com/tokio-rs/axum/releases) - [Changelog](https://github.com/tokio-rs/axum/blob/main/CHANGELOG.md) - [Commits](https://github.com/tokio-rs/axum/compare/axum-extra-v0.10.3...axum-extra-v0.12.0) Updates `aws-config` from 1.8.8 to 1.8.10 - [Release notes](https://github.com/smithy-lang/smithy-rs/releases) - [Changelog](https://github.com/smithy-lang/smithy-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/smithy-lang/smithy-rs/commits) Updates `aws-sdk-s3` from 1.109.0 to 1.110.0 - [Release notes](https://github.com/awslabs/aws-sdk-rust/releases) - [Commits](https://github.com/awslabs/aws-sdk-rust/commits) Updates `aws-smithy-types` from 1.3.3 to 1.3.4 - [Release notes](https://github.com/smithy-lang/smithy-rs/releases) - [Changelog](https://github.com/smithy-lang/smithy-rs/blob/main/CHANGELOG.md) - [Commits](https://github.com/smithy-lang/smithy-rs/commits) Updates `clap` from 4.5.50 to 4.5.51 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.50...clap_complete-v4.5.51) Updates `matchit` from 0.8.4 to 0.9.0 - [Release notes](https://github.com/ibraheemdev/matchit/releases) - [Commits](https://github.com/ibraheemdev/matchit/compare/v0.8.4...v0.9.0) --- updated-dependencies: - dependency-name: axum-extra dependency-version: 0.12.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dependencies - dependency-name: aws-config dependency-version: 1.8.10 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies - dependency-name: aws-sdk-s3 dependency-version: 1.110.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dependencies - dependency-name: aws-smithy-types dependency-version: 1.3.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies - dependency-name: clap dependency-version: 4.5.51 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: dependencies - dependency-name: matchit dependency-version: 0.9.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * upgrade crates version --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: houseme <housemecn@gmail.com>
145 lines
6.0 KiB
Bash
Executable File
145 lines
6.0 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_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=debug # 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
|
|
|
|
# Enable jemalloc for memory profiling
|
|
# MALLOC_CONF parameters:
|
|
# prof:true - Enable heap profiling
|
|
# prof_active:true - Start profiling immediately
|
|
# lg_prof_sample:16 - Average number of bytes between samples (2^16 = 65536 bytes)
|
|
# log:true - Enable logging
|
|
# narenas:2 - Number of arenas (controls concurrency and memory fragmentation)
|
|
# lg_chunk:21 - Chunk size (2^21 = 2MB)
|
|
# background_thread:true - Enable background threads for purging
|
|
# dirty_decay_ms:1000 - Time (ms) before dirty pages are purged
|
|
# muzzy_decay_ms:1000 - Time (ms) before muzzy pages are purged
|
|
# You can override these defaults by setting the MALLOC_CONF environment variable before running this script.
|
|
if [ -z "$MALLOC_CONF" ]; then
|
|
export MALLOC_CONF="prof:true,prof_active:true,lg_prof_sample:16,log:true,narenas:2,lg_chunk:21,background_thread:true,dirty_decay_ms:1000,muzzy_decay_ms:1000"
|
|
fi
|
|
|
|
# Start webhook server
|
|
#cargo run --example webhook -p rustfs-notify &
|
|
# Start main service
|
|
# To run with profiling enabled, uncomment the following line and comment the next line
|
|
#cargo run --profile profiling --bin rustfs
|
|
# To run in release mode, use the following line
|
|
#cargo run --profile release --bin rustfs
|
|
# To run in debug mode, use the following line
|
|
cargo run --bin rustfs
|
|
|