Skip to content

feat: [#332] add DNS setup reminder in provision command#333

Merged
josecelano merged 1 commit intomainfrom
332-dns-setup-reminder-in-provision-command
Feb 11, 2026
Merged

feat: [#332] add DNS setup reminder in provision command#333
josecelano merged 1 commit intomainfrom
332-dns-setup-reminder-in-provision-command

Conversation

@josecelano
Copy link
Copy Markdown
Member

Overview

Implements #332 - Display a DNS setup reminder after successful provisioning when custom domains are configured. This helps users remember to update their DNS records to point to the server IP address.

Changes

  • Add DnsReminderView: New presentation view with conditional rendering based on domain presence
  • Add DnsReminderData: DTO for transferring view data (instance IP and domains list)
  • Integrate DNS reminder: Display in provision controller workflow after connection details
  • Domain extraction: Extract domains from tracker and Grafana ServiceInfo configurations
  • Comprehensive testing: 5 unit tests covering various scenarios

Architecture

Follows the project's DDD/MVC patterns:

  • View: src/presentation/views/commands/provision/dns_reminder.rs - Renders DNS reminder with warning icon, IP, and domain list
  • Controller: src/presentation/controllers/provision/handler.rs - Orchestrates display after provisioning
  • Application Layer: Reuses ServiceInfo from application layer for domain extraction

Behavior

The DNS reminder:

  • ✅ Appears only when TLS domains are configured
  • ✅ Lists all domains (tracker HTTP/API/health and Grafana)
  • ✅ Shows the server IP address for DNS configuration
  • ✅ Uses clear warning icon (⚠️) for visibility

Example Output

⏳ [1/3] Validating environment...
⏳   ✓ Environment name validated: lxd-local-https-example (took 0ms)
⏳ [2/3] Creating command handler...
⏳   ✓ Done (took 0ms)
⏳ [3/3] Provisioning infrastructure...
⏳   ✓ Infrastructure provisioned (took 26.1s)
✅ Environment 'lxd-local-https-example' provisioned successfully

Instance Connection Details:
  IP Address:        10.140.190.36
  SSH Port:          22
  SSH Private Key:   /home/josecelano/Documents/git/committer/me/github/torrust/torrust-tracker-deployer-agent-01/fixtures/testing_rsa
  SSH Username:      torrust

Connect using:
  ssh -i /home/josecelano/Documents/git/committer/me/github/torrust/torrust-tracker-deployer-agent-01/fixtures/testing_rsa torrust@10.140.190.36 -p 22

⚠️  DNS Setup Required:
  Your configuration uses custom domains. Remember to update your DNS records
  to point your domains to the server IP: 10.140.190.36

  Configured domains:
    - http.tracker.local
    - api.tracker.local
    - grafana.tracker.local
    - health.tracker.local

Testing

  • ✅ 5 new unit tests (all passing)
  • ✅ Pre-commit checks passed (linters, formatters, doc tests, E2E tests)
  • ✅ Manual testing with HTTPS-enabled environment (positive case)
  • ✅ Unit test coverage for UDP-only environment (negative case)

Acceptance Criteria

All criteria from the issue are met:

  • Pre-commit checks pass
  • Unit tests pass with comprehensive coverage
  • E2E tests pass
  • View follows MVC pattern with proper separation
  • Uses UserOutput methods (not println!)
  • Conditional display based on domain configuration
  • Clear, actionable user guidance

Display a DNS setup reminder after successful provisioning when custom
domains are configured. The reminder helps users remember to update their
DNS records to point to the server IP address.

Changes:
- Add DnsReminderView with conditional rendering based on domain presence
- Add DnsReminderData DTO for view data transfer
- Integrate DNS reminder display into provision controller workflow
- Extract domains from tracker and Grafana ServiceInfo configurations
- Add 5 unit tests covering various scenarios

The reminder only appears when TLS domains are configured, listing all
domains (tracker HTTP/API/health and Grafana) that need DNS setup.
@josecelano
Copy link
Copy Markdown
Member Author

ACK b98450b

@josecelano josecelano self-assigned this Feb 11, 2026
@josecelano josecelano linked an issue Feb 11, 2026 that may be closed by this pull request
29 tasks
@josecelano josecelano merged commit 54572b4 into main Feb 11, 2026
38 checks passed
josecelano added a commit that referenced this pull request Feb 11, 2026
Mark task 10.1 (DNS setup reminder in provision command) as completed
in the roadmap document and GitHub issue #1.

Changes:
- Mark task 10.1 as completed in docs/roadmap.md
- Update reference to point to issue #332 and PR #333
- Delete completed issue specification file
- Update roadmap GitHub issue #1 with completion status

Related: #332, #333
@josecelano josecelano mentioned this pull request Feb 11, 2026
41 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add DNS Setup Reminder in Provision Command

1 participant