Replace mapdns with daemon DNS
Serve daemon-managed .vm names directly from bangerd on 127.0.0.1:42069 instead of shelling out to mapdns. This keeps DNS state tied to VM lifecycle and lets the daemon rebuild records from running VMs after startup or reconcile. Add a small in-process authoritative DNS server, register and remove records from the VM start/stop/delete paths, and show the listener in daemon status. Remove the mapdns config and preflight surface, stop helper-flow DNS publishing in customize.sh and interactive.sh, drop dns.sh from the runtime bundle, and update docs/tests for the new local-resolver integration model. Validated with GOCACHE=/tmp/banger-gocache go test ./..., GOCACHE=/tmp/banger-gocache make build, and bash -n customize.sh interactive.sh.
This commit is contained in:
parent
430f66d5dd
commit
0a0b0b617b
24 changed files with 576 additions and 278 deletions
17
README.md
17
README.md
|
|
@ -8,7 +8,6 @@ Persistent Firecracker development VMs managed through a Go daemon, CLI, and TUI
|
|||
- Guest rootfs patching: `e2cp`, `e2rm`, `debugfs`
|
||||
- Guest work disk creation/resizing: `mkfs.ext4`, `e2fsck`, `resize2fs`, `mount`, `umount`, `cp`
|
||||
- SSH and logs: `ssh`
|
||||
- DNS publishing: `mapdns`
|
||||
- Optional NAT: `iptables`, `sysctl`
|
||||
- Image build helper flow: `bash`, `curl`, `jq`, `sha256sum`
|
||||
|
||||
|
|
@ -127,8 +126,8 @@ banger daemon socket
|
|||
banger daemon stop
|
||||
```
|
||||
|
||||
`banger daemon status` prints the daemon PID, socket path, and `bangerd.log`
|
||||
location.
|
||||
`banger daemon status` prints the daemon PID, socket path, daemon log path, and
|
||||
the built-in DNS listener address.
|
||||
|
||||
State lives under XDG directories:
|
||||
- config: `~/.config/banger`
|
||||
|
|
@ -141,15 +140,10 @@ the executable. Source-checkout binaries resolve it from `./runtime` next to the
|
|||
repo-built `./banger`. You can override either with `runtime_dir` in
|
||||
`~/.config/banger/config.toml` or `BANGER_RUNTIME_DIR`.
|
||||
|
||||
`mapdns` uses its own default data store unless you set `mapdns_data_file` or
|
||||
`BANGER_MAPDNS_DATA_FILE`.
|
||||
|
||||
Useful config keys:
|
||||
- `log_level`
|
||||
- `runtime_dir`
|
||||
- `firecracker_bin`
|
||||
- `mapdns_bin`
|
||||
- `mapdns_data_file`
|
||||
- `ssh_key_path`
|
||||
- `namegen_path`
|
||||
- `customize_script`
|
||||
|
|
@ -202,7 +196,10 @@ NAT is applied by the Go control plane using host `iptables` rules derived from
|
|||
the VM's current guest IP and TAP device. The remaining shell helpers also
|
||||
route NAT changes through `banger` instead of a standalone shell NAT script.
|
||||
|
||||
Running VMs are published as `<vm-name>.vm` through `mapdns`.
|
||||
`bangerd` also serves a tiny authoritative DNS service on `127.0.0.1:42069`
|
||||
for daemon-managed VMs. Known `A` records resolve `<vm-name>.vm` to the VM's
|
||||
guest IPv4 address. Integrate your local resolver separately if you want
|
||||
transparent `.vm` lookups on the host.
|
||||
|
||||
## Storage Model
|
||||
- VMs share a read-only base rootfs image.
|
||||
|
|
@ -249,5 +246,5 @@ The runtime VM lifecycle is managed through `banger`. The remaining shell script
|
|||
`BANGER_STATE_DIR`/XDG state
|
||||
- `make-rootfs.sh`: convenience wrapper for rebuilding `./runtime/rootfs-docker.ext4`
|
||||
- `interactive.sh`: manual one-off rootfs customization over SSH
|
||||
- `packages.sh`, `dns.sh`: shell helper libraries
|
||||
- `packages.sh`: shell helper library
|
||||
- `verify.sh`: smoke test for the Go workflow (`./verify.sh --nat` adds NAT coverage)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue