feat: a proper Keel default site in a simple installation (keel-web 0.2.0) #4
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/keel-web!4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/keel-default-site"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On a live Keel Web container (keel-web 0.1.1,
cloud.mode simple) Nginx served Debian's stockdefaultsite over an empty/var/www/html, socurl http://host/got nginx's bare 404, nothing listened on 443, and the usage screen saidhttp://. This makes a simple installation serve a proper Keel default site.keel-web 0.2.0
/etc/nginx/sites-available/keel-default, a conffile like the front: the default server on[::]:80,0.0.0.0:80,[::]:443 ssl,0.0.0.0:443 ssl,http2 on,ssl_certificate /etc/ssl/private/cert.pem,cert.key,ssl_dhparam dhparams.pem, zz-ssl-ciphers' list,ssl_session_tickets off, no HSTS (after ACME, tracker#51),server_tokens off. HTTP is served, not redirected (http-01)./keel-healthanswers 204 on both schemes./var/www/keel-default(index.html,404.html,50x.html): plain, static, no external resource, no TurnKey wording, no version; they say this is a Keel Web node with no site configured yet and that the operator configures one with confconsole or/etc/keel/instance.yaml. Shipped under/usr/share/keel-web/default-site(lintiandir-or-file-in-var-wwwis an error); the postinst links/var/www/keel-defaultto it and leaves a directory of the operator's alone.defaultlink (nginx-common's conffile checksum) is removed, recorded in/var/lib/keel-web, thennginx -t, rolled back when refused. While/etc/ssl/private/cert.pem,cert.keyordhparams.pemis missing, as in fab's chroot (keel-host-keys and 15regen-sslcert make them at the first boot), the site stays enabled,nginx -tis skipped and one line says it runs at the first boot;conf.d/mainchecks only the links, so the build passes; an edited default, a link of the operator's or none leaves the default server theirs and says so. An upgrade never re-enables a site the operator disabled. The postrm takes both sites out ofsites-enabledon remove as on purge (the pages leave with the package) and gives Debian's link back.keel-defaultanddefault-anubis, never Debian's: the two are mutually exclusive on every path,nginx -trefuses them together. A 0.1.1 machine in a cloud mode getskeel-defaultthe next time the overlay is turned off.default-anubisserves the same pages, with the 404/50x pages andserver_tokens off; its 443 server has them too, so a 502 while Anubis is down shows the Keel 50x page, not nginx's./usr/lib/systemd/system/nginx.service.d/keel-web.conf:Wants=andAfter=keel-host-keys.service. The postinst and postrm runsystemctl daemon-reloadon a machine.Recipe (19.0 release 3)
services.txt:Web: https://..., whichkeel_banner_web_schemereads for the banner.conf.d/mainfails the build unlesskeel-defaultis enabled, Debian's is not (its file kept), the three pages resolve and the usage screen says https. The overlay's/var/www/html/index.htmlgoes.Tests
tests/package.bats(62): the built package, both sites, the pages, and the postinst and postrm against a scratch root throughDPKG_ROOTwith a stubdpkg-query.tests/anubis-front.bats(27) andtests/image-conf.bats(20); kcov 100 percent onanubis-frontandconf.d/main.tests/site.bats(21), new checksite / trixie: on a booted trixie container with Nginx and common's nginx and anubis overlays (built from the pinned 19.x commit; keel, keel-core, anubis and the coraza overlay are equivs stand-ins),nginx -t,/keel-healthon both loopbacks and both schemes, the placeholder over HTTP and HTTPS verified againstcert.crt, HTTP/2, TLS 1.2/1.3 and not 1.1,Server: nginxwith no version, the 404 page, the drop-in, the hook enabled and disabled twice over (443 then answers 502 with the Keel 50x page),dpkg -r(Debian's "Welcome to nginx!" back),-i,-P,-i, the postinst's rollback whennginx -trefuses, and an install with the certificate moved away that keeps the site enabled.Decisions taken
web.listen.ipv4exists in decision 0042 but not in keel'sdocs/spec.md, so the file is static with IPv4 on; keel honours the field when it renders the sites (tracker#51), and the file says so./keel-healthon the default site answers everyone, not the loopback only: it is the manifest's probe path and leaks nothing; the loopback on 80 stays the overlay's server.keel-defaultsits in keel'skeel-*namespace of 0042 (keel-default.confwith the header). It is what was asked; when tracker#51 lands, keel-web's file and hook give way, as COVERAGE.md's plan records.turnkey-make-ssl-cert --default) on every boot and is orderedBefore=nginx.service; the drop-in addsWants=/After=so Nginx pulls it in wherever it is started from. Not anExecStartPre=: a drop-in's is appended after nginx.service's ownnginx -t, which fails first, and replacing the list would copy Debian's line. AWants=of a unit that is not installed is no error. A certificate present but broken is not covered: nothing short of regenerating it would be.default-anubiskeepscert.crt; the new site usescert.pemas asked. Both are the same certificate.Not run here:
keel spec apply --systemon a built image (the existing jobs do not cover it;tests/README.mddescribes the run to repeat).Also:
allow_unpublishedleavestests.yml. The appliance job refused it on this branch because the mirror now answers forweb.manifest(the attended release of 2026-10-02), which COVERAGE.md plan item 1 said would happen.