From b5af335ec55f7bcfebce1ea4727504ebbb2e3128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Schl=C3=B6ffel?= Date: Sun, 6 Sep 2026 04:46:51 +0200 Subject: [PATCH] update seaweedfs to 4.45, add new rust worker --- packaging/alpine/local/seaweedfs/APKBUILD | 58 ++++++++++++--- packaging/alpine/local/seaweedfs/README.md | 6 ++ packaging/alpine/local/seaweedfs/admin.toml | 8 +++ .../alpine/local/seaweedfs/example-admin.toml | 71 +++++++++++++++++++ .../alpine/local/seaweedfs/example-filer.toml | 23 +++++- .../local/seaweedfs/example-replication.toml | 10 +++ .../local/seaweedfs/example-security.toml | 24 +++++++ .../local/seaweedfs/scripts/runtime-test.sh | 7 +- .../local/seaweedfs/scripts/test-install.sh | 7 +- .../scripts/update-generated-sources.sh | 2 +- .../alpine/local/seaweedfs/seaweedfs.initd | 6 +- .../seaweedfs/seaweedfs.worker-rust.confd | 4 ++ .../local/seaweedfs/weed-worker-wrapper | 10 +++ 13 files changed, 223 insertions(+), 13 deletions(-) create mode 100644 packaging/alpine/local/seaweedfs/admin.toml create mode 100644 packaging/alpine/local/seaweedfs/example-admin.toml create mode 100644 packaging/alpine/local/seaweedfs/seaweedfs.worker-rust.confd create mode 100644 packaging/alpine/local/seaweedfs/weed-worker-wrapper diff --git a/packaging/alpine/local/seaweedfs/APKBUILD b/packaging/alpine/local/seaweedfs/APKBUILD index a96a566..bf13368 100644 --- a/packaging/alpine/local/seaweedfs/APKBUILD +++ b/packaging/alpine/local/seaweedfs/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Joachim Schlöffel pkgname=seaweedfs -pkgver=4.44 +pkgver=4.45 pkgrel=0 pkgdesc="Distributed storage system for object storage, file systems, and Iceberg tables" url="https://github.com/seaweedfs/seaweedfs" @@ -20,21 +20,29 @@ subpackages=" $pkgname-volume-openrc:_openrc_volume:noarch $pkgname-webdav-openrc:_openrc_webdav:noarch $pkgname-worker-openrc:_openrc_worker:noarch + $pkgname-worker-rust:_worker_rust + $pkgname-worker-rust-openrc:_openrc_worker_rust:noarch " options="!check !strip !tracedeps" case "$CARCH" in x86_64) _archive="$pkgname-$pkgver-linux-amd64.tar.gz" + _worker_archive="$pkgname-worker-$pkgver-linux-amd64.tar.gz" ;; aarch64) _archive="$pkgname-$pkgver-linux-arm64.tar.gz" + _worker_archive="$pkgname-worker-$pkgver-linux-arm64.tar.gz" ;; esac source=" $pkgname-$pkgver-linux-amd64.tar.gz::https://github.com/seaweedfs/seaweedfs/releases/download/$pkgver/linux_amd64.tar.gz $pkgname-$pkgver-linux-arm64.tar.gz::https://github.com/seaweedfs/seaweedfs/releases/download/$pkgver/linux_arm64.tar.gz + $pkgname-worker-$pkgver-linux-amd64.tar.gz::https://github.com/seaweedfs/seaweedfs/releases/download/$pkgver/weed-worker_linux_amd64.tar.gz + $pkgname-worker-$pkgver-linux-arm64.tar.gz::https://github.com/seaweedfs/seaweedfs/releases/download/$pkgver/weed-worker_linux_arm64.tar.gz + admin.toml + example-admin.toml credential.toml example-credential.toml example-filer.toml @@ -58,6 +66,8 @@ source=" seaweedfs.volume.confd seaweedfs.webdav.confd seaweedfs.worker.confd + seaweedfs.worker-rust.confd + weed-worker-wrapper weed.bash-completion " @@ -66,12 +76,27 @@ builddir="$srcdir" prepare() { default_prepare tar -xzf "$srcdir/$_archive" -C "$builddir" + tar -xzf "$srcdir/$_worker_archive" -C "$builddir" +} + +build() { + cat > "$builddir"/res_init.c <<'EOF' +#include + +int __res_init(void) { + return res_init(); +} +EOF + ${CC:-cc} -shared -fPIC -o "$builddir"/libresinit.so "$builddir"/res_init.c } package() { install -Dm755 "$srcdir"/weed "$pkgdir"/usr/bin/weed + install -Dm755 "$srcdir"/weed-worker "$pkgdir"/usr/lib/seaweedfs/weed-worker + install -Dm755 "$srcdir"/weed-worker-wrapper "$pkgdir"/usr/bin/weed-worker + install -Dm755 "$builddir"/libresinit.so "$pkgdir"/usr/lib/seaweedfs/libresinit.so local _config - for _config in credential filer master notification replication security shell; do + for _config in admin credential filer master notification replication security shell; do install -Dm644 "$srcdir"/$_config.toml \ "$pkgdir"/etc/seaweedfs/$_config.toml install -Dm644 "$srcdir"/example-$_config.toml \ @@ -98,6 +123,17 @@ _openrc_sftp() { _openrc_service sftp; } _openrc_volume() { _openrc_service volume; } _openrc_webdav() { _openrc_service webdav; } _openrc_worker() { _openrc_service worker; } +_worker_rust() { + pkgdesc="Rust worker for SeaweedFS Lance table maintenance" + depends="$pkgname=$pkgver-r$pkgrel gcompat libgcc" + + amove usr/bin/weed-worker usr/lib/seaweedfs +} + +_openrc_worker_rust() { + _openrc_service worker-rust + depends="$pkgname-worker-rust=$pkgver-r$pkgrel $depends" +} _bashcomp() { pkgdesc="Bash completions for $pkgname" @@ -109,15 +145,19 @@ _bashcomp() { } sha512sums=" -502ed731a21668a04efa06961061ca9c061e96466e1d4cb5e1436dbb69591d9a08cdd95a39f3dda01cf2f200337d8748b5e87d6823b7c4504f26ac91e225e0cf seaweedfs-4.44-linux-amd64.tar.gz -df57fadf36d77504a8c5ce9b77719d180f218ec89ddd53d6a3e0e273dd1da860da39bb73569c7e239263ccdc306be10bb2e9f5840caabaddd25dc0205b04a5a9 seaweedfs-4.44-linux-arm64.tar.gz +7307107cc6c48b37ae019bdde4a2d62408b6577d9276f3b8c94764a716aa3dea919165a7bece94c84f834bd55e0cd2861dfeeeb00c57fd37d8964e9baef29ec0 seaweedfs-4.45-linux-amd64.tar.gz +2580ccc65fc8704d4534af40475f88dc8e69e807e035d366780ba1dba7df835c591f07ba6414323c79e8ac63565da1533b92724f88eb62096ce15b1a5447a8d9 seaweedfs-4.45-linux-arm64.tar.gz +fc39b0988ae857f59f2d8da14216743a958a1e7019b01becc65974d759cfdf0bc310e718150efa050d96a69a32bbdd8682447768f9faf792108cb44ff26bc66c seaweedfs-worker-4.45-linux-amd64.tar.gz +4d5e59fdc029f2b79e8e8de372166bc83382e68d805a141728d34d40a39041eaa0bd3ccde75d8da64d98a3a3f74f60bc45976ab9abc84c9a7ec8a1ef867aa451 seaweedfs-worker-4.45-linux-arm64.tar.gz +4f24760848c909fdee1ae8569ef7ef7cbec2c885d891a543d7beddee492bddbf266e6789601095a86798d1b00256782c45297ea36cdb527bb6b64980dd02486a admin.toml +507b389f6373b5f4d8ca69f27bc806b39bda8edf7f58e4f32720958e7782ee171dd0461bdecb285e5a8bf2cf4ea3d6cbe8b62ae6ac43c2a40d0eb053d50a22f8 example-admin.toml b6ce09d6d83dd70e2797a185171eea3587436fb024a99b4998f714b713244d6f768ef59f67c9b7251650d4f19d414eea231eab92099763d85cd92e41cb2bdc3f credential.toml 7105de7053654b8c0502521ce58585915fc831c3152801e1db02b1c5214dc3c3ed31f4fc18000665d8338c7a10ffbf0d248368bef2ef3a6d37d46cd856398366 example-credential.toml -9e6401387698832cb4aae0876ef3e237c9b70af17db7563ed641ba40c81af99f1d6c22281bafa64fff7ee8d2c89f16ccac1322ea31c9a02b545faa4e09f08549 example-filer.toml +fe9b11f24bc10297e8a4c411ff28868aafb153d5bb98711bab0c6c0b59aa267c42057a81adbf46809a87004004dfdc403744cf1bb8bebcf0b7030dcb11ba238a example-filer.toml e5753bd0bcc60dc84428c40ba556c08acae61dec083a5b76640125f637532e7c5759a72cdfd95114222a7a0901a916ec3c4d12f306853cfca0fe9a0b1857893e example-master.toml 2c200c28172a5d0b1c80ab28e849287e7af8d103355638fd3183b8614d3e2b1b3482132522663f7c6d844e10e13b8c6e23fb5fba0dec2cc83de45c2f17b33477 example-notification.toml -4b507540d57799e42ec0ee84073c6fa32c577a2f4a98bf66ee7302355080c63c65d70709115185debdee3c957e9294e79a8e461347d7148af7fdd368dc548af6 example-replication.toml -6951e1110d458238b0ef1905c4c6bb874d06f1c18b83dd8e1742534806b8db68b4410a664bf53085781e5d4d35e87941279d9c7398529ee707bb99def5055591 example-security.toml +328cfe43d0c2ebf5092a1178af45c37b07593085135c31649754f0df9fd4c043847c13b56c3c7c45194541db8082309c4845c825d7011e4c3e503b1e6576528d example-replication.toml +3b45b0f5bf6c5339cfb63c3ddb489b7122e03996ce380c7a244778ef1e7f6c06b4e3e56ea695a2dc3c9c49322a58df865ff50b2904318abafee5e66b2af757f1 example-security.toml 70069f97edf261a2cd0669dd60adad80533609a25d7429254e0c3322d7e80337f5ff69a5581bc39e6a15442098d14d610ce5f0cb14f02c461c8d3dd440b22c56 example-shell.toml be5771a5e1bf626c53f9dffbfa2a400d9b8f9626d55a7b61dcd853753561989427ba872a2638a5e6343f44dea6790678483bd29101d6495dbbfcd3029947b9a7 filer.toml 2cd6c73a5e23e0395b6f099dcc3acf9280cbb3e13f54408571e91741c4e6b0dad85f6d4e5a92f23ad541bad57ce295c28bb8450fe11da35acbd4da25848f61e5 master.toml @@ -127,12 +167,14 @@ d21981923b5964cf8365185a4f7c28a14e33ba6f60ad63e797e315544a6c22efdaa72814292824c0 7a91ce9da79b92e5ef42d4915f56a010bceaaa6c96dcef1f7b1821ee208d381aaa88b9cf495248276132e66d3215927f589b7fabc4eae2c2cb195645f904fac7 shell.toml 82e2793bf483ffb5b0c8fbe38e6c9df75afe01f824f8414cafd91e4bed5c79c13dae1ca659070401d4968d16ed4b26455b0c6208f777705527bceb2e5f286988 seaweedfs.admin.confd 5ad952c37c62a770327bd70f7349fa677406606f0b9bf03fdc8f6c6804701f1e77710ab20d6153f9e0cfb549ec161d68a3316abab9c59837bbe3f91ee99e5ce0 seaweedfs.filer.confd -6c7ebdaf8f941868051a025fda36278bdf5e5438a2d478ca1cbe35064f933e7b07bf6d56bdd2268894f01c4e232e48f69099f793baeb2d6011063ac56a132fe4 seaweedfs.initd +8a25e70ea874d58bf5450c91a54b8016d26b0dac61be7634cfbfc196bc2a21ae539911485ba9f72e515b42684c13e25f86cbd4c1427c29dc751c031613b40d32 seaweedfs.initd 57ba77519bb266f0117eaadae3af5ae6bc99bb653668ff526202f327df1c8d93973c0e19dae0c53a19e06389868043c04e53f16f01c851b77fe1387e92cc993b seaweedfs.master.confd 22a3ea6c83266a979ea7c848fc74b40fc0f2ade960b273fa11e63d4a72a1328bd688c9918be3e9234cfb19f889fd9c931388bb5c2863cea3500e534b8bd90282 seaweedfs.s3.confd 3e9c41bc61cdd9a4c53ece64d847eca26ab7d0ce0cc98e72462c3dbb225a40de10a02201362801015a9c629d77d5c0d54c7228e9d20111fb6f478b2267d2db98 seaweedfs.sftp.confd 262cc5132a70a43f9f154d24da16fe2f34f736c0bfdafd56cd341b7f34b48b82aa3a38a93d64206360c391e1167e2b665a3ade5c7eddfe4b322253521629f4e0 seaweedfs.volume.confd 84a9caa8f5203a31f2f96ef812dca8e4f7597f8f06ed3f55db38daff167448b0332564a421dcb356405d761c7a9e815656208d431e84b8106951554ab7ef2142 seaweedfs.webdav.confd b586dfbdbcf17591366a7a62c4da6f2b13e1bd5dfb5b066beea114d01057eeb3d81172814655d812c48e02336277b3d70fa9f9550923cfe616e9dd8162661f51 seaweedfs.worker.confd +72508778ad85fc9722c4d4e9d862434b0714e0e37315550ae05210090131fc3ad857635ff248cc978199b3612ea3c085b4f34904ec00bb7ceca6258ba0dc26c9 seaweedfs.worker-rust.confd +8deb0d366b54238c0fbd64fc0473f7212b95472f6dd1708f30131ae66d3d40d89c8f5de8093d5a5bd7b84fd4568f3844ca5ec4b86a2166708746da4b87449fc4 weed-worker-wrapper 2815330810545d17cffd993d93502c934c24af5aeff8f7096bcf0f020f895f1da50b74c356c028b67de552cbd8e4ccfa176636da2642feae99542035e4272171 weed.bash-completion " diff --git a/packaging/alpine/local/seaweedfs/README.md b/packaging/alpine/local/seaweedfs/README.md index 7f12656..e2397f3 100644 --- a/packaging/alpine/local/seaweedfs/README.md +++ b/packaging/alpine/local/seaweedfs/README.md @@ -54,6 +54,7 @@ seaweedfs-webdav-openrc -> /etc/init.d/seaweedfs.webdav seaweedfs-sftp-openrc -> /etc/init.d/seaweedfs.sftp seaweedfs-admin-openrc -> /etc/init.d/seaweedfs.admin seaweedfs-worker-openrc -> /etc/init.d/seaweedfs.worker +seaweedfs-worker-rust-openrc -> /etc/init.d/seaweedfs.worker-rust ``` Replace Alpine's old generic OpenRC package before installing a role split: @@ -92,6 +93,11 @@ rc-service seaweedfs.volume start rc-update add seaweedfs.filer default rc-service seaweedfs.filer start + +# Optional: Lance table maintenance (requires a Lance namespace endpoint) +apk add seaweedfs-worker-rust-openrc +rc-update add seaweedfs.worker-rust default +rc-service seaweedfs.worker-rust start ``` Check status: diff --git a/packaging/alpine/local/seaweedfs/admin.toml b/packaging/alpine/local/seaweedfs/admin.toml new file mode 100644 index 0000000..36672eb --- /dev/null +++ b/packaging/alpine/local/seaweedfs/admin.toml @@ -0,0 +1,8 @@ +# Configuration for `weed admin`. +# +# This package disables automatic maintenance by default. Enable individual +# maintenance services deliberately after reviewing the cluster's storage and +# replication policy. The setting is persisted in the admin data directory. + +[maintenance] +enabled = false diff --git a/packaging/alpine/local/seaweedfs/example-admin.toml b/packaging/alpine/local/seaweedfs/example-admin.toml new file mode 100644 index 0000000..63b3252 --- /dev/null +++ b/packaging/alpine/local/seaweedfs/example-admin.toml @@ -0,0 +1,71 @@ +# Put this file in one of the locations, with descending priority +# ./admin.toml +# $HOME/.seaweedfs/admin.toml +# /etc/seaweedfs/admin.toml +# this file is read by "weed admin" + +# Maintenance task settings declared here are applied every time the admin +# server starts, overriding values saved from the admin UI under +# /conf. Commented-out keys keep their saved or default values. +# Requires -dataDir. +# Each value can also be set via environment variable, e.g. +# export WEED_MAINTENANCE_VACUUM_GARBAGE_THRESHOLD=0.3 + +[s3] +# The address clients reach the S3 gateway at, including the scheme. +# The file browser uses it to offer copyable object URLs; without it, +# the copy action is hidden. +# public_endpoint = "https://s3.example.com" + +[maintenance] +# toggle the entire maintenance system (task detection and execution) +# enabled = true + +[maintenance.vacuum] +# enabled = true +# vacuum volumes with more deleted content than this ratio +# garbage_threshold = 0.3 +# how often to scan for volumes needing vacuum +# scan_interval_seconds = 7200 +# max_concurrent = 2 +# only vacuum volumes older than this (rounded up to whole hours) +# min_volume_age_seconds = 86400 +# max retry attempts for a failed vacuum job (admin runtime default) +# retry_limit = 1 +# seconds to wait between retry attempts +# retry_backoff_seconds = 10 + +[maintenance.balance] +# enabled = true +# trigger balancing when volume distribution exceeds this ratio +# imbalance_threshold = 0.2 +# scan_interval_seconds = 1800 +# max_concurrent = 1 +# minimum number of volume servers before balancing +# min_server_count = 2 +# max retry attempts for a failed balance job +# retry_limit = 1 +# seconds to wait between retry attempts +# retry_backoff_seconds = 15 + +[maintenance.erasure_coding] +# enabled = true +# only erasure code volumes this full +# fullness_ratio = 0.95 +# only erasure code volumes not modified for this long +# quiet_for_seconds = 3600 +# scan_interval_seconds = 3600 +# max_concurrent = 1 +# min_size_mb = 30 +# only process volumes from these collections, comma separated, "*" and "?" wildcards +# and regex patterns allowed ("" = all collections) +# collection_filter = "" +# disk tags preferred for shard placement +# preferred_tags = ["fast", "ssd"] +# EC shard placement constraint, e.g. "020"; empty uses the master default replication +# replica_placement = "" +# max retry attempts for a failed erasure coding job +# retry_limit = 1 +# seconds to wait between retry attempts +# retry_backoff_seconds = 30 + diff --git a/packaging/alpine/local/seaweedfs/example-filer.toml b/packaging/alpine/local/seaweedfs/example-filer.toml index 6a19d62..8ec5b10 100644 --- a/packaging/alpine/local/seaweedfs/example-filer.toml +++ b/packaging/alpine/local/seaweedfs/example-filer.toml @@ -230,6 +230,23 @@ client_cert_path = "" client_key_path = "" # This changes the data layout. Only add new directories. Removing/Updating will cause data loss. superLargeDirectories = [] +# Connection tuning, accepted by every redis filer store section. Each key keeps the go-redis +# default when left at 0, and a timeout cannot be turned off - a filer that never times out a read +# is what stalls a failover. Shorter read timeouts make the filer notice a dead redis sooner, which +# matters most for the sentinel store: every pooled connection to the old master has to time out +# before a failover is absorbed. +# max_retries = 0 # 0 is three retries, -1 disables retrying +# min_retry_backoff_millisecond = 0 # default 8 +# max_retry_backoff_millisecond = 0 # default 512 +# dial_timeout_millisecond = 0 # default 5000 +# read_timeout_millisecond = 0 # default 3000 +# write_timeout_millisecond = 0 # default 3000, follows read_timeout_millisecond +# pool_size = 0 # default 10 per CPU +# pool_timeout_millisecond = 0 # default read_timeout_millisecond + 1000 +# min_idle_conns = 0 +# max_idle_conns = 0 +# conn_max_idle_time_seconds = 0 # default 1800 +# conn_max_lifetime_seconds = 0 # default unlimited [redis2_sentinel] enabled = false @@ -237,6 +254,9 @@ addresses = ["172.22.12.7:26379","172.22.12.8:26379","172.22.12.9:26379"] masterName = "master" username = "" password = "" +# credentials used to authenticate against the sentinel nodes themselves (if they require auth) +sentinel_username = "" +sentinel_password = "" database = 0 # prefix for filer redis keys keyPrefix = "" @@ -244,6 +264,7 @@ enable_tls = false ca_cert_path = "" client_cert_path = "" client_key_path = "" +# see [redis2] for the connection tuning keys [redis_cluster2] enabled = false @@ -264,7 +285,7 @@ ca_cert_path = "" client_cert_path = "" client_key_path = "" # allows reads from slave servers or the master, but all writes still go to the master -readOnly = false +useReadOnly = false # automatically use the closest Redis server for reads routeByLatency = false # This changes the data layout. Only add new directories. Removing/Updating will cause data loss. diff --git a/packaging/alpine/local/seaweedfs/example-replication.toml b/packaging/alpine/local/seaweedfs/example-replication.toml index 4df5aa9..91f97ba 100644 --- a/packaging/alpine/local/seaweedfs/example-replication.toml +++ b/packaging/alpine/local/seaweedfs/example-replication.toml @@ -59,7 +59,17 @@ is_incremental = false # experimental, let me know if it works enabled = false account_name = "" +# leave account_key empty to authenticate with Entra ID instead of a shared key, +# picking up a workload identity or managed identity from the environment. The +# identity needs a data-plane role such as Storage Blob Data Contributor. account_key = "" +# optional user-assigned identity, when account_key is empty. Workload identity +# takes its tenant and token from AZURE_TENANT_ID and AZURE_FEDERATED_TOKEN_FILE, +# which the Azure workload identity webhook projects into the pod. +client_id = "" +# blob service url, for accounts outside the public cloud. Empty resolves to +# https://.blob.core.windows.net/ +endpoint = "" container = "mycontainer" # an existing container directory = "/" # destination directory is_incremental = false diff --git a/packaging/alpine/local/seaweedfs/example-security.toml b/packaging/alpine/local/seaweedfs/example-security.toml index 4118c7e..6be0b7b 100644 --- a/packaging/alpine/local/seaweedfs/example-security.toml +++ b/packaging/alpine/local/seaweedfs/example-security.toml @@ -77,6 +77,12 @@ expires_after_seconds = 10 # seconds # All gRPC TLS authentications are mutual (mTLS) # The values for ca, cert, and key are paths to the certificate/key files # The host name is not checked, so the certificate files can be shared +# Each [grpc.] section also accepts optional client_cert/client_key, +# presented when that component dials other servers. Set them when your CA +# issues separate serverAuth-only and clientAuth-only certificates; when unset, +# the component reuses cert/key for both directions. +# If client and server certificates come from different issuing CAs, put both +# CA certificates in the ca PEM file. [grpc] ca = "" # Set wildcard domain for enable TLS authentication by common names @@ -87,6 +93,8 @@ allowed_wildcard_domain = "" # .mycompany.com [grpc.volume] cert = "" key = "" +client_cert = "" +client_key = "" allowed_commonNames = "" # comma-separated SSL certificate common names # Master server gRPC options (server-side) @@ -94,6 +102,8 @@ allowed_commonNames = "" # comma-separated SSL certificate common names [grpc.master] cert = "" key = "" +client_cert = "" +client_key = "" allowed_commonNames = "" # comma-separated SSL certificate common names # Filer server gRPC options (server-side) @@ -101,6 +111,8 @@ allowed_commonNames = "" # comma-separated SSL certificate common names [grpc.filer] cert = "" key = "" +client_cert = "" +client_key = "" allowed_commonNames = "" # comma-separated SSL certificate common names # S3 server gRPC options (server-side) @@ -108,31 +120,43 @@ allowed_commonNames = "" # comma-separated SSL certificate common names [grpc.s3] cert = "" key = "" +client_cert = "" +client_key = "" allowed_commonNames = "" # comma-separated SSL certificate common names [grpc.msg_broker] cert = "" key = "" +client_cert = "" +client_key = "" allowed_commonNames = "" # comma-separated SSL certificate common names [grpc.msg_agent] cert = "" key = "" +client_cert = "" +client_key = "" allowed_commonNames = "" # comma-separated SSL certificate common names [grpc.admin] cert = "" key = "" +client_cert = "" +client_key = "" allowed_commonNames = "" # comma-separated SSL certificate common names [grpc.worker] cert = "" key = "" +client_cert = "" +client_key = "" allowed_commonNames = "" # comma-separated SSL certificate common names [grpc.mq] cert = "" key = "" +client_cert = "" +client_key = "" allowed_commonNames = "" # comma-separated SSL certificate common names # gRPC client configuration for outgoing gRPC connections diff --git a/packaging/alpine/local/seaweedfs/scripts/runtime-test.sh b/packaging/alpine/local/seaweedfs/scripts/runtime-test.sh index 83e5f59..d0b272b 100755 --- a/packaging/alpine/local/seaweedfs/scripts/runtime-test.sh +++ b/packaging/alpine/local/seaweedfs/scripts/runtime-test.sh @@ -6,18 +6,23 @@ apk add seaweedfs \ bash-completion \ seaweedfs-master-openrc \ seaweedfs-volume-openrc \ - seaweedfs-filer-openrc + seaweedfs-filer-openrc \ + seaweedfs-worker-rust-openrc test -x /usr/bin/weed test -d /etc/seaweedfs test -f /etc/seaweedfs/master.toml test -f /etc/seaweedfs/filer.toml +test -f /etc/seaweedfs/admin.toml test -f /etc/conf.d/seaweedfs.master test -f /etc/conf.d/seaweedfs.volume test -f /etc/conf.d/seaweedfs.filer test -f /etc/init.d/seaweedfs.master test -f /etc/init.d/seaweedfs.volume test -f /etc/init.d/seaweedfs.filer +test -f /etc/init.d/seaweedfs.worker-rust +test -x /usr/bin/weed-worker +/usr/bin/weed-worker --help >/dev/null test -d /usr/share/doc/seaweedfs/examples test -f /usr/share/doc/seaweedfs/examples/master.toml test -f /usr/share/bash-completion/completions/weed diff --git a/packaging/alpine/local/seaweedfs/scripts/test-install.sh b/packaging/alpine/local/seaweedfs/scripts/test-install.sh index 72bb5f4..2970b73 100755 --- a/packaging/alpine/local/seaweedfs/scripts/test-install.sh +++ b/packaging/alpine/local/seaweedfs/scripts/test-install.sh @@ -15,18 +15,23 @@ apk_test_install_run "${repo_root}" "${PACKAGE_NAME:-seaweedfs}" "${PACKAGE_VERS apk add seaweedfs \ seaweedfs-master-openrc \ seaweedfs-volume-openrc \ - seaweedfs-filer-openrc + seaweedfs-filer-openrc \ + seaweedfs-worker-rust-openrc test -x /usr/bin/weed test -d /etc/seaweedfs test -f /etc/seaweedfs/master.toml test -f /etc/seaweedfs/filer.toml + test -f /etc/seaweedfs/admin.toml test -f /etc/conf.d/seaweedfs.master test -f /etc/conf.d/seaweedfs.volume test -f /etc/conf.d/seaweedfs.filer test -f /etc/init.d/seaweedfs.master test -f /etc/init.d/seaweedfs.volume test -f /etc/init.d/seaweedfs.filer + test -f /etc/init.d/seaweedfs.worker-rust + test -x /usr/bin/weed-worker + /usr/bin/weed-worker --help >/dev/null weed version diff --git a/packaging/alpine/local/seaweedfs/scripts/update-generated-sources.sh b/packaging/alpine/local/seaweedfs/scripts/update-generated-sources.sh index b604d80..e41b923 100755 --- a/packaging/alpine/local/seaweedfs/scripts/update-generated-sources.sh +++ b/packaging/alpine/local/seaweedfs/scripts/update-generated-sources.sh @@ -2,7 +2,7 @@ set -euo pipefail package_dir="${PACKAGE_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}" -configs=(credential filer master notification replication security shell) +configs=(admin credential filer master notification replication security shell) pkgver="$( awk -F= '$1 == "pkgver" { print $2; exit }' "${package_dir}/APKBUILD" )" diff --git a/packaging/alpine/local/seaweedfs/seaweedfs.initd b/packaging/alpine/local/seaweedfs/seaweedfs.initd index 350aa5d..f1b0720 100644 --- a/packaging/alpine/local/seaweedfs/seaweedfs.initd +++ b/packaging/alpine/local/seaweedfs/seaweedfs.initd @@ -46,6 +46,10 @@ build_command_args() { data_dir="${SEAWEEDFS_DATA_DIR:-/var/lib/seaweedfs/worker}" command_args="$command_args -admin=${SEAWEEDFS_ADMIN:-localhost:23646} -workingDir=${data_dir}" ;; + worker-rust) + command="/usr/bin/weed-worker" + command_args="--admin ${SEAWEEDFS_ADMIN:-localhost:23646} --namespace ${SEAWEEDFS_LANCE_NAMESPACE:-http://localhost:9101}" + ;; esac command_args="$command_args ${SEAWEEDFS_OPTS:-}" @@ -62,7 +66,7 @@ depend() { s3|webdav|sftp) after seaweedfs.filer ;; - worker) + worker|worker-rust) after seaweedfs.admin ;; esac diff --git a/packaging/alpine/local/seaweedfs/seaweedfs.worker-rust.confd b/packaging/alpine/local/seaweedfs/seaweedfs.worker-rust.confd new file mode 100644 index 0000000..b076bfc --- /dev/null +++ b/packaging/alpine/local/seaweedfs/seaweedfs.worker-rust.confd @@ -0,0 +1,4 @@ +# Rust Lance maintenance worker. It is optional and requires a Lance namespace. +SEAWEEDFS_ADMIN="localhost:23646" +SEAWEEDFS_LANCE_NAMESPACE="http://localhost:9101" +SEAWEEDFS_OPTS="" diff --git a/packaging/alpine/local/seaweedfs/weed-worker-wrapper b/packaging/alpine/local/seaweedfs/weed-worker-wrapper new file mode 100644 index 0000000..3302e4a --- /dev/null +++ b/packaging/alpine/local/seaweedfs/weed-worker-wrapper @@ -0,0 +1,10 @@ +#!/bin/sh + +shim="/usr/lib/seaweedfs/libresinit.so" +if [ -n "${LD_PRELOAD:-}" ]; then + export LD_PRELOAD="${shim}:${LD_PRELOAD}" +else + export LD_PRELOAD="${shim}" +fi + +exec /usr/lib/seaweedfs/weed-worker "$@"