3.6 KiB
GreptimeDB Alpine Package
This package builds greptime from the upstream GreptimeDB source release and packages OpenRC service subpackages plus default /etc/greptimedb configuration.
The APKBUILD builds the release directly:
cargo build --profile nightly --locked --bin greptime --features servers/dashboard
Runtime Layout
The package installs the upstream greptime binary as /usr/bin/greptime.
OpenRC support is split into component subpackages that map to the documented
GreptimeDB commands:
greptimedb-docs: upstream configuration examples and reference files fromconfig/greptimedb-standalone-openrc:greptime standalone startgreptimedb-metasrv-openrc:greptime metasrv startgreptimedb-datanode-openrc:greptime datanode startgreptimedb-flownode-openrc:greptime flownode startgreptimedb-frontend-openrc:greptime frontend start
Default TOML files are installed in /etc/greptimedb. The standalone config
listens on the documented local ports:
127.0.0.1:4000: HTTP API and dashboard127.0.0.1:4001: gRPC127.0.0.1:4002: MySQL127.0.0.1:4003: PostgreSQL
GreptimeDB binds to localhost by default. Edit the matching TOML file before exposing a service on another interface.
Install greptimedb-docs for the full upstream configuration reference and
example files under /usr/share/doc/greptimedb/config.
OpenRC Usage
Install and start the standalone service:
apk add greptimedb greptimedb-docs greptimedb-standalone-openrc
rc-update add greptimedb.standalone default
rc-service greptimedb.standalone start
Install the distributed components when managing a small OpenRC deployment:
apk add \
greptimedb \
greptimedb-metasrv-openrc \
greptimedb-datanode-openrc \
greptimedb-flownode-openrc \
greptimedb-frontend-openrc
The package starts each service with -c /etc/greptimedb/<component>.toml.
Package wrapper settings live in /etc/conf.d/greptimedb.<component>:
GREPTIMEDB_CONFIG: config file path passed with-cGREPTIMEDB_LOG_DIR: component log directory passed with--log-dirGREPTIMEDB_DATA_HOME: data directory passed with--data-homewhere the component supports itGREPTIMEDB_WAL_DIR: datanode WAL directory passed with--wal-dirGREPTIMEDB_OPTS: extra component arguments appended after package defaultsGREPTIMEDB_GLOBAL_OPTS: arguments inserted before the component command
GreptimeDB's own config environment variables are separate from these OpenRC
wrapper variables. The upstream docs use component prefixes such as
GREPTIMEDB_STANDALONE, GREPTIMEDB_DATANODE, GREPTIMEDB_FRONTEND, and
GREPTIMEDB_METASRV with double underscores for nested config keys.
For production clusters, follow the upstream deployment guidance. GreptimeDB recommends Kubernetes and the GreptimeDB Operator for production self-hosting.
Package Commands
Refresh the source checksum after changing pkgver:
ALPINE_PACKAGE=greptimedb mise run apk:checksum
Build only this package:
ALPINE_PACKAGE=greptimedb mise run apk:build
Install-test an existing local build without recompiling:
ALPINE_PACKAGE=greptimedb SKIP_BUILD=1 mise run apk:test-install
Install-test from a published Gitea Alpine repository:
ALPINE_PACKAGE=greptimedb \
SKIP_BUILD=1 \
ALPINE_REPOSITORY_URL=https://code.factoring.digital/api/packages/public/alpine/v3.23/alpine-packages \
ALPINE_REPOSITORY_KEY_URL=https://code.factoring.digital/api/packages/public/alpine/key \
mise run apk:test-install
The full build can take close to an hour. Do not run it as part of lightweight metadata or script checks.