Skip to content

Demo Slice: Release and Run Commands Scaffolding #217

@josecelano

Description

@josecelano

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 release CLI subcommand (Presentation layer)
  • Create run CLI 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.rse2e_config_and_release_tests.rs and extend
  • Update e2e_tests_full.rs to 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:

  1. Command Handlers (Level 1): ReleaseCommandHandler, RunCommandHandler
  2. Steps (Level 2): PrepareComposeFilesStep, TransferFilesStep, StartServicesStep
  3. 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

  • release command copies docker-compose.yml to configured VM
  • run command 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

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions