Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2855113
[Build] Add K8S lease support, enhance Docker builds, fix Asio includes
May 29, 2026
8dce1d6
[Operator] Add vLLM PD-disaggregated support, fix eviction config def…
May 29, 2026
066c266
[Operator][UI] Fix RBAC: add update/patch verbs for mooncakeclusters …
May 29, 2026
fc8cc68
[Docker] Switch default Dockerfile from CUDA to Ubuntu (no-CUDA) base
May 29, 2026
9adeccc
[UI] Convert all Chinese text to English; add dedicated migration page
May 30, 2026
5f63209
[Store][Operator][UI] Drain speed display, bandwidth throttle fix, se…
Jun 4, 2026
2fd95da
Add *.stripped to gitignore for build artifacts
Jun 4, 2026
8d791d3
Merge branch 'origin/main' into main
Jun 4, 2026
08aa794
[UI] Fix "Unexpected end of JSON input" error on cluster property edit
Jun 4, 2026
6314735
[Operator][UI] Implement operator HA with Dashboard display and repli…
Jun 4, 2026
3c9c855
[Store][Operator][UI] Fix RPC serialization, drain remount race, and …
Jun 5, 2026
18dc2ea
[Operator] Fix stale auto-drain job accumulation in CRD status
Jun 5, 2026
b40d5cc
[Operator][UI] Fix pod stuck Terminating after drain, add Create Clus…
Jun 10, 2026
e155148
[Store][Operator] Fix dual-leader, active_clients reset, sequential d…
Jun 11, 2026
9d1f9cb
build: speed up store deploy pipeline from ~3min to ~1min
Jun 15, 2026
6316ee8
[TransferEngine][Operator][UI] Add RDMA-to-TCP automatic failover wit…
Jun 15, 2026
25ea47f
[Operator][UI] Fix RDMA UI test protocol and Soft-RoCE status display
Jun 16, 2026
3be468f
feat: expose transport health status via HTTP endpoint and WebUI
Jun 22, 2026
d21aa11
feat: integrate benchmark stress test into UI with accelerated status…
Jun 22, 2026
64e05f2
fix: prevent data loss on drain failure by tightening force-delete an…
Jun 22, 2026
81035ba
fix: avoid orphaned DRAINING segments on scale-down by removing orche…
Jun 23, 2026
8023d29
feat: drain replica preservation, worker clear-data, UI enhancements
Jun 23, 2026
591c6cf
fix: ensure RELIABLE_MULTI_REPLICA gets exact replica count; prevent …
Jun 24, 2026
c2bf6b6
fix: drain failure recovery — force-delete pod on max retries, GRACEF…
Jun 24, 2026
b94f162
chore: remove init_sys_lxs.py
Jul 9, 2026
69523bc
merge: merge mooncake/main into liang09255
Jul 9, 2026
55f9fc6
fix: restore operator-specific C++ changes and build config for non-C…
Jul 10, 2026
2acd8d7
fix: align master_service and rpc_service with upstream API while kee…
Jul 10, 2026
7c2ae29
feat: add speed_mbps to drain query HTTP response in master_admin_ser…
Jul 10, 2026
2818f1f
perf: add ccache and Docker layer caching for 3x faster incremental b…
Jul 10, 2026
e4ab837
chore: remove nohup.out and docker wheel binaries from tracking
Jul 10, 2026
3fa96ce
chore: remove compiled mooncake_client binary from tracking
Jul 10, 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
21 changes: 21 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
**/.dockerignore
**/*.Dockerfile
.git/
build/
**/build/
**/node_modules/
**/__pycache__/
**/.git/
**/.github/
**/.clang-format
**/.clang-tidy
**/.gitignore
*.md
*.pdf
*.svg
*.png
*.jpg
dist/
!dist/*.whl
.cache/
third_party/
3rdparty/
!README.md
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ downloads/
eggs/
.eggs/
lib/
!mooncake-operator/ui/lib/
lib64/
parts/
sdist/
Expand Down Expand Up @@ -206,6 +207,42 @@ _codeql_detected_source_root

# core dumps
core_*

# K8s local cache (auto-generated)
mooncake-operator/.kube/

# Mooncake operator build artifacts
mooncake-operator/bin/
mooncake-operator/mooncake-operator

# CMake build artifacts
CMakeCache.txt
CMakeFiles/
CTestTestfile.cmake
build.ninja
.ninja_deps
.ninja_log
cmake_install.cmake
compile_commands.json
mooncake-store/include/version.h

# Docker build support files (local build artifacts)
/mooncake_master.bin
/libk8s_lease_wrapper.bin
docker-pip-cache/*.whl
mooncake-wheel/mooncake/mooncake_client

# Stripped binaries (build artifacts)
*.stripped

# MacOS
.DS_Store
.envrc

# nohup output
nohup.out

# Next.js build artifacts
mooncake-operator/ui/.next/
mooncake-operator/ui/node_modules/
mooncake-operator/ui/out/
45 changes: 45 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Mooncake 快速 K8s 部署
# 用法: make <target>
# 所有命令最终部署到 K8s 集群

.PHONY: help deploy-operator deploy-ui deploy-store deploy-all \
setup-ccache build-cpp reconfigure-ninja

help:
@echo "Mooncake 快速 K8s 部署"
@echo ""
@echo "用法: make <target>"
@echo ""
@echo "--- 部署到 K8s(修改什么就部署什么) ---"
@echo " deploy-operator 改 Go → 编译 → Docker → kind → 重启 (~30s)"
@echo " deploy-ui 改 UI → build → Docker → kind → 重启 (~1min)"
@echo " deploy-store 改 C++ → 编译 → wheel → Docker → kind → 重启 (~3min)"
@echo " deploy-all 全部组件一次部署"
@echo ""
@echo "--- 辅助 ---"
@echo " setup-ccache 配置 C++ 编译缓存(一次性的,已执行)"
@echo " build-cpp [TARGET=] 纯编译 C++(不部署,用于检查)"
@echo " reconfigure-ninja 切换到 Ninja 构建系统"
@echo ""
@echo "详情: bash scripts/dev-cycle.sh"

deploy-operator: ## Go 改完后快速部署到 K8s
bash scripts/dev-cycle.sh deploy-operator

deploy-ui: ## UI 改完后快速部署到 K8s
bash scripts/dev-cycle.sh deploy-ui

deploy-store: ## C++ 改完后快速部署到 K8s
bash scripts/dev-cycle.sh deploy-store

deploy-all: ## 全部组件部署到 K8s
bash scripts/dev-cycle.sh deploy-all

setup-ccache: ## 配置 C++ 编译缓存
bash scripts/dev-cycle.sh setup-ccache

build-cpp: ## 纯增量编译 C++(make build-cpp ARGS="mooncake-store")
bash scripts/dev-cycle.sh build-cpp $(ARGS)

reconfigure-ninja: ## 切换到 Ninja 构建
bash scripts/dev-cycle.sh reconfigure-ninja
314 changes: 1 addition & 313 deletions README.md

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,15 @@ if [ -f "${REPO_ROOT}/.gitmodules" ]; then
cd "${REPO_ROOT}"
check_success "Failed to change to repository root directory"

echo "Initializing git submodules..."
git submodule sync --recursive
check_success "Failed to sync git submodules"
git submodule update --init --recursive
check_success "Failed to initialize git submodules"
if [ -d "${REPO_ROOT}/.git" ]; then
echo "Initializing git submodules..."
git submodule sync --recursive
check_success "Failed to sync git submodules"
git submodule update --init --recursive
check_success "Failed to initialize git submodules"
else
echo -e "${YELLOW}No .git directory found, skipping git submodule operations (submodules expected to be pre-populated).${NC}"
fi

print_success "Git submodules initialized and updated successfully"
else
Expand Down
107 changes: 107 additions & 0 deletions docker/mooncake-nocuda.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# syntax=docker/dockerfile:1.7

###############################################################################
# Stage 1: build Mooncake from source and produce a Python wheel
###############################################################################
ARG UBUNTU_VERSION=22.04

FROM ubuntu:${UBUNTU_VERSION} AS builder

ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1

ARG PYTHON_VERSION=3.10
ARG PYPA_INDEX_URL=https://bootstrap.pypa.io
ARG CMAKE_BUILD_TYPE=Release

ENV PYTHON_VERSION=${PYTHON_VERSION} \
PATH="/usr/local/go/bin:${PATH}" \
GOPROXY="https://goproxy.cn,https://goproxy.io,direct"

# Install base build utilities and Python (Ubuntu 22.04 has Python 3.10 built-in)
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
ninja-build \
software-properties-common \
pkg-config \
build-essential \
cmake \
liburing-dev \
libnuma-dev \
libzstd-dev \
libxxhash-dev \
libcurl4-openssl-dev \
libyaml-cpp-dev \
libssl-dev \
uuid-dev \
libre2-dev \
python3 \
python3-dev \
python3-venv \
python3-pip && \
update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \
apt-get purge -y --auto-remove software-properties-common && \
rm -rf /var/lib/apt/lists/*

WORKDIR /workspace
COPY . /workspace

# Install Mooncake dependencies (yalantinglibs, Go, etc.)
RUN bash dependencies.sh -y

# Configure & build Mooncake (no CUDA, no RDMA)
# Build Go K8s lease wrapper first to generate the header, then build everything else
RUN mkdir -p build && \
cd build && \
cmake -G Ninja .. \
-DBUILD_UNIT_TESTS=OFF \
-DUSE_HTTP=ON \
-DUSE_CUDA=OFF \
-DWITH_EP=OFF \
-DSTORE_USE_K8S_LEASE=ON \
-DPython3_EXECUTABLE=/usr/bin/python3 \
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} && \
cmake --build . --parallel 2 --target build_k8s_lease_wrapper && \
cmake --build . --parallel 2

# Build the Python wheel from local sources
RUN OUTPUT_DIR=dist ./scripts/build_wheel.sh

###############################################################################
# Stage 2: install the freshly built wheel into a runtime image
###############################################################################
FROM ubuntu:${UBUNTU_VERSION} AS runtime

ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1

# Inherit build-args so the runtime stage installs the matching interpreter
ARG PYTHON_VERSION=3.10
ENV PYTHON_VERSION=${PYTHON_VERSION}

# Install runtime dependencies (Ubuntu 22.04 has Python 3.10 built-in)
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
libnuma1 \
liburing2 \
libyaml-0-2 \
libcurl4 \
libibverbs1 \
python3 \
python3-pip && \
apt-get purge -y --auto-remove curl && \
rm -rf /var/lib/apt/lists/*

# Copy wheels produced in builder stage and install them via pip
COPY --from=builder /workspace/mooncake-wheel/dist /tmp/mooncake-wheel
COPY scripts/check_hicache_hugepage_requirements.py /usr/local/bin/mooncake-hicache-sizing
RUN chmod 755 /usr/local/bin/mooncake-hicache-sizing
RUN python3 -m pip install --no-cache-dir /tmp/mooncake-wheel/*.whl && rm -rf /tmp/mooncake-wheel /root/.cache/pip

CMD ["/bin/bash"]
53 changes: 53 additions & 0 deletions docker/mooncake-store-fast.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# syntax=docker/dockerfile:1.7
#
# Mooncake Store 快速构建镜像 — 使用本地预编译的 wheel,跳过 C++ 编译
# 使用方式:
# bash scripts/build_wheel.sh # 编译本地 wheel
# docker build -f docker/mooncake-store-fast.Dockerfile -t mooncake/mooncake-store:latest .
# kind load docker-image mooncake/mooncake-store:latest

FROM ubuntu:24.04 AS runtime

ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1

# 安装运行时依赖(无需编译工具链)
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
libnuma1 \
liburing-dev \
libyaml-cpp0.8 \
libjsoncpp25 \
libgflags2.2 \
libgoogle-glog0v6 \
libunwind-dev \
libcurl4 \
libibverbs1 \
ibverbs-providers \
python3 \
python3-pip && \
rm -rf /var/lib/apt/lists/*

# 复制预下载的 wheel 和依赖
COPY docker-pip-cache/ /tmp/pip-cache/

# 从本地缓存安装 wheel 和所有依赖
RUN python3 -m pip install --break-system-packages --no-index --find-links=/tmp/pip-cache/ --no-cache-dir /tmp/pip-cache/mooncake_transfer_engine*.whl && \
rm -rf /tmp/pip-cache /root/.cache/pip

# Override mooncake_master with our exact locally-compiled binary.
COPY mooncake_master.bin /usr/local/lib/python3.12/dist-packages/mooncake/mooncake_master

# Copy the K8s lease wrapper shared library (built from Go via cgo).
COPY libk8s_lease_wrapper.bin /usr/local/lib/python3.12/dist-packages/mooncake/libk8s_lease_wrapper.so

# Add mooncake Python package dir to library path
RUN ldconfig /usr/local/lib/python3.12/dist-packages/mooncake/

# 复制可选的辅助脚本
COPY scripts/check_hicache_hugepage_requirements.py /usr/local/bin/mooncake-hicache-sizing
RUN chmod 755 /usr/local/bin/mooncake-hicache-sizing

CMD ["/bin/bash"]
Loading
Loading