Allow users to register already-provisioned instances with the Torrust Tracker Deployer, bypassing the provision phase and enabling deployment to infrastructure managed outside the deployer.
The main feature specification including:
- Overview and problem statement
- Feature goals
- Proposed solution (new
registercommand) - Implementation details
- Command naming analysis and alternatives considered
- Definition of done
- Testing strategy
Clarifying questions that need to be answered before implementation:
- Scope and requirements
- Technical approach
- Priority and timeline
- Success criteria
- Risk assessment
Current Phase: ✅ COMPLETED
Completed:
- ✅ Create feature specification
- ✅ Create questions document
- ✅ Answer clarifying questions (all 22 questions answered)
- ✅ Update specification based on answers
- ✅ Create GitHub issue (#203)
- ✅ Implementation complete (PR #204)
Implementation Summary:
- Domain layer: State transition
Environment<Created>::register(instance_ip)→Environment<Provisioned> - Application layer:
RegisterCommandHandlerwith SSH connectivity validation - Presentation layer: CLI command with
--instance-ipargument - E2E tests: Migrated from
run_provision_simulationhack to properregistercommand - Documentation: User guide, ADR, and updated console commands
This feature adds a new torrust-tracker-deployer register command that allows users to register pre-existing infrastructure (VMs, physical servers, or containers) directly into the deployer workflow. This solves two key needs:
Key Points:
- Problem: Users cannot use the deployer with their own already-provisioned infrastructure, and E2E testing requires hacky workarounds for container-based tests
- Solution: New
registercommand that transitions environments fromCreatedtoProvisionedstate, validates SSH connectivity (minimal v1), and enables continuing withconfigure,release, etc. - Command Name: Chosen
registerbased on industry precedent (GitHub/GitLab runners, Consul services, etc.) - Priority: HIGH - Implemented before Hetzner provider to simplify E2E tests
- Validation: Minimal for v1 (SSH connectivity only), advanced validation deferred to v2
- Safety: Registered instances marked with metadata, destroy command preserves registered infrastructure
- Status: ✅ COMPLETED
This feature serves both production users and development/testing needs:
- Register spare/existing servers instead of provisioning new ones
- Deploy with unsupported cloud providers
- Custom infrastructure configurations
- Cost optimization through infrastructure reuse
- Faster E2E tests with Docker containers (5-10s vs 30-60s)
- GitHub Actions compatibility (workaround for nested VM issues)
- Replaced
run_provision_simulationhack with properregistercommand - Better test isolation
- User Guide: Register Command - How to use the command
- ADR: Register Existing Instances - Design decisions
- Console Commands - Command reference
- Development Principles
- Roadmap - Section 2: Hetzner provider support
- VM Providers - LXD vs container comparison
- State Machine - Environment states
Created: November 19, 2025
Last Updated: November 28, 2025 (Implementation Complete)