Skip to content
Get started

Versions and deployments

View as Markdown

On your machine, mk dev installs your game on the dev server. For players, the same bundles go to the servers of a Connect network, wherever those servers run. Each server swaps the new code in while players stay connected, as the dev server does.

The model follows Cloudflare Workers versions and deployments, with label selectors instead of shares of traffic:

Cloudflare Workers Minekube Games
A version is a fixed state of code and settings. A revision is the bundles of one build. Its id is the hash of its bundles, so the same bundles are the same revision.
A deployment says which versions get traffic, at most two with a share each. An assignment points a label selector at a revision. A network can have any number of them side by side.
A version key keeps a user on one version. A server runs exactly one revision per bundle, so all players on a server see the same game.
wrangler rollback mk publish --revision <id> assigns an earlier revision again.

A server runs the bundles of every assignment whose selector matches its labels. Where two assignments have a bundle of the same name, the newer one wins. Each server takes the bundles for its own platform: a Paper server the game, a Velocity proxy the network bundle.

Where What
The project The bundles, and the selector they go to
The server, in connector.json Its labels, such as channel=canary, its key and the network it joins
The network, with mk network and mk trust Its owner, invites and trust rules

The server says what it is. The project says which servers it targets.

  • Publish a revisionPreview

    Build your project and roll it out to the servers of a Connect network whose labels match a selector, with mk publish. Each server swaps the new revision in while players stay connected.

  • Roll back and unpublishPreview

    List the revisions of a network, assign an earlier revision again to roll back, and end an assignment with mk unpublish.

  • How servers get their bundles

    How a published revision reaches a server - bundles stored by their hash, a desired state per server in the network's Durable Object, the connector syncing files, and the Minekube plugin swapping them in.

  • Vite plugin and configurationPlanned

    Planned: a project declares its bundles and its targets in vite.config.ts, one core serves the Vite plugin and the mk CLI, and commands named as in Wrangler replace mk publish.

  • Controlled updatesPlanned

    Planned: a game holds an update while a round runs, servers report what they run so routing can send new players elsewhere, and a rollout goes in waves that stop when a server cannot run the new revision.

  • Hostnames and custom domainsPlanned

    Planned: a target names hostnames under its network, such as arena.my-network.g.minekube.net, and custom domains that players reach through a CNAME after the registry has checked that the domain is yours.

  • Platform updatesPlanned

    Planned: mk update installs the newest CLI after checking its hash against the release manifest, and /minekube update fetches the newest Minekube plugin into the server's update folder, on any setup.

Was this helpful?