Files
Joachim Schlöffel c9543e113b
Build Alpine Packages / preflight (pull_request) Successful in 14s
Build Alpine Packages / build (gitea) (pull_request) Successful in 1m0s
Build Alpine Packages / build (lavinmq) (pull_request) Successful in 2m51s
Build Alpine Packages / build (nifi) (pull_request) Successful in 5s
Build Alpine Packages / build (seaweedfs) (pull_request) Successful in 39m45s
Build Alpine Packages / build (greptimedb) (pull_request) Successful in 1h31m44s
Build Alpine Packages / verify-and-publish (pull_request) Successful in 1m42s
add logrotate subpackages
2026-10-06 22:39:50 +02:00

106 lines
3.1 KiB
Markdown

# GreptimeDB Alpine Package
Builds `greptime` and its embedded dashboard from their upstream source
releases, and packages OpenRC service subpackages plus `/etc/greptimedb`
defaults.
Build command:
```sh
cargo auditable build --profile nightly --frozen --locked --bin greptime --features servers/dashboard
```
GreptimeDB requires the nightly pinned in its source release
(`nightly-2026-03-21`). The package uses Rustup to install that toolchain and
uses locked Cargo and pnpm dependency resolution, so `options="net"` is
intentional. Cargo dependencies are fetched before compilation; the Rust build
then runs frozen. The dashboard is built from the matching `v0.12.0` source tag
with its checked-in `pnpm-lock.yaml`.
## Runtime Layout
Installs `/usr/bin/greptime` and component OpenRC packages:
- `greptimedb-docs`: upstream configuration examples and reference files from
`config/`
- `greptimedb-standalone-openrc`: `greptime standalone start`
- `greptimedb-metasrv-openrc`: `greptime metasrv start`
- `greptimedb-datanode-openrc`: `greptime datanode start`
- `greptimedb-flownode-openrc`: `greptime flownode start`
- `greptimedb-frontend-openrc`: `greptime frontend start`
- `greptimedb-logrotate`: daily rotation for the OpenRC service logs, retaining
14 compressed archives
Default TOML files are installed in `/etc/greptimedb`. Standalone ports:
- `127.0.0.1:4000`: HTTP API and dashboard
- `127.0.0.1:4001`: gRPC
- `127.0.0.1:4002`: MySQL
- `127.0.0.1:4003`: PostgreSQL
Configs bind to localhost by default. Upstream config examples are in
`/usr/share/doc/greptimedb/config`.
## OpenRC Usage
Standalone:
```sh
apk add greptimedb greptimedb-docs greptimedb-standalone-openrc
rc-update add greptimedb.standalone default
rc-service greptimedb.standalone start
```
Distributed components:
```sh
apk add \
greptimedb \
greptimedb-metasrv-openrc \
greptimedb-datanode-openrc \
greptimedb-flownode-openrc \
greptimedb-frontend-openrc
```
Wrapper settings in `/etc/conf.d/greptimedb.<component>`:
- `GREPTIMEDB_CONFIG`: config file path passed with `-c`
- `GREPTIMEDB_LOG_DIR`: component log directory passed with `--log-dir`
- `GREPTIMEDB_DATA_HOME`: data directory passed with `--data-home` where the
component supports it
- `GREPTIMEDB_WAL_DIR`: datanode WAL directory passed with `--wal-dir`
- `GREPTIMEDB_OPTS`: extra component arguments appended after package defaults
- `GREPTIMEDB_GLOBAL_OPTS`: arguments inserted before the component command
## Package Commands
Refresh checksums:
```sh
ALPINE_PACKAGE=greptimedb mise run apk:checksum
```
Build:
```sh
ALPINE_PACKAGE=greptimedb mise run apk:build
```
Install-test local build:
```sh
ALPINE_PACKAGE=greptimedb SKIP_BUILD=1 mise run apk:test-install
```
Install-test published repository:
```sh
ALPINE_PACKAGE=greptimedb \
SKIP_BUILD=1 \
ALPINE_REPOSITORY_URL=https://code.factoring.digital/api/packages/public/alpine/v3.24/alpine-packages \
ALPINE_REPOSITORY_KEY_URL=https://code.factoring.digital/api/packages/public/alpine/key \
mise run apk:test-install
```
Full builds and the targeted upstream Nextest check take close to an hour.