Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
51f5a9b
support seekdb-python package
hnwyllmm Dec 15, 2025
1ecebc4
Merge pull request #1 from hnwyllmm/seekdb-python
hnwyllmm Dec 15, 2025
13b1602
valid docker image name (#2)
hnwyllmm Dec 15, 2025
28bfcce
fix build errors
hnwyllmm Dec 15, 2025
fb8575e
remove rpm*
hnwyllmm Dec 16, 2025
730038a
fix tag name detect
hnwyllmm Dec 16, 2025
af5c020
install pybind11
hnwyllmm Dec 16, 2025
805cc44
fix name problem
hnwyllmm Dec 16, 2025
36b6173
fix build extensions
hnwyllmm Dec 16, 2025
8bc3030
free disk space
hnwyllmm Dec 16, 2025
ea910cc
fix str.parent
hnwyllmm Dec 17, 2025
b245e72
disk full space
hnwyllmm Dec 17, 2025
06532b2
fix artifact name and remove one reduntant library
hnwyllmm Dec 18, 2025
2daedca
mv so to pylibseekdb directory
hnwyllmm Dec 18, 2025
2fcf883
add pylibseekdb module path to sys.path
hnwyllmm Dec 19, 2025
42a07a4
support publish
hnwyllmm Dec 19, 2025
fdb625e
fix test and build other python version
hnwyllmm Dec 19, 2025
59b2fc9
fix cibuildwheel test
hnwyllmm Dec 19, 2025
a7c3c44
fix test command
hnwyllmm Dec 22, 2025
418c243
ccache stat and DEFAULT_LOG_LEVEL=WARN
hnwyllmm Dec 22, 2025
a87a468
only remove embedded directory
hnwyllmm Dec 22, 2025
722b1bc
Merge branch 'main' into main
hnwyllmm Dec 23, 2025
74e085f
fix issues from copilot
hnwyllmm Dec 23, 2025
fe3300a
Merge remote-tracking branch 'myself/main' into myself-main1
hnwyllmm Dec 23, 2025
07c1129
fix default_log_level
hnwyllmm Dec 24, 2025
2a6e4a2
fix default_log_level
hnwyllmm Dec 24, 2025
1bf9b7b
Update Python version requirement to CPython >= 3.11
hnwyllmm Jan 29, 2026
31676b3
support to set parameter with "=" in the value for obproxy-ce (#73)
chris-sun-star Dec 25, 2025
de234cf
Add helm chart for seekdb (#74)
chris-sun-star Dec 25, 2025
114c4f1
set default value of FORCE_START_WITH_ARGS (#75)
chris-sun-star Dec 26, 2025
a898528
fix #77, add environment variable for root password in the command (#78)
chris-sun-star Jan 19, 2026
60032e0
seekdb binary name change (#80)
chris-sun-star Jan 28, 2026
999c534
change config file name in README (#81)
chris-sun-star Jan 28, 2026
b9b1db3
update seedkb config bin name
Mar 26, 2026
d82bb3d
fix seekdb no datafile size option
Mar 30, 2026
1e88b55
Build daily seekdb-python artifacts
hnwyllmm Apr 1, 2026
74dc6d3
Update daily seekdb build to track master
hnwyllmm Apr 1, 2026
6a6343a
update seekdb-python image name (#3)
hnwyllmm May 20, 2026
ffc11f8
patch seekdb before build
hnwyllmm Jun 1, 2026
62cac52
patch before build seekdb
hnwyllmm Jun 1, 2026
513d234
Fix seekdb patch paths in cibuildwheel workflows.
hnwyllmm Jun 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/daily-seekdb-python-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: daily-seekdb-python-artifacts

on:
schedule:
# Run once per day (UTC). Version string will include hour.
- cron: "0 0 * * *"
workflow_dispatch: {}

jobs:
build-wheels:
runs-on: ubuntu-latest
env:
SEEKDB_GIT_TAG: master
steps:
- name: Extract package version (UTC)
run: |
# Example: 2026.04.01.dev00
echo "PACKAGE_VERSION=$(date -u +'%Y.%m.%d.dev%H')" >> "$GITHUB_ENV"

- name: Free Disk Space
uses: insightsengineering/disk-space-reclaimer@v1
with:
tools-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true

- name: Checkout repository
uses: actions/checkout@v5

- name: Build wheels (Python 3.11 only)
uses: pypa/cibuildwheel@v3.3.0
env:
CIBW_BEFORE_BUILD: >
pip install setuptools wheel build &&
bash -c 'set -euo pipefail;
PROJ="{project}";
PKG="$PROJ/seekdb-python";
SRC="$PKG/seekdb-source";
TAG="${SEEKDB_GIT_TAG:-master}";
if [ ! -d "$SRC/.git" ]; then
mkdir -p "$SRC";
git -C "$SRC" init;
git -C "$SRC" remote add origin https://github.com/oceanbase/seekdb.git;
git -C "$SRC" fetch --progress --depth=1 origin "$TAG";
git -C "$SRC" checkout FETCH_HEAD;
fi;
patch -p1 -N -d "$SRC" < "$PKG/build_python_embed.diff"'
CIBW_BUILD: "cp311-*"
CIBW_SKIP: "*-musllinux_* *-win_* *-macosx_*"
CIBW_ENVIRONMENT: "SEEKDB_GIT_TAG=${{ env.SEEKDB_GIT_TAG }} PACKAGE_VERSION=${{ env.PACKAGE_VERSION }} BUILD_TYPE=release REBUILD=1 SEEKDB_BUILD_LIBRARY=1"
CIBW_TEST_COMMAND: "python {project}/seekdb-python/seekdb_test.py"
CIBW_TEST_REQUIRES: ""
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
with:
package-dir: seekdb-python
output-dir: wheelhouse

- name: Upload wheels
uses: actions/upload-artifact@v6
with:
name: wheels-${{ env.PACKAGE_VERSION }}-${{ runner.arch }}
path: wheelhouse/*.whl
retention-days: 30
compression-level: 0
38 changes: 38 additions & 0 deletions .github/workflows/release-charts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release Charts

on:
push:
branches:
- main
- master
- "*-chart"
paths:
- "charts/**"

jobs:
release:
# specific permissions required for chart-releaser
permissions:
contents: write # to push chart release and create a release
pages: write # to push to gh-pages branch

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

- name: Install Helm
uses: azure/setup-helm@v3

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_SKIP_EXISTING: true
111 changes: 111 additions & 0 deletions .github/workflows/release-seekdb-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: release seekdb-python

on:
push:
tags:
- "seekdb-python-*-*"

env:
tagName: ${{ github.ref_name }}

jobs:
build-wheels:
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm]
runs-on: ${{ matrix.os }}
outputs:
seekdb_version: ${{ steps.extract_version.outputs.seekdb_version }}
package_version: ${{ steps.extract_version.outputs.package_version }}
steps:
- name: Extract version from tag
id: extract_version
run: |
# Extract versions from tag (e.g., 'seekdb-python-1.0.0-1.0.0.post1')
# Format: seekdb-python-{seekdb_version}-{pylibseekdb_version}
TAG_WITHOUT_PREFIX=$(echo "${{ env.tagName }}" | sed 's/seekdb-python-//')

# Split by last dash to separate seekdb version and pylibseekdb version
# seekdb_version is everything before the last dash (e.g., '1.0.0')
# package_version is everything after the last dash (e.g., '1.0.0.post1')
SEEKDB_VERSION=$(echo "${TAG_WITHOUT_PREFIX}" | sed 's/-[^-]*$//')
PACKAGE_VERSION=$(echo "${TAG_WITHOUT_PREFIX}" | sed 's/^.*-//')

echo "seekdb_version=${SEEKDB_VERSION}" >> $GITHUB_OUTPUT
echo "package_version=${PACKAGE_VERSION}" >> $GITHUB_OUTPUT
echo "Extracted seekdb version: ${SEEKDB_VERSION}"
echo "Extracted package version: ${PACKAGE_VERSION}"

- name: Free Disk Space
uses: insightsengineering/disk-space-reclaimer@v1
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tools-cache: false

# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true

- name: Checkout repository
uses: actions/checkout@v5

- name: Build wheels on ${{ matrix.os }}
uses: pypa/cibuildwheel@v3.3.0
env:
CIBW_BEFORE_BUILD: >
pip install setuptools wheel build &&
bash -c 'set -euo pipefail;
PROJ="{project}";
PKG="$PROJ/seekdb-python";
SRC="$PKG/seekdb-source";
TAG="${SEEKDB_GIT_TAG:-master}";
if [ ! -d "$SRC/.git" ]; then
mkdir -p "$SRC";
git -C "$SRC" init;
git -C "$SRC" remote add origin https://github.com/oceanbase/seekdb.git;
git -C "$SRC" fetch --progress --depth=1 origin "$TAG";
git -C "$SRC" checkout FETCH_HEAD;
fi;
patch -p1 -N -d "$SRC" < "$PKG/build_python_embed.diff"'
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"
CIBW_SKIP: "*-musllinux_* *-win_* *-macosx_*"
CIBW_ENVIRONMENT: "SEEKDB_GIT_TAG=${{ steps.extract_version.outputs.seekdb_version }} PACKAGE_VERSION=${{ steps.extract_version.outputs.package_version }} BUILD_TYPE=release REBUILD=1 SEEKDB_BUILD_LIBRARY=1"
CIBW_TEST_COMMAND: "python {project}/seekdb-python/seekdb_test.py"
CIBW_TEST_REQUIRES: ""
CIBW_MANYLINUX_IMAGE: manylinux_2_28
with:
package-dir: seekdb-python
output-dir: wheelhouse

- name: Upload wheels
uses: actions/upload-artifact@v6
with:
name: wheels-${{ steps.extract_version.outputs.package_version }}-${{ runner.arch }}
path: wheelhouse/*.whl
retention-days: 30
compression-level: 0

publish:
needs: build-wheels
runs-on: ubuntu-latest
permissions:
id-token: write # OIDC needs this
contents: read
steps:
- name: Download all wheels
uses: actions/download-artifact@v6
with:
path: wheelhouse
pattern: wheels-${{ needs.build-wheels.outputs.package_version }}-*
merge-multiple: true

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1.13
with:
packages-dir: wheelhouse
skip-existing: true
10 changes: 10 additions & 0 deletions charts/seekdb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v2
name: seekdb
description: A Helm chart for seekdb
type: application
version: 0.1.1
appVersion: "latest"
keywords:
- oceanbase
- seekdb
- database
30 changes: 30 additions & 0 deletions charts/seekdb/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
1. Get the application URL by running these commands:

{{- if .Values.service.obshell.enabled }}
Obshell Dashboard:
{{- if contains "NodePort" .Values.service.obshell.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "seekdb.fullname" . }}-obshell)
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.obshell.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "seekdb.fullname" . }}-obshell'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "seekdb.fullname" . }}-obshell --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.obshell.port }}
{{- else if contains "ClusterIP" .Values.service.obshell.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "seekdb.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:2886 to access the dashboard"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 2886:2886
{{- end }}
{{- end }}

2. Connect to the database:

export ROOT_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "seekdb.fullname" . }} -o jsonpath="{.data.password}" | base64 -d)

To connect from inside the cluster:
mysql -h {{ include "seekdb.fullname" . }}-sql.{{ .Release.Namespace }} -P {{ .Values.service.sql.port }} -u root -p$ROOT_PASSWORD

To connect from outside the cluster (using port-forward):
kubectl port-forward svc/{{ include "seekdb.fullname" . }}-sql 2881:2881 -n {{ .Release.Namespace }}
mysql -h 127.0.0.1 -P 2881 -u root -p$ROOT_PASSWORD
62 changes: 62 additions & 0 deletions charts/seekdb/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "seekdb.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "seekdb.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "seekdb.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "seekdb.labels" -}}
helm.sh/chart: {{ include "seekdb.chart" . }}
{{ include "seekdb.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "seekdb.selectorLabels" -}}
app.kubernetes.io/name: {{ include "seekdb.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "seekdb.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "seekdb.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
20 changes: 20 additions & 0 deletions charts/seekdb/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{- $rootPassword := "" -}}
{{- if .Values.seekdb.rootPassword -}}
{{- $rootPassword = .Values.seekdb.rootPassword | b64enc -}}
{{- else -}}
{{- $secretObj := (lookup "v1" "Secret" .Release.Namespace (include "seekdb.fullname" .) ) -}}
{{- if $secretObj -}}
{{- $rootPassword = index $secretObj.data "password" -}}
{{- else -}}
{{- $rootPassword = randAlphaNum 16 | b64enc -}}
{{- end -}}
{{- end -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "seekdb.fullname" . }}
labels:
{{- include "seekdb.labels" . | nindent 4 }}
type: Opaque
data:
password: {{ $rootPassword | quote }}
24 changes: 24 additions & 0 deletions charts/seekdb/templates/service-obshell.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{- if .Values.service.obshell.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "seekdb.fullname" . }}-obshell
labels:
{{- include "seekdb.labels" . | nindent 4 }}
{{- with .Values.service.obshell.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.obshell.type }}
ports:
- port: {{ .Values.service.obshell.port }}
targetPort: 2886
protocol: TCP
name: obshell
{{- if and (or (eq .Values.service.obshell.type "NodePort") (eq .Values.service.obshell.type "LoadBalancer")) .Values.service.obshell.nodePort }}
nodePort: {{ .Values.service.obshell.nodePort }}
{{- end }}
selector:
{{- include "seekdb.selectorLabels" . | nindent 4 }}
{{- end }}
24 changes: 24 additions & 0 deletions charts/seekdb/templates/service-sql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{- if .Values.service.sql.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "seekdb.fullname" . }}-sql
labels:
{{- include "seekdb.labels" . | nindent 4 }}
{{- with .Values.service.sql.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.sql.type }}
ports:
- port: {{ .Values.service.sql.port }}
targetPort: 2881
protocol: TCP
name: sql
{{- if and (or (eq .Values.service.sql.type "NodePort") (eq .Values.service.sql.type "LoadBalancer")) .Values.service.sql.nodePort }}
nodePort: {{ .Values.service.sql.nodePort }}
{{- end }}
selector:
{{- include "seekdb.selectorLabels" . | nindent 4 }}
{{- end }}
Loading
Loading