Add bincompat-go-http - #101
Conversation
d6f3654 to
dc1355a
Compare
|
Commit history was squashed to a single commit. Earlier force-pushes were from amending locally and me constantly changing my mind on what the best commit message is. :) |
razvand
left a comment
There was a problem hiding this comment.
Make the commit message wrap to 72 lines. Use "instructions" instead of "instructis" in the commit message.
If the application is httpbingo, name the directory accordingly: bincompat-go-httpbingo.
Use a proper name for authorship and for signed-off-by. Use Firstname Lastname <email>. Do not use Criss-Ivana.
Copy-pasting the commands doesn't work:
./setup.sh
make -C rootfs clean
make -C rootfs
./workdir/unikraft/support/scripts/mkcpio initrd.cpio ./rootfs/
make
sudo ip link set dev virbr0 down || true
sudo ip link del dev virbr0 || true
sudo ip link add dev virbr0 type bridge
sudo ip address add 172.44.0.1/24 dev virbr0
sudo ip link set dev virbr0 up
sudo qemu-system-x86_64 \
-nographic \
-enable-kvm \
-m 256 \
-cpu host \
-netdev bridge,id=en0,br=virbr0 -device virtio-net-pci,netdev=en0 \
-append "elfloader_qemu-x86_64 netdev.ip=172.44.0.2/24:172.44.0.1::: vfs.fstab=[ \"initrd0:/:extract::ramfs=1:\" ] -- /go-httpbin" \
-kernel workdir/build/elfloader_qemu-x86_64 \
-initrd ./initrd.cpioFollow the instructions and example from the bincompat-c-hello/ directory. See the README, scripts and other files.
There was a problem hiding this comment.
Pull request overview
This PR adds a new bincompat-go-http example to catalog-core, intended to run a Linux ELF Go HTTP service (go-httpbin) on Unikraft via the ELF loader binary-compatibility layer.
Changes:
- Added a new
bincompat-go-http/app scaffold (Unikraft build Makefile, Kconfig fragment, setup helper). - Added a rootfs build pipeline to produce a Linux ELF
go-httpbinbinary (Dockerfile + Makefile) and included Firecracker/QEMU run configs. - Added end-to-end documentation for building the rootfs, building Unikraft, and running under QEMU/Firecracker.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| bincompat-go-http/setup.sh | Creates workdir/ structure and symlinks required repos (unikraft, libs, elfloader). |
| bincompat-go-http/rootfs/Makefile | Builds/extracts a go-httpbin binary using Docker. |
| bincompat-go-http/rootfs/Dockerfile | Defines the containerized build of a static-PIE go-httpbin ELF. |
| bincompat-go-http/README.md | Documents setup, rootfs build, build/run steps for QEMU and Firecracker. |
| bincompat-go-http/Makefile.uk | Unikraft app metadata hook (empty, consistent with other templates). |
| bincompat-go-http/Makefile | Standard Unikraft wrapper makefile to build elfloader with required libs. |
| bincompat-go-http/fc.x86_64.json | Firecracker config for x86_64 booting elfloader + initrd and running /go-httpbin. |
| bincompat-go-http/fc.arm64.json | Firecracker config for arm64 booting elfloader + initrd and running /go-httpbin. |
| bincompat-go-http/Config.uk | Kconfig selections for elfloader + networking + Go runtime needs and larger default stack. |
| bincompat-go-http/.gitignore | Ignores workdir/ and the extracted rootfs binary. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@razvand Sorry I kept delaying this, I'll be able to have a look starting tomorrow.
I'm finalizing stuff for GSoC and then I think I'll try to run it on a clean environment to see what the issue might be. |
Sure, no problem, @Criss-Ivana. We keep in touch here or on Discord. If the PR is complete, from your point of view, make it a full PR (instead of just draft). |
c6353ed to
73c4510
Compare
Add a catalog-core application to run mccutchen/go-httpbin as a Linux ELF via app-elfloader with lwIP networking. It includes a rootfs Docker build, initrd packaging, and detailed instructions in README.md for building and running on QEMU and Firecracker. Signed-off-by: Cristian-Mihai Ivana <criss.ivana@gmail.com>
Go and similar Linux ELFs need posix-futex and posix-eventfd so clone/pthread_create can succeed. Signed-off-by: Cristian-Mihai Ivana <criss.ivana@gmail.com>
73c4510 to
2b5b814
Compare
This PR ports the go-httpbin 2.13.4 from
catalogintocatalog-core.