docs: add Go deploy guide and runnable example for Datum compute#130
Open
scotwells wants to merge 1 commit into
Open
docs: add Go deploy guide and runnable example for Datum compute#130scotwells wants to merge 1 commit into
scotwells wants to merge 1 commit into
Conversation
49af239 to
02f253d
Compare
02f253d to
2497bc0
Compare
scotwells
added a commit
that referenced
this pull request
Jun 2, 2026
The Go, Rust, Node.js, Python, PHP, and Ruby deploy guides and their runnable examples/ apps have moved to their own focused PRs (#130-#135). Dropping them here keeps this PR scoped to the ConfigMap/Secret mount feature and shrinks the diff for reviewers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
savme
approved these changes
Jun 4, 2026
nderjung
reviewed
Jun 4, 2026
| @@ -0,0 +1,356 @@ | |||
| # Deploy a Go Web Service on Datum Compute | |||
|
|
|||
| > Last verified: 2026-06-02 against the `hello-go` example and the live `kraft` / `datumctl compute` CLIs. | |||
nderjung
reviewed
Jun 4, 2026
Comment on lines
+149
to
+151
| ```sh | ||
| docker run -d --name buildkit --privileged moby/buildkit:latest | ||
| ``` |
There was a problem hiding this comment.
If you have the unikraft CLI installed and Docker Desktop, you don't need to run buildkit separately. Otherwise also expose the ports:
docker run -d --name buildkitd --privileged -p 1234:1234 moby/buildkit:latest --addr tcp://0.0.0.0:1234
export BUILDKIT_HOST=localhost:1234
nderjung
reviewed
Jun 4, 2026
Comment on lines
+155
to
+164
| Use `kraft` only to build and publish the image — you deploy the running workload with `datumctl compute` in the next step. The `--no-start` (`-S`) flag builds the unikernel package and pushes it to the metro registry **without** starting an instance, so `kraft` never runs your workload. It pushes to `index.unikraft.io/datum/<name>`. The `-M` flag sets the memory allocation in MiB and is required. | ||
|
|
||
| ```sh | ||
| export KRAFTKIT_NO_CHECK_UPDATES=true | ||
|
|
||
| kraft cloud --metro "$UKC_METRO" --token "$UKC_TOKEN" \ | ||
| --buildkit-host docker-container://buildkit \ | ||
| deploy --no-start -M 512 --name hello-go \ | ||
| --runtime base:latest --rootfs ./Dockerfile . | ||
| ``` |
There was a problem hiding this comment.
unikraft build . -o datum/hello-go:latest
nderjung
reviewed
Jun 4, 2026
Comment on lines
+343
to
+344
| - The `kraft cloud deploy` command completed without errors and printed the image reference. | ||
| - The image name in `workload.yaml` matches exactly what `kraft cloud deploy` reported, including the `latest` tag. |
nderjung
reviewed
Jun 4, 2026
Comment on lines
+25
to
+28
| kraft cloud --metro "$UKC_METRO" --token "$UKC_TOKEN" \ | ||
| --buildkit-host docker-container://buildkit \ | ||
| deploy --no-start -M 512 --name hello-go \ | ||
| --runtime base:latest --rootfs ./Dockerfile . |
There was a problem hiding this comment.
unikraft build . -o datum/hello-go:latest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Take a Go HTTP service from source code to a live, reachable Instance on Datum compute. A developer can clone the example, run two commands, and watch a real Instance come up — no guesswork about the unikernel build, the metro registry, or the workload manifest.
What's included
docs/guides/deploy-a-go-app.md— the full source-to-running walkthrough: building the static-PIE unikernel image, publishing it to the metro registry, deploying withdatumctl compute deploy, verifying the HTTP response, updating, and troubleshooting.examples/hello-go/— a ready-to-deploy folder so a developer goes from clone to a running Instance without copying snippets out of the docs:main.go,go.mod— the minimal Go HTTP serviceDockerfile— the musl static-PIE build with a self-check that fails fast on a wrong-shaped binaryKraftfile— the Unikraft Cloud app-elfloader runtime configworkload.yaml— the Datum compute Workload manifestREADME.md— one-line description, link back to the guide, and the build + deploy commandsThe guide links to the example, and the example links back to the guide, so either entry point leads to the other.
🤖 Generated with Claude Code