feat: migrate AKernel deployment to Python YuanRong CLI - #19
feat: migrate AKernel deployment to Python YuanRong CLI#19mhsong1998-dot wants to merge 1 commit into
Conversation
b7de90a to
7e5c006
Compare
| enable_multi_master = true | ||
| {% endif %} | ||
|
|
||
| {% if is_cluster or is_agent %} |
There was a problem hiding this comment.
The standalone role is excluded by this condition, so its ETCD_PORT and ETCD_PEER_PORT values are never rendered. With openYuanRong 0.9.5 and --port-policy FIX, the embedded etcd therefore listens on the CLI defaults (32379/32380), while deploy/standalone/start.sh still configures Traefik with ${NODE_IP}:2379. The static file provider can hide this in /healthz smoke tests, but etcd-backed dynamic routes such as sandbox port forwarding will not be discovered. Please render a standalone values.etcd.address using YR_NODE_IP and the configured ports, or update the gateway to the actual embedded endpoint.
There was a problem hiding this comment.
Addressed in the squashed HEAD 3d195f7. Standalone now renders its node address plus etcd client/peer ports explicitly, so embedded etcd and the launcher use the same values.
| fc_agent_mgr_retry_cycle = 60000 | ||
| runtime_logs_dir = "/home/yuanrong/logs" | ||
| {% endif %} | ||
| {% if is_agent %} |
There was a problem hiding this comment.
standalone is included in is_node but not is_agent, so this leaves the standalone function proxy on the CLI default metrics_collector_type = "proc". The previous bootstrap explicitly selected external for both node and standalone, and the standalone sandboxd resource provider publishes cgroup, GPU, and storage data through /var/run/resource.sock. Please apply this setting to is_node so standalone keeps using sandboxd's resource accounting.
There was a problem hiding this comment.
Addressed in 3d195f7. External metrics is selected for every node role, including standalone. Native CCE validation confirmed the node Function Proxy starts with --metrics_collector_type=external.
|
|
||
| node: | ||
| # sandboxd allocates sandbox addresses from this CIDR. | ||
| sandboxIPRange: "172.17.0.1/16" |
There was a problem hiding this comment.
This exposes node.sandboxIPRange as configurable, but the node postStart hook still rewrites loopback resolvers to the hard-coded 172.17.0.1. For a value such as 172.23.0.1/16, sandboxd uses 172.23 while /etc/resolv_akernel.conf still points to 172.17, breaking DNS when the pod resolver is loopback. Please derive the resolver address from this value or from the live sandbox0 address.
There was a problem hiding this comment.
Addressed in 3d195f7. The resolver is derived from node.sandboxIPRange. Native CCE validation confirmed sandbox0=172.17.0.1/16 and the node Function Proxy uses 172.17.0.1 as its sandbox-local address.
| site_packages="$(/opt/openyuanrong/bin/python -c 'import site; print(site.getsitepackages()[0])')"; \ | ||
| base_py="${site_packages}/yr/cli/component/base.py"; \ | ||
| launcher_py="${site_packages}/yr/cli/system_launcher.py"; \ | ||
| sed -i \ |
There was a problem hiding this comment.
These sed commands return success even if zero lines were changed. That is dangerous for the supported OPEN_YR_CORE_WHEEL_URL override: an upstream formatting change or refactor can make the patches silently no-op, causing the full environment (including LITEBUS_DATA_KEY) to be logged or persisted in session JSON. Please assert that each expected replacement occurred, or validate the patched invariant; ideally, carry the fixes upstream.
There was a problem hiding this comment.
Addressed in 3d195f7. Both wheel patches now have exact pre- and post-condition grep checks, so a changed or unmatched wheel fails the image build. The 0.9.7 image built successfully and passed package checks.
| python3 -m pip install \ | ||
| --break-system-packages \ | ||
| python3 -m venv /opt/openyuanrong; \ | ||
| /opt/openyuanrong/bin/python -m pip install \ |
There was a problem hiding this comment.
pip install now resolves the core wheel's transitive dependencies from the index, and most of those requirements are lower-bounded rather than pinned. The top-level wheel checksum therefore no longer makes this image build reproducible: the same AKernel commit can install different dependency versions later or fail after an incompatible release. Please install from a pinned constraints or wheelhouse set, preferably with hashes.
There was a problem hiding this comment.
Addressed in 3d195f7. The Python 3.12 direct and transitive dependency closure is committed as constraints and was resolved for amd64 and arm64. Native CCE also passed matching core/SDK/sandbox 0.9.7, pip check, imports, 100 unit tests, and 5/5 live integration tests.
7e5c006 to
6a7e84d
Compare
|
One remaining process issue before merge: the current commit body contains only the Also, GitHub currently reports no checks for this branch. The validation documented in the PR is extensive, but there is no automated status attached to the commit. Please ensure the expected CI checks are configured and passing before merge, or explicitly confirm that this repository does not currently provide PR checks. |
6a7e84d to
7284cd1
Compare
Replace legacy YuanRong binary startup for master, frontend, node, and standalone roles with the packaged Python CLI and a shared rendered config. Upgrade core, SDK, and sandbox dependencies to 0.9.7, lock the Python 3.12 dependency closure, and preserve etcd discovery, resource reporting, sandbox networking, metrics, and Traefik behavior across cloud profiles. Signed-off-by: mhsong1998-dot <258010372+mhsong1998-dot@users.noreply.github.com>
7284cd1 to
3d195f7
Compare
Summary
Review fixes
sandbox0IPv4 address and external metrics for node/standalone rolesnode.sandboxIPRangeValidation
Validated final HEAD
3d195f7c27185c1fa837ad94d1d1b16005a3c6e5on native x86 CCEcn-north-4/akernel-cce, namespaceakernel-test.linux/amd64, Docker schema v2,openyuanrong-core==0.9.7,pip checkcleanswr.cn-north-4.myhuaweicloud.com/openyuanrong/cluster-all-in-one:pr19-0.9.7-3d195f7-20260812sha256:772710e4523d140abfbbf52c08176236c52e451bb0ed56cea9153e9fc230afd9sandbox0; Function Proxy runs with--ip=172.17.0.1,--proxy_ip=172.17.0.1, and--metrics_collector_type=externalpip checkclean, native imports passedbasic_usage.py,command_stdin.py, andnamed_sandbox.pypassedFinal HEAD differs from the previously full-built 0.9.7 feature image only by the upstream sandboxd gitlink. The published final digest recompiles that exact sandboxd revision and overlays its binaries on the fully validated image.
The stock port-forwarding example assumes
python3exists inside the default RRT rootfs. The deployed route was therefore tested with an available in-rootfs Perl HTTP server; no source workaround is included.No temporary URL, registry alias, test/plan file, credential, or local validation fixture is committed. GitHub Actions still requires maintainer approval for the fork workflow.