Skip to content

Add cloudfall domains apply (S-004-1, 3, 5..10) #117

Closed

Description

@shipmill-romamo

Builds part of spec S-004, docs/specs/004-domains-apply.md (feature issue #87): the acceptance criteria below. Each needs a test that names its id (test_s004_<k>_..., or a proves: S-004-1 comment line).

This is the cloudfall domains apply command.

  • S-004-1: In a project with servers a and b and a Domain whose proxy.server is a, cloudfall domains apply <d> --yes runs domains.yml with only a in its play recap, and no task from baseline.yml, services.yml or the cloudfall_firewall role runs
  • S-004-3: Without --yes, domains apply <d> exits 0 with status: "plan" and effect: "would_update", runs no ansible-playbook, and writes no receipt
  • S-004-5: domains apply <d> in a project whose config fails validation exits CONFIG_INVALID before any engine step
  • S-004-6: --issue-certificate on a dns-only Domain with an alias that resolves to no address of the proxy server exits PRECONDITION with context code domains_dns_unverified naming that alias, with and without --yes, and runs no ansible-playbook
  • S-004-7: --issue-certificate on a proxied Domain runs no DNS check and answers dnsCheck: "skipped-proxied"
  • S-004-8: --issue-certificate on a Domain with tls.mode: disabled exits PRECONDITION before any engine step
  • S-004-9: domains apply <d> --issue-certificate --yes on a fresh dns-only Domain whose names resolve to the proxy server passes cloudfall_domains_issue_certificates: true to domains.yml, ends with /etc/letsencrypt/live/<primaryName>/fullchain.pem present and certbot.timer enabled and active, answers dnsCheck: "verified", and writes <deployments>/<d>.json
  • S-004-10: A second domains apply <d> --issue-certificate --yes skips the Issue the declared certificate task, and its receipt has configurationSha256 equal to previousConfigurationSha256

Depends on #116

Activity

  1. shipmill-romamo commented on Oct 27, 2026

    @shipmill-romamo
    ContributorAuthor

    Triage: implement, for the next release candidate.

    The plan: build the criteria listed in the body, as docs/specs/004-domains-apply.md (S-004, approved in #100) says, each with a test that names its id. A departure from a criterion goes back as a question, never a quiet change. Build issues start in order: this one starts once every issue on its Depends on lines has closed. I'll link the PR here.

  2. shipmill-romamo commented on Oct 27, 2026

    @shipmill-romamo
    ContributorAuthor

    PR #137 adds cloudfall domains apply <d> [--issue-certificate] [--yes]: a plan without --yes, a run of domains.yml on the proxy server only with it, the DNS check for dns-only Domains (domains_dns_unverified), skipped-proxied for proxied ones, and a refusal of --issue-certificate under tls.mode: disabled (domains_tls_disabled). I asked it to keep cloudfall migrate's dns-verify unchanged before it lands.

    Trade-off: a real Let's Encrypt issue (S-004-9) and the second run skipping the issue task on a live host (S-004-10) aren't exercised; tests run domains.yml locally with a stand-in role and an injected resolver. domains observe and the MCP tools stay with #118.

  3. added a commit that references this issue on Oct 27, 2026
    77276ff
  4. shipmill-romamo commented on Oct 27, 2026

    @shipmill-romamo
    ContributorAuthor

    Released in v0.8.0rc7 (pre-release). uv tool install --prerelease allow cloudfall==0.8.0rc7
    A plain install gets it with the next stable release.
    If you filed this: react 👍 on this comment once it works for you, or reply if it doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions