Add GreptimeDB docs package and trim CI matrix
Some checks failed
Build Alpine Packages / build-and-publish (v3.23, 3.23) (push) Failing after 3m44s

This commit is contained in:
Joachim Schlöffel
2026-06-09 13:23:51 +02:00
parent 05188cc390
commit bef07e3e22
5 changed files with 86 additions and 25 deletions

View File

@@ -18,8 +18,6 @@ jobs:
include: include:
- alpine_version: "3.23" - alpine_version: "3.23"
alpine_registry_branch: "v3.23" alpine_registry_branch: "v3.23"
- alpine_version: "edge"
alpine_registry_branch: "edge"
container: container:
image: "alpine:${{ matrix.alpine_version }}" image: "alpine:${{ matrix.alpine_version }}"
env: env:

View File

@@ -1,13 +1,12 @@
# Alpine Packages # Alpine Packages
Alpine stable and edge packaging for internal packages. Alpine stable packaging for internal packages.
This repository builds signed `x86_64` and `aarch64` APKs and publishes them to This repository builds signed `x86_64` and `aarch64` APKs and publishes them to
the Gitea Alpine package registry under stable and edge branches: the Gitea Alpine package registry:
```text ```text
https://code.factoring.digital/api/packages/public/alpine/v3.23/alpine-packages https://code.factoring.digital/api/packages/public/alpine/v3.23/alpine-packages
https://code.factoring.digital/api/packages/public/alpine/edge/alpine-packages
``` ```
## Available Packages ## Available Packages
@@ -36,16 +35,6 @@ printf '%s\n' \
apk update apk update
``` ```
Use the edge branch on Alpine edge nodes:
```sh
printf '%s\n' \
'https://code.factoring.digital/api/packages/public/alpine/edge/alpine-packages' \
>> /etc/apk/repositories
apk update
```
If a forked or future registry is private, include a Gitea user and package token in the If a forked or future registry is private, include a Gitea user and package token in the
repository URL: repository URL:
@@ -208,9 +197,9 @@ Run `apk:checksum` after changing any file listed in `source=`.
### Gitea Workflow ### Gitea Workflow
The workflow at `.gitea/workflows/build.yml` builds a matrix for `alpine:3.23` The workflow at `.gitea/workflows/build.yml` builds against `alpine:3.23` and
and `alpine:edge`, publishing to registry branches `v3.23` and `edge` on push publishes to registry branch `v3.23` on push or tag. It skips publishing for
or tag. It skips publishing for pull request events. pull request events.
Repository variables: Repository variables:

View File

@@ -1,7 +1,7 @@
# Maintainer: Joachim Schlöffel <me@joachim-schloeffel.com> # Maintainer: Joachim Schlöffel <me@joachim-schloeffel.com>
pkgname=greptimedb pkgname=greptimedb
pkgver=1.0.2 pkgver=1.0.2
pkgrel=1 pkgrel=2
pkgdesc="Cloud-native observability database for metrics, logs, and traces" pkgdesc="Cloud-native observability database for metrics, logs, and traces"
url="https://github.com/GreptimeTeam/greptimedb" url="https://github.com/GreptimeTeam/greptimedb"
arch="x86_64" arch="x86_64"
@@ -31,6 +31,7 @@ makedepends="
install="$pkgname.pre-install" install="$pkgname.pre-install"
subpackages=" subpackages="
$pkgname-datanode-openrc:_openrc_datanode:noarch $pkgname-datanode-openrc:_openrc_datanode:noarch
$pkgname-docs:_docs:noarch
$pkgname-flownode-openrc:_openrc_flownode:noarch $pkgname-flownode-openrc:_openrc_flownode:noarch
$pkgname-frontend-openrc:_openrc_frontend:noarch $pkgname-frontend-openrc:_openrc_frontend:noarch
$pkgname-metasrv-openrc:_openrc_metasrv:noarch $pkgname-metasrv-openrc:_openrc_metasrv:noarch
@@ -111,6 +112,14 @@ _openrc_frontend() { _openrc_service frontend; }
_openrc_metasrv() { _openrc_service metasrv; } _openrc_metasrv() { _openrc_service metasrv; }
_openrc_standalone() { _openrc_service standalone; } _openrc_standalone() { _openrc_service standalone; }
_docs() {
pkgdesc="$pkgdesc (configuration examples and reference)"
depends=""
mkdir -p "$subpkgdir"/usr/share/doc/$pkgname
cp -a "$builddir"/config "$subpkgdir"/usr/share/doc/$pkgname/
}
sha512sums=" sha512sums="
7f4ac722b84a26816030e65d504b37a53edfca15de669a4f6ee7a903f1a29c8358dcc2376a0a6cfd9ded13b0c5d7550a6856b9b10dc8cd080c6b12970553a0ea greptimedb-1.0.2.tar.gz 7f4ac722b84a26816030e65d504b37a53edfca15de669a4f6ee7a903f1a29c8358dcc2376a0a6cfd9ded13b0c5d7550a6856b9b10dc8cd080c6b12970553a0ea greptimedb-1.0.2.tar.gz
29cc3376753487b216748e3f85e12639830e1ac4a763e94f330f87c3651a8ef9de35732958311c0049e1b7cbb4e90a9e602b3aff43297fe088c5ce795a110a79 datanode.toml 29cc3376753487b216748e3f85e12639830e1ac4a763e94f330f87c3651a8ef9de35732958311c0049e1b7cbb4e90a9e602b3aff43297fe088c5ce795a110a79 datanode.toml

View File

@@ -8,6 +8,74 @@ The APKBUILD builds the release directly:
cargo build --profile nightly --locked --bin greptime --features servers/dashboard 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 ## Package Commands
Refresh the source checksum after changing `pkgver`: Refresh the source checksum after changing `pkgver`:
@@ -38,11 +106,5 @@ ALPINE_REPOSITORY_KEY_URL=https://code.factoring.digital/api/packages/public/alp
mise run apk:test-install mise run apk:test-install
``` ```
Use the `edge` branch on Alpine edge nodes:
```sh
ALPINE_REPOSITORY_URL=https://code.factoring.digital/api/packages/public/alpine/edge/alpine-packages
```
The full build can take close to an hour. Do not run it as part of lightweight The full build can take close to an hour. Do not run it as part of lightweight
metadata or script checks. metadata or script checks.

View File

@@ -56,6 +56,7 @@ docker run --rm --platform "${platform}" \
apk add \ apk add \
"${PACKAGE_NAME}" \ "${PACKAGE_NAME}" \
"${PACKAGE_NAME}-datanode-openrc" \ "${PACKAGE_NAME}-datanode-openrc" \
"${PACKAGE_NAME}-docs" \
"${PACKAGE_NAME}-flownode-openrc" \ "${PACKAGE_NAME}-flownode-openrc" \
"${PACKAGE_NAME}-frontend-openrc" \ "${PACKAGE_NAME}-frontend-openrc" \
"${PACKAGE_NAME}-metasrv-openrc" \ "${PACKAGE_NAME}-metasrv-openrc" \
@@ -64,5 +65,7 @@ docker run --rm --platform "${platform}" \
test -x /usr/bin/greptime test -x /usr/bin/greptime
greptime --version greptime --version
ls -1 /etc/greptimedb ls -1 /etc/greptimedb
test -f "/usr/share/doc/${PACKAGE_NAME}/config/config.md"
test -f "/usr/share/doc/${PACKAGE_NAME}/config/standalone.example.toml"
find /etc/init.d -maxdepth 1 -name "greptimedb.*" -print | sort find /etc/init.d -maxdepth 1 -name "greptimedb.*" -print | sort
' '