From 480a02062b9f66956dea4e0e527d87361484bec6 Mon Sep 17 00:00:00 2001 From: "austin.barrington" Date: Wed, 1 Jul 2026 10:00:44 +0100 Subject: [PATCH 1/2] update examples to use the correct image --- deploy/examples/single-node.yaml | 4 ++-- deploy/examples/three-node.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/examples/single-node.yaml b/deploy/examples/single-node.yaml index 2f7031e..5692556 100644 --- a/deploy/examples/single-node.yaml +++ b/deploy/examples/single-node.yaml @@ -5,8 +5,8 @@ metadata: namespace: default spec: replicas: 1 - image: hyperbytedb:latest - version: "0.8.3" + image: ghcr.io/hyperbyte-cloud/hyperbytedb + version: "0.8.3-beta" server: port: 8086 storage: diff --git a/deploy/examples/three-node.yaml b/deploy/examples/three-node.yaml index 50411c8..265b5d6 100644 --- a/deploy/examples/three-node.yaml +++ b/deploy/examples/three-node.yaml @@ -5,8 +5,8 @@ metadata: namespace: default spec: replicas: 3 - image: hyperbytedb:latest - version: "0.8.3" + image: ghcr.io/hyperbyte-cloud/hyperbytedb + version: "0.8.3-beta" server: port: 8086 requestTimeoutSecs: 30 From b3ba6a1d189ba09ca9a5b5bf31a955534832e6b9 Mon Sep 17 00:00:00 2001 From: "austin.barrington" Date: Wed, 1 Jul 2026 10:33:56 +0100 Subject: [PATCH 2/2] ci: publish proxy image to GHCR and include proxy/cli in release assets - Compile hyperbytedb-proxy alongside server and cli in build jobs - Create Dockerfile.proxy-runtime for prebuilt multi-arch proxy images - Publish ghcr.io/hyperbyte-cloud/hyperbytedb-proxy on every release - Add standalone hyperbytedb-cli and hyperbytedb-proxy binaries to release - Include hyperbytedb-proxy in release tarballs - Remove "v" prefix from docker-upload.sh image tag --- .github/workflows/release.yml | 132 +++++++++++++++++++++++++++++++--- Dockerfile.proxy-runtime | 26 +++++++ scripts/docker-upload.sh | 2 +- 3 files changed, 148 insertions(+), 12 deletions(-) create mode 100644 Dockerfile.proxy-runtime diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94a5b0a..604c6bc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,9 +5,11 @@ name: Release # 1. build-amd64 / build-arm64 (parallel) — compile on native GitHub-hosted runners # (ubuntu-latest + ubuntu-24.04-arm). Each job uploads its per-arch staging # tree as a workflow artifact. arm64 is not emulated under QEMU. -# 2. publish — assemble the multi-arch Docker image from those prebuilt binaries -# (Dockerfile.runtime does no compilation), push to GHCR, package tarballs, -# and create the GitHub Release. +# 2. publish-image / publish-proxy-image (parallel after build) — assemble the +# multi-arch Docker images from those prebuilt binaries (Dockerfile.runtime +# and Dockerfile.proxy-runtime do no compilation), push both to GHCR. +# 3. publish-release — package tarballs, standalone CLI binaries, and create the +# GitHub Release. # # Compilation caches use GitHub Actions cache (sccache + Swatinem/rust-cache) instead # of the self-hosted runner hostPath used by CI. @@ -36,6 +38,7 @@ env: CHDB_RUST_REF: feat_arrow_insert REGISTRY: ghcr.io IMAGE_NAME: hyperbyte-cloud/hyperbytedb + PROXY_IMAGE_NAME: hyperbyte-cloud/hyperbytedb-proxy jobs: build-amd64: @@ -65,10 +68,10 @@ jobs: bash .github/scripts/run-in-rust-container.sh \ 'bash .github/scripts/rust-container-setup.sh && \ sccache --zero-stats && \ - cargo build --release --locked -p hyperbytedb --bin hyperbytedb -p hyperbytedb-cli --bin hyperbytedb-cli && \ + cargo build --release --locked -p hyperbytedb --bin hyperbytedb -p hyperbytedb-cli --bin hyperbytedb-cli -p hyperbytedb-proxy --bin hyperbytedb-proxy && \ sccache --show-stats && \ mkdir -p release-staging/amd64 && \ - cp target/release/hyperbytedb target/release/hyperbytedb-cli /usr/local/lib/libchdb.so release-staging/amd64/' + cp target/release/hyperbytedb target/release/hyperbytedb-cli target/release/hyperbytedb-proxy /usr/local/lib/libchdb.so release-staging/amd64/' - name: Upload amd64 staging artifact uses: actions/upload-artifact@v4 @@ -104,10 +107,10 @@ jobs: bash .github/scripts/run-in-rust-container.sh \ 'bash .github/scripts/rust-container-setup.sh && \ sccache --zero-stats && \ - cargo build --release --locked -p hyperbytedb --bin hyperbytedb -p hyperbytedb-cli --bin hyperbytedb-cli && \ + cargo build --release --locked -p hyperbytedb --bin hyperbytedb -p hyperbytedb-cli --bin hyperbytedb-cli -p hyperbytedb-proxy --bin hyperbytedb-proxy && \ sccache --show-stats && \ mkdir -p release-staging/arm64 && \ - cp target/release/hyperbytedb target/release/hyperbytedb-cli /usr/local/lib/libchdb.so release-staging/arm64/' + cp target/release/hyperbytedb target/release/hyperbytedb-cli target/release/hyperbytedb-proxy /usr/local/lib/libchdb.so release-staging/arm64/' - name: Upload arm64 staging artifact uses: actions/upload-artifact@v4 @@ -141,6 +144,7 @@ jobs: chmod +x "release-staging/${arch}/hyperbytedb" "release-staging/${arch}/hyperbytedb-cli" test -f "release-staging/${arch}/hyperbytedb" test -f "release-staging/${arch}/hyperbytedb-cli" + test -f "release-staging/${arch}/hyperbytedb-proxy" test -s "release-staging/${arch}/libchdb.so" done ls -lh release-staging/*/* @@ -193,10 +197,85 @@ jobs: cache-from: type=gha cache-to: type=gha,mode=max + publish-proxy-image: + name: Publish proxy container image + runs-on: ubuntu-latest + needs: [build-amd64, build-arm64] + steps: + - uses: actions/checkout@v4 + + - name: Download prebuilt binaries + uses: actions/download-artifact@v4 + with: + name: release-staging-amd64 + path: release-staging/amd64 + + - uses: actions/download-artifact@v4 + with: + name: release-staging-arm64 + path: release-staging/arm64 + + - name: Verify proxy binary + run: | + set -euo pipefail + for arch in amd64 arm64; do + chmod +x "release-staging/${arch}/hyperbytedb-proxy" + test -f "release-staging/${arch}/hyperbytedb-proxy" + done + ls -lh release-staging/*/hyperbytedb-proxy + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm64 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry (PAT) + if: vars.GHCR_AUTH == 'pat' + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ secrets.GHCR_USERNAME }} + password: ${{ secrets.GHCR_PAT }} + + - name: Log in to GitHub Container Registry (GITHUB_TOKEN) + if: vars.GHCR_AUTH != 'pat' + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.PROXY_IMAGE_NAME }} + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=sha,prefix= + type=raw,value=latest,enable=${{ github.ref_type == 'tag' }} + + - name: Build and push multi-arch proxy image + uses: docker/build-push-action@v6 + with: + context: release-staging + file: Dockerfile.proxy-runtime + platforms: linux/amd64,linux/arm64 + push: true + provenance: false + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max + publish-release: name: Publish GitHub Release runs-on: ubuntu-latest - needs: [build-amd64, build-arm64, publish-image] + needs: [build-amd64, build-arm64, publish-image, publish-proxy-image] if: github.ref_type == 'tag' steps: - name: Download prebuilt binaries @@ -216,17 +295,32 @@ jobs: run: | set -euo pipefail for arch in amd64 arm64; do - chmod +x "release-staging/${arch}/hyperbytedb" "release-staging/${arch}/hyperbytedb-cli" + chmod +x "release-staging/${arch}/hyperbytedb" \ + "release-staging/${arch}/hyperbytedb-cli" \ + "release-staging/${arch}/hyperbytedb-proxy" done mkdir -p out declare -A ARCHES=( [amd64]=x86_64 [arm64]=aarch64 ) for src in "${!ARCHES[@]}"; do dst="${ARCHES[$src]}" + NAME="hyperbytedb-${TAG}-linux-${dst}" tar -C "release-staging/${src}" -czf "out/${NAME}.tar.gz" \ - hyperbytedb hyperbytedb-cli libchdb.so + hyperbytedb hyperbytedb-cli hyperbytedb-proxy libchdb.so ( cd out && sha256sum "${NAME}.tar.gz" > "${NAME}.tar.gz.sha256" ) ls -lh "out/${NAME}.tar.gz" "out/${NAME}.tar.gz.sha256" + + CLI_NAME="hyperbytedb-cli-${TAG}-linux-${dst}" + cp "release-staging/${src}/hyperbytedb-cli" "out/${CLI_NAME}" + gzip -f "out/${CLI_NAME}" + ( cd out && sha256sum "${CLI_NAME}.gz" > "${CLI_NAME}.gz.sha256" ) + ls -lh "out/${CLI_NAME}.gz" "out/${CLI_NAME}.gz.sha256" + + PROXY_NAME="hyperbytedb-proxy-${TAG}-linux-${dst}" + cp "release-staging/${src}/hyperbytedb-proxy" "out/${PROXY_NAME}" + gzip -f "out/${PROXY_NAME}" + ( cd out && sha256sum "${PROXY_NAME}.gz" > "${PROXY_NAME}.gz.sha256" ) + ls -lh "out/${PROXY_NAME}.gz" "out/${PROXY_NAME}.gz.sha256" done - name: Verify release artifacts @@ -239,9 +333,17 @@ jobs: test -s "${tarball}" test -s "out/hyperbytedb-${TAG}-linux-${arch}.tar.gz.sha256" listing="$(tar -tzf "${tarball}")" - for entry in hyperbytedb hyperbytedb-cli libchdb.so; do + for entry in hyperbytedb hyperbytedb-cli hyperbytedb-proxy libchdb.so; do grep -qx "${entry}" <<<"${listing}" done + + cli="out/hyperbytedb-cli-${TAG}-linux-${arch}.gz" + test -s "${cli}" + test -s "${cli}.sha256" + + proxy="out/hyperbytedb-proxy-${TAG}-linux-${arch}.gz" + test -s "${proxy}" + test -s "${proxy}.sha256" done ls -lh out/ @@ -257,3 +359,11 @@ jobs: out/hyperbytedb-${{ github.ref_name }}-linux-x86_64.tar.gz.sha256 out/hyperbytedb-${{ github.ref_name }}-linux-aarch64.tar.gz out/hyperbytedb-${{ github.ref_name }}-linux-aarch64.tar.gz.sha256 + out/hyperbytedb-cli-${{ github.ref_name }}-linux-x86_64.gz + out/hyperbytedb-cli-${{ github.ref_name }}-linux-x86_64.gz.sha256 + out/hyperbytedb-cli-${{ github.ref_name }}-linux-aarch64.gz + out/hyperbytedb-cli-${{ github.ref_name }}-linux-aarch64.gz.sha256 + out/hyperbytedb-proxy-${{ github.ref_name }}-linux-x86_64.gz + out/hyperbytedb-proxy-${{ github.ref_name }}-linux-x86_64.gz.sha256 + out/hyperbytedb-proxy-${{ github.ref_name }}-linux-aarch64.gz + out/hyperbytedb-proxy-${{ github.ref_name }}-linux-aarch64.gz.sha256 diff --git a/Dockerfile.proxy-runtime b/Dockerfile.proxy-runtime new file mode 100644 index 0000000..79c146f --- /dev/null +++ b/Dockerfile.proxy-runtime @@ -0,0 +1,26 @@ +# syntax=docker/dockerfile:1 +# +# Release runtime image for hyperbytedb-proxy assembled from PREBUILT binaries. +# The release workflow (.github/workflows/release.yml) compiles the proxy per +# architecture in parallel on GitHub-hosted runners, uploads staging artifacts, +# and points this Dockerfile at the merged tree as its build context: +# +# release-staging/ +# amd64/{hyperbytedb-proxy, ...} +# arm64/{hyperbytedb-proxy, ...} +FROM debian:bookworm-slim + +ARG TARGETARCH + +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + && rm -rf /var/lib/apt/lists/* + +COPY ${TARGETARCH}/hyperbytedb-proxy /usr/local/bin/hyperbytedb-proxy + +EXPOSE 8086 + +ENV HYPERBYTEDB_PROXY_LISTEN=0.0.0.0:8086 \ + HYPERBYTEDB_PROXY_BACKEND_PORT=8086 + +ENTRYPOINT ["/usr/local/bin/hyperbytedb-proxy"] diff --git a/scripts/docker-upload.sh b/scripts/docker-upload.sh index a3beaa0..bb0ac5c 100755 --- a/scripts/docker-upload.sh +++ b/scripts/docker-upload.sh @@ -52,7 +52,7 @@ if [ -z "$version" ]; then exit 1 fi -image="$registry/hyperbytedb:v$version" +image="$registry/hyperbytedb:$version" latest="$registry/hyperbytedb:latest" # Use a dedicated builder so we don't clobber the default `docker` driver