Add DNS records for the smp-py Minecraft server - #19
Merged
Conversation
Publish pydis-smp.letsbuilda.dev as the public entry point for the Minecraft server that ansible/roles/minecraft deploys to microwave. Until now the only name reaching it was microwave.box.letsbuilda.dev, a host record whose purpose is Ansible reachability rather than a player-facing address. The A/AAAA pair repeats microwave.box's addresses rather than aliasing it. A CNAME would be the DRY option, but RFC 2782 forbids an SRV target from resolving through one, and address records keep that door open. The cost is that renumbering microwave.box now has to touch this file too. Both are unproxied for the same reason as 0d1dcd3: Cloudflare's HTTP proxy does not carry TCP/25565. The SRV record changes nothing today -- the server is on the default 25565, so clients already reach it without one. It is here so the port can move later without players changing what they type. Its target keeps a trailing dot deliberately: octodns-cloudflare builds the Cloudflare payload with value.target[:-1], stripping the last character unconditionally, so a missing dot would silently push a truncated hostname. Nothing in the enabled validator set catches that. The record carries no proxied key because SRV is not a proxiable type, and setting one would diff against Cloudflare forever. The Ansible inventory deliberately keeps pointing at microwave.box: that name addresses the machine, pydis-smp addresses the service. Claude-Session: https://claude.ai/code/session_01L67LcrLn6ohbfwGbKtBEge Co-authored-by: Claude <noreply@anthropic.com>
OctoDNS Plan for
|
| Operation | Name | Type | TTL | Value | Source |
|---|---|---|---|---|---|
| Create | _minecraft._tcp.smp-py | SRV | 300 | '0 5 25565 microwave.box.letsbuilda.dev.' | zone_config |
| Create | smp-py | A | 300 | 146.190.196.51 | zone_config |
| Create | smp-py | AAAA | 300 | 2604:a880:400:d1:0:4:e490:a001 | zone_config |
Summary: Creates=3, Updates=0, Deletes=0, Existing=11, Meta=False
This comment was marked as abuse.
This comment was marked as abuse.
Signed-off-by: Bradley Reynolds <bradley.reynolds@tailstory.dev>
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.
Publishes
pydis-smp.letsbuilda.devas the public entry point for the Minecraft server thatansible/roles/minecraftdeploys to microwave. Until now the only name reaching it wasmicrowave.box.letsbuilda.dev, a host record whose purpose is Ansible reachability rather than a player-facing address.One new file,
dns/zones/letsbuilda.dev.zone/services-minecraft.yaml, with three records:pydis-smp146.190.196.51pydis-smp2604:a880:400:d1:0:4:e490:a001_minecraft._tcp.pydis-smp0 5 25565 microwave.box.letsbuilda.dev.No registration step is needed:
split_extension: ".zone"merges every*.yamlin the zone directory, anddns-deploy.yamlis path-filtered ondns/zones/**.Why it looks like this
The A/AAAA pair repeats microwave.box's addresses rather than aliasing it. A CNAME would be the DRY option, but RFC 2782 forbids an SRV target from resolving through one, and address records keep that door open. The cost is that renumbering
microwave.boxnow has to touch this file too. Both are unproxied for the same reason as 0d1dcd3 — Cloudflare's HTTP proxy does not carry TCP/25565.The SRV record changes nothing today. The server is on the default 25565, so clients already reach it without one. It is here so the port can move later without players changing what they type.
Its target keeps a trailing dot deliberately. octodns-cloudflare builds the Cloudflare payload with
value.target[:-1], stripping the last character unconditionally, so a missing dot would silently pushmicrowave.box.letsbuilda.de. Nothing in the enabled validator set catches this —production.yamlsets nomanager.validators, so only thelegacyset runs, and the trailing-dot check lives inbest-practice.The SRV carries no
proxiedkey. SRV is not in_PROXIABLE_RECORD_TYPES, so Cloudflare never echoes one back; setting it would diff forever.ansible/is untouched — the inventory should keep pointing atmicrowave.box, since that name addresses the machine andpydis-smpaddresses the service.Verification
Run locally against the exact locked versions (octodns 1.22.0, octodns-cloudflare 1.2.0):
octodns-validate --config-file=dns/production.yaml— exit 0, no warnings. Runs fully offline; the Cloudflare provider makes no network calls at construction, so dummy env vars suffice.service=_minecraft,proto=_tcp,name=pydis-smp, withtargetemitted asmicrowave.box.letsbuilda.dev— TLD intact.auto-ttlon the SRV will not produce a recurring no-op update.check-yaml,trailing-whitespace,end-of-file-fixer,mixed-line-ending,check-case-conflict,check-merge-conflict. (yamlfixexcludes^dns.)The dry-run workflow should plan exactly three Creates and no modifications or deletions.
After merge
dig +short pydis-smp.letsbuilda.dev A AAAAdig +short _minecraft._tcp.pydis-smp.letsbuilda.dev SRV→0 5 25565 microwave.box.letsbuilda.dev.pydis-smp.letsbuilda.devwith no port and confirm the MOTD.Unrelated note
yamlfixcrashes at import under Python 3.14rc2 (a pydanticeval_type_backportassertion). It is excluded from^dnsso it does not affect this change, but it may be worth a look if lint goes red for reasons unconnected to this diff.Generated by Claude Code