Skip to content

feat: Add moltbot deployment to Hypercore - #21

Merged
mmchougule merged 3 commits into
mainfrom
feat/moltbot-deployment
Jan 28, 2026
Merged

feat: Add moltbot deployment to Hypercore#21
mmchougule merged 3 commits into
mainfrom
feat/moltbot-deployment

Conversation

@mmchougule

@mmchougule mmchougule commented Jan 28, 2026

Copy link
Copy Markdown
Collaborator

Note

Medium Risk
Medium risk because it changes container networking behavior (CNI subnet and teardown/GC) and adds automated cleanup that could affect running workloads if misapplied; plus a new deployment image/entrypoint that writes auth config and disables device auth.

Overview
Adds a new deployments/moltbot-cloud Docker image that builds the Node/pnpm project into a tarball, installs it globally, and starts moltbot gateway via an entrypoint that generates/writes ~/.clawdbot/moltbot.json (token auth, LAN bind, default model) and optionally writes auth-profiles.json from ANTHROPIC_API_KEY.

Updates the containerd repo and cluster agent to reduce leaked CNI IP allocations: switches the CNI subnet to 10.88.0.0/16, ensures CNI teardown runs on CreateContainer errors and during DeleteContainer, and adds periodic CNI garbage collection (scanning /var/lib/cni/networks/hypercore-cni) triggered from monitorWorkloads; also adds Linux/Darwin build separation with a Mac stub repo and Linux-only shim/containerd files.

Written by Cursor Bugbot for commit cf2e51e. This will update automatically on new commits. Configure here.

Comment thread deployments/moltbot-cloud/Dockerfile
Comment thread deployments/moltbot-cloud/entrypoint.sh
Comment thread deployments/moltbot-cloud/entrypoint.sh
Comment thread deployments/moltbot-cloud/entrypoint.sh
- Expand subnet from /24 (254 IPs) to /16 (65k IPs)
- Call DelNetworkList in DeleteContainer to release IPs on delete
- Add defer in CreateContainer to cleanup CNI on error path
- Add GarbageCollectCNI() to clean orphaned IP allocations
- Run GC every ~5 minutes in monitorWorkloads loop
- Add darwin stub for cross-platform compilation

Fixes IP pool exhaustion even with few running workloads.
Comment thread pkg/containerd/repo.go
Comment thread pkg/containerd/repo.go

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment thread pkg/containerd/repo_darwin.go
@mmchougule
mmchougule merged commit 0abc06d into main Jan 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant