Some checks failed
Build Alpine Packages / build-and-publish (v3.23, 3.23) (push) Failing after 3m44s
111 lines
3.6 KiB
Markdown
111 lines
3.6 KiB
Markdown
# 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:
|
|
|
|
```sh
|
|
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 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`
|
|
|
|
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 dashboard
|
|
- `127.0.0.1:4001`: gRPC
|
|
- `127.0.0.1:4002`: MySQL
|
|
- `127.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:
|
|
|
|
```sh
|
|
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:
|
|
|
|
```sh
|
|
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 `-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
|
|
|
|
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`:
|
|
|
|
```sh
|
|
ALPINE_PACKAGE=greptimedb mise run apk:checksum
|
|
```
|
|
|
|
Build only this package:
|
|
|
|
```sh
|
|
ALPINE_PACKAGE=greptimedb mise run apk:build
|
|
```
|
|
|
|
Install-test an existing local build without recompiling:
|
|
|
|
```sh
|
|
ALPINE_PACKAGE=greptimedb SKIP_BUILD=1 mise run apk:test-install
|
|
```
|
|
|
|
Install-test from a published Gitea Alpine repository:
|
|
|
|
```sh
|
|
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.
|