Closed
Labels
enhancementNew feature or request
Description
Overview
This task implements the foundational scaffolding for the release and run commands using a minimal docker-compose deployment with nginx. The goal is to validate the full pipeline (release → run → verify) before adding complexity with the actual Torrust Tracker services.
Parent Epic: #216
Goals
- Create
ReleaseCommandHandler(App layer) with state transitions - Create
RunCommandHandler(App layer) with state transitions - Create
releaseCLI subcommand (Presentation layer) - Create
runCLI subcommand (Presentation layer) - Add docker-compose file infrastructure
- Deploy and run demo-app (nginx) container on provisioned VM
- Verify container is running and healthy
- Rename
e2e_config_tests.rs→e2e_config_and_release_tests.rsand extend - Update
e2e_tests_full.rsto include release and run commands
Architecture Overview
State Transitions
The environment lifecycle extends with new states:
Configured → Releasing → Released → Starting → Running
↓ ↓ ↓
ReleaseFailed StartFailed RunFailed
Three-Level Architecture
Following the existing pattern:
- Command Handlers (Level 1):
ReleaseCommandHandler,RunCommandHandler - Steps (Level 2):
PrepareComposeFilesStep,TransferFilesStep,StartServicesStep - Remote Actions (Level 3): SSH file transfer, docker compose commands
Implementation Plan
This issue follows an outside-in approach with 10 phases. Each phase produces a runnable command that can be E2E tested.
See full specification: docs/issues/demo-slice-release-run-commands.md
Acceptance Criteria
Functional Requirements
-
releasecommand copies docker-compose.yml to configured VM -
runcommand starts docker-compose services on VM - Demo-app (nginx) container runs successfully and is healthy
- Environment state transitions correctly through the lifecycle
- Failed operations transition to appropriate failed states
Quality Requirements
- Pre-commit checks pass
- E2E tests validate full pipeline
- Error messages are clear with actionable
.help() - Documentation is updated
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
docs: [#217] add demo slice spec for release and run commands
feat: [#217] add release and run CLI commands (no-op)
refactor: [#217] rename e2e-config-tests to e2e-config-and-release-tests
feat: [#217] add release and run controllers (wired but empty)
feat: [#217] add release and run command handlers in application layer
feat: [#217] add release and run steps in application layer
feat: [#217] complete application layer handlers for release and run …
feat: [#217] implement state transitions for release and run handlers
test: [#217] add release and run commands to E2E test workflows
feat: [#217] implement phase 6 - release step prepares docker compose…
docs: [#217] update phase 6 and 7 documentation with implementation s…
feat(release): [#217] Complete Phase 8 - Refactor release handler to …
refactor(release): [#217] Validate instance IP as precondition for re…
refactor(error-handling): [#217] Standardize EnvironmentNotFound erro…
fix(clippy): [#217] Fix clippy linting errors
refactor: [#217] Extract load and validate methods in command handlers
refactor: [#217] Improve configure handler clarity
refactor: [#217] Add symmetric logging to release and provision handlers
feat: [#217] implement Phase 9 - StartServicesStep for run command
feat: [#217] wire RunCommandController to RunCommandHandler
docs: [#217] document Phase 9 manual E2E test issues and resolution
feat: [#217] Enable Docker-in-Docker for E2E tests to test run command
fix: [#217] Wrap std::env::set_var in unsafe block (Rust 1.81+)
docs: [#217] Update Docker-in-Docker ADR with implementation details
feat: [#217] Add separate E2E validation modules for release and run …
refactor: [#217] Rename run_configuration_tests to run_configure_rele…
chore: remove closed issue documentation files