Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05188cc390 | ||
|
|
74207600cc |
@@ -13,27 +13,34 @@ on:
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- alpine_version: "3.23"
|
||||
alpine_registry_branch: "v3.23"
|
||||
- alpine_version: "edge"
|
||||
alpine_registry_branch: "edge"
|
||||
container:
|
||||
image: alpine:3.23
|
||||
image: "alpine:${{ matrix.alpine_version }}"
|
||||
env:
|
||||
ALPINE_VERSION: "3.23"
|
||||
ALPINE_VERSION: "${{ matrix.alpine_version }}"
|
||||
ALPINE_ARCHES: "x86_64 aarch64"
|
||||
ALPINE_REGISTRY_BRANCH: "v3.23"
|
||||
ALPINE_REGISTRY_BRANCH: "${{ matrix.alpine_registry_branch }}"
|
||||
ALPINE_REGISTRY_REPOSITORY: "${{ vars.PACKAGE_NAME }}"
|
||||
INSTANCE_URL: "${{ vars.INSTANCE_URL }}"
|
||||
PACKAGE_OWNER: "${{ vars.PACKAGE_OWNER }}"
|
||||
PACKAGE_USER: "${{ secrets.PACKAGE_USER }}"
|
||||
PACKAGE_TOKEN: "${{ secrets.PACKAGE_TOKEN }}"
|
||||
PACKAGER: "Joachim Schlöffel <me@joachim-schloeffel.com>"
|
||||
CARGO_HOME: "/cache/public-alpine-packages/greptimedb/cargo"
|
||||
RUSTUP_HOME: "/cache/public-alpine-packages/greptimedb/rustup"
|
||||
CARGO_TARGET_DIR: "/cache/public-alpine-packages/greptimedb/target"
|
||||
CARGO_HOME: "/cache/public-alpine-packages/${{ matrix.alpine_registry_branch }}/greptimedb/cargo"
|
||||
RUSTUP_HOME: "/cache/public-alpine-packages/${{ matrix.alpine_registry_branch }}/greptimedb/rustup"
|
||||
CARGO_TARGET_DIR: "/cache/public-alpine-packages/${{ matrix.alpine_registry_branch }}/greptimedb/target"
|
||||
steps:
|
||||
- name: Prepare Environment
|
||||
run: |
|
||||
apk add --no-cache --update abuild-rootbld alpine-sdk atools-apkbuild-lint bash ca-certificates curl doas git nodejs sudo tar
|
||||
mkdir -p "$CARGO_HOME" "$RUSTUP_HOME" "$CARGO_TARGET_DIR"
|
||||
chown 1000:1000 /cache /cache/public-alpine-packages /cache/public-alpine-packages/greptimedb "$CARGO_HOME" "$RUSTUP_HOME" "$CARGO_TARGET_DIR"
|
||||
chown 1000:1000 /cache /cache/public-alpine-packages /cache/public-alpine-packages/${{ matrix.alpine_registry_branch }} /cache/public-alpine-packages/${{ matrix.alpine_registry_branch }}/greptimedb "$CARGO_HOME" "$RUSTUP_HOME" "$CARGO_TARGET_DIR"
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
@@ -49,7 +56,7 @@ jobs:
|
||||
- name: Upload generated CI assets
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: greptimedb-musl-binaries
|
||||
name: greptimedb-musl-binaries-${{ matrix.alpine_registry_branch }}
|
||||
path: packages/ci-assets/
|
||||
|
||||
- name: Smoke test
|
||||
|
||||
@@ -1,14 +1,20 @@
|
||||
# Alpine Packages
|
||||
|
||||
Alpine 3.23 packaging for internal packages.
|
||||
Alpine stable and edge packaging for internal packages.
|
||||
|
||||
This repository builds signed `x86_64` and `aarch64` APKs and publishes them to
|
||||
the Gitea Alpine package registry under:
|
||||
the Gitea Alpine package registry under stable and edge branches:
|
||||
|
||||
```text
|
||||
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
|
||||
|
||||
- [SeaweedFS](packaging/alpine/local/seaweedfs/README.md): `seaweedfs` plus OpenRC role, docs, and completion subpackages.
|
||||
- [GreptimeDB](packaging/alpine/local/greptimedb/README.md): `greptimedb` plus OpenRC service subpackages and default configs.
|
||||
|
||||
## Use In Production
|
||||
|
||||
### Add The Package Repository
|
||||
@@ -20,7 +26,7 @@ curl -fsSLo /etc/apk/keys/public-alpine.rsa.pub \
|
||||
https://code.factoring.digital/api/packages/public/alpine/key
|
||||
```
|
||||
|
||||
Add the package repository:
|
||||
Add the stable package repository:
|
||||
|
||||
```sh
|
||||
printf '%s\n' \
|
||||
@@ -30,6 +36,16 @@ printf '%s\n' \
|
||||
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
|
||||
repository URL:
|
||||
|
||||
@@ -37,133 +53,12 @@ repository URL:
|
||||
https://<user>:<token>@code.factoring.digital/api/packages/public/alpine/v3.23/alpine-packages
|
||||
```
|
||||
|
||||
### Install SeaweedFS Node Roles
|
||||
### Install Packages
|
||||
|
||||
Install the base package plus only the OpenRC role packages needed on that node.
|
||||
Package-specific install and service guidance lives next to each `APKBUILD`:
|
||||
|
||||
For a single-node test or a compact small deployment:
|
||||
|
||||
```sh
|
||||
apk add seaweedfs \
|
||||
seaweedfs-master-openrc \
|
||||
seaweedfs-volume-openrc \
|
||||
seaweedfs-filer-openrc
|
||||
```
|
||||
|
||||
For separated production nodes, install only the role running there:
|
||||
|
||||
```sh
|
||||
apk add seaweedfs seaweedfs-master-openrc
|
||||
apk add seaweedfs seaweedfs-volume-openrc
|
||||
apk add seaweedfs seaweedfs-filer-openrc
|
||||
```
|
||||
|
||||
Available OpenRC role packages:
|
||||
|
||||
```text
|
||||
seaweedfs-master-openrc -> /etc/init.d/seaweedfs.master
|
||||
seaweedfs-volume-openrc -> /etc/init.d/seaweedfs.volume
|
||||
seaweedfs-filer-openrc -> /etc/init.d/seaweedfs.filer
|
||||
seaweedfs-s3-openrc -> /etc/init.d/seaweedfs.s3
|
||||
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
|
||||
```
|
||||
|
||||
The package name is `seaweedfs`, matching Alpine aports. If a node already has
|
||||
Alpine's old generic OpenRC package installed, remove it before installing a
|
||||
role-specific split:
|
||||
|
||||
```sh
|
||||
apk del seaweedfs-openrc
|
||||
apk add seaweedfs seaweedfs-master-openrc
|
||||
```
|
||||
|
||||
### Configure Services
|
||||
|
||||
Runtime files are installed in the usual Alpine locations:
|
||||
|
||||
```text
|
||||
/usr/bin/weed
|
||||
/etc/seaweedfs/*.toml
|
||||
/etc/conf.d/seaweedfs.*
|
||||
/etc/init.d/seaweedfs.*
|
||||
```
|
||||
|
||||
Edit `/etc/conf.d/seaweedfs.<role>` for command-line flags and
|
||||
`/etc/seaweedfs/*.toml` for SeaweedFS config. The packaged defaults are short
|
||||
and production-neutral; full upstream example configs are in:
|
||||
|
||||
```text
|
||||
/usr/share/doc/seaweedfs/examples/
|
||||
```
|
||||
|
||||
Enable and start only the services needed on the node:
|
||||
|
||||
```sh
|
||||
rc-update add seaweedfs.master default
|
||||
rc-service seaweedfs.master start
|
||||
|
||||
rc-update add seaweedfs.volume default
|
||||
rc-service seaweedfs.volume start
|
||||
|
||||
rc-update add seaweedfs.filer default
|
||||
rc-service seaweedfs.filer start
|
||||
```
|
||||
|
||||
Check the installed binary and service state:
|
||||
|
||||
```sh
|
||||
weed version
|
||||
rc-service seaweedfs.master status
|
||||
```
|
||||
|
||||
### Optional Packages
|
||||
|
||||
Install docs and generated examples:
|
||||
|
||||
```sh
|
||||
apk add seaweedfs-doc
|
||||
```
|
||||
|
||||
Install bash completion:
|
||||
|
||||
```sh
|
||||
apk add bash-completion seaweedfs-bash-completion
|
||||
```
|
||||
|
||||
`seaweedfs-bash-completion` is also selected automatically when `seaweedfs` and
|
||||
`bash-completion` are installed together.
|
||||
|
||||
### Upgrade Or Pin
|
||||
|
||||
Use normal Alpine package operations:
|
||||
|
||||
```sh
|
||||
apk upgrade seaweedfs
|
||||
rc-service seaweedfs.master restart
|
||||
```
|
||||
|
||||
Pin a specific package build when needed:
|
||||
|
||||
```sh
|
||||
apk add seaweedfs=4.31-r3
|
||||
```
|
||||
|
||||
### Install GreptimeDB
|
||||
|
||||
Install GreptimeDB:
|
||||
|
||||
```sh
|
||||
apk add greptimedb
|
||||
```
|
||||
|
||||
Check the installed binary:
|
||||
|
||||
```sh
|
||||
greptime --version
|
||||
```
|
||||
- [SeaweedFS](packaging/alpine/local/seaweedfs/README.md)
|
||||
- [GreptimeDB](packaging/alpine/local/greptimedb/README.md)
|
||||
|
||||
## Background And Contribution
|
||||
|
||||
@@ -182,16 +77,7 @@ seaweedfs SeaweedFS 4.31 release binary and OpenRC role splits
|
||||
greptimedb GreptimeDB 1.0.2 built from source for x86_64
|
||||
```
|
||||
|
||||
### SeaweedFS Package
|
||||
|
||||
The APKBUILD repackages the official SeaweedFS Linux release tarballs. It does
|
||||
not build SeaweedFS from source. The package installs:
|
||||
|
||||
- `weed` as `/usr/bin/weed`
|
||||
- minimal active config under `/etc/seaweedfs/`
|
||||
- role-specific OpenRC subpackages
|
||||
- upstream example configs under `/usr/share/doc/seaweedfs/examples/`
|
||||
- generated bash completion as a separate subpackage
|
||||
Package-specific details are in the linked package READMEs above.
|
||||
|
||||
Local build output is written under:
|
||||
|
||||
@@ -322,9 +208,9 @@ Run `apk:checksum` after changing any file listed in `source=`.
|
||||
|
||||
### Gitea Workflow
|
||||
|
||||
The workflow at `.gitea/workflows/build.yml` builds in an `alpine:3.23`
|
||||
container and publishes on push or tag. It skips publishing for pull request
|
||||
events.
|
||||
The workflow at `.gitea/workflows/build.yml` builds a matrix for `alpine:3.23`
|
||||
and `alpine:edge`, publishing to registry branches `v3.23` and `edge` on push
|
||||
or tag. It skips publishing for pull request events.
|
||||
|
||||
Repository variables:
|
||||
|
||||
|
||||
@@ -38,5 +38,11 @@ ALPINE_REPOSITORY_KEY_URL=https://code.factoring.digital/api/packages/public/alp
|
||||
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
|
||||
metadata or script checks.
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
# SeaweedFS Alpine Package
|
||||
|
||||
This package repackages the official SeaweedFS 4.31 Linux release tarballs for `x86_64` and `aarch64`. It installs the `weed` binary, short active config defaults, generated examples, bash completion, and split OpenRC service packages.
|
||||
|
||||
## Package Commands
|
||||
|
||||
Refresh generated config examples and bash completion after changing the SeaweedFS version or generated source flow:
|
||||
|
||||
```sh
|
||||
ALPINE_PACKAGE=seaweedfs mise run apk:update-generated
|
||||
ALPINE_PACKAGE=seaweedfs mise run apk:checksum
|
||||
```
|
||||
|
||||
Build only this package:
|
||||
|
||||
```sh
|
||||
ALPINE_PACKAGE=seaweedfs mise run apk:build
|
||||
```
|
||||
|
||||
Install-test an existing local build without rebuilding:
|
||||
|
||||
```sh
|
||||
ALPINE_PACKAGE=seaweedfs SKIP_BUILD=1 mise run apk:test-install
|
||||
```
|
||||
|
||||
## Install Node Roles
|
||||
|
||||
Install the base package plus only the OpenRC role packages needed on that node.
|
||||
|
||||
For a single-node test or a compact small deployment:
|
||||
|
||||
```sh
|
||||
apk add seaweedfs \
|
||||
seaweedfs-master-openrc \
|
||||
seaweedfs-volume-openrc \
|
||||
seaweedfs-filer-openrc
|
||||
```
|
||||
|
||||
For separated production nodes, install only the role running there:
|
||||
|
||||
```sh
|
||||
apk add seaweedfs seaweedfs-master-openrc
|
||||
apk add seaweedfs seaweedfs-volume-openrc
|
||||
apk add seaweedfs seaweedfs-filer-openrc
|
||||
```
|
||||
|
||||
Available OpenRC role packages:
|
||||
|
||||
```text
|
||||
seaweedfs-master-openrc -> /etc/init.d/seaweedfs.master
|
||||
seaweedfs-volume-openrc -> /etc/init.d/seaweedfs.volume
|
||||
seaweedfs-filer-openrc -> /etc/init.d/seaweedfs.filer
|
||||
seaweedfs-s3-openrc -> /etc/init.d/seaweedfs.s3
|
||||
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
|
||||
```
|
||||
|
||||
The package name is `seaweedfs`, matching Alpine aports. If a node already has Alpine's old generic OpenRC package installed, remove it before installing a role-specific split:
|
||||
|
||||
```sh
|
||||
apk del seaweedfs-openrc
|
||||
apk add seaweedfs seaweedfs-master-openrc
|
||||
```
|
||||
|
||||
## Configure Services
|
||||
|
||||
Runtime files are installed in the usual Alpine locations:
|
||||
|
||||
```text
|
||||
/usr/bin/weed
|
||||
/etc/seaweedfs/*.toml
|
||||
/etc/conf.d/seaweedfs.*
|
||||
/etc/init.d/seaweedfs.*
|
||||
```
|
||||
|
||||
Edit `/etc/conf.d/seaweedfs.<role>` for command-line flags and `/etc/seaweedfs/*.toml` for SeaweedFS config. The packaged defaults are short and production-neutral; full upstream example configs are in:
|
||||
|
||||
```text
|
||||
/usr/share/doc/seaweedfs/examples/
|
||||
```
|
||||
|
||||
Enable and start only the services needed on the node:
|
||||
|
||||
```sh
|
||||
rc-update add seaweedfs.master default
|
||||
rc-service seaweedfs.master start
|
||||
|
||||
rc-update add seaweedfs.volume default
|
||||
rc-service seaweedfs.volume start
|
||||
|
||||
rc-update add seaweedfs.filer default
|
||||
rc-service seaweedfs.filer start
|
||||
```
|
||||
|
||||
Check the installed binary and service state:
|
||||
|
||||
```sh
|
||||
weed version
|
||||
rc-service seaweedfs.master status
|
||||
```
|
||||
|
||||
## Optional Packages
|
||||
|
||||
Install docs and generated examples:
|
||||
|
||||
```sh
|
||||
apk add seaweedfs-doc
|
||||
```
|
||||
|
||||
Install bash completion:
|
||||
|
||||
```sh
|
||||
apk add bash-completion seaweedfs-bash-completion
|
||||
```
|
||||
|
||||
`seaweedfs-bash-completion` is also selected automatically when `seaweedfs` and `bash-completion` are installed together.
|
||||
|
||||
## Upgrade Or Pin
|
||||
|
||||
Use normal Alpine package operations:
|
||||
|
||||
```sh
|
||||
apk upgrade seaweedfs
|
||||
rc-service seaweedfs.master restart
|
||||
```
|
||||
|
||||
Pin a specific package build when needed:
|
||||
|
||||
```sh
|
||||
apk add seaweedfs=4.31-r3
|
||||
```
|
||||
Reference in New Issue
Block a user