This guide provides an overview of the available commands for the Torrust Tracker Deployer.
Current State: The create and destroy commands are fully implemented with CLI interface.
- ✅ Implemented:
create environment,create template,destroycommands - ❌ CLI Interface: Other commands not yet implemented
The CLI commands documented here represent the planned MVP implementation.
# Available commands
torrust-tracker-deployer create environment --env-file <file> # Create new deployment environment
torrust-tracker-deployer create template [path] # Generate configuration template
torrust-tracker-deployer destroy <env> # Destroy infrastructure and clean up resources
# Future commands
torrust-tracker-deployer deploy <env> # Future - Full deployment (provision → configure → release)
torrust-tracker-deployer run <env> # Future - Start application services
torrust-tracker-deployer status <env> # Future - Check environment status
torrust-tracker-deployer test <env> # Future - Run validation testsNote: The deploy command will internally orchestrate the complete deployment workflow: provision → configure → release. Individual commands for these phases may be added later for advanced users.
Create a new deployment environment from a configuration file.
Status: ✅ Fully Implemented
Use when: Initializing new environments for development, testing, or production
torrust-tracker-deployer create environment --env-file ./config/environment.jsonCreates:
- Environment data directory
- Initial environment state (Created)
- Persistent configuration
Generate a configuration template file for environment creation.
Status: ✅ Fully Implemented
Use when: Starting a new environment configuration from scratch
# Generate template with default name
torrust-tracker-deployer create template
# Generate template with custom name
torrust-tracker-deployer create template my-config.jsonCreates: JSON configuration template with placeholder values
Remove environment and clean up all resources.
Status: ✅ Fully Implemented
Use when: Tearing down temporary or failed environments
torrust-tracker-deployer destroy my-environmentRemoves:
- All infrastructure resources (VMs, networks)
- Local state files
- Build artifacts
Complete deployment workflow that orchestrates provision → configure → release.
Status: ❌ Not Yet Implemented
Use when: Deploying a new environment from start to finish
# Planned CLI usage
torrust-tracker-deployer deploy my-environmentThis command will internally execute:
- Provision: Create infrastructure (VMs, networks)
- Configure: Install software and configure system
- Release: Deploy application files and configuration
Start application services.
Status: ❌ Not Yet Implemented
Use when: Starting the Torrust Tracker application
# Planned CLI usage
torrust-tracker-deployer run my-environmentDisplay environment status and service health.
Status: ❌ Not Yet Implemented
Use when: Checking deployment health and status
# Planned CLI usage
torrust-tracker-deployer status my-environmentRun validation tests on deployed environment.
Status: ❌ Not Yet Implemented
Use when: Validating deployment functionality
# Planned CLI usage
torrust-tracker-deployer test my-environmentThe recommended workflow once all commands are implemented:
# 1. Generate configuration template
torrust-tracker-deployer create template production-config.json
# 2. Edit the configuration file
nano production-config.json
# 3. Create environment configuration
torrust-tracker-deployer create environment --env-file production-config.json
# 4. Deploy complete stack (provision → configure → release)
torrust-tracker-deployer deploy production
# 5. Start services
torrust-tracker-deployer run production
# 6. Verify deployment
torrust-tracker-deployer status production
torrust-tracker-deployer test productionCurrent available commands for development and testing:
# 1. Create environment from configuration
torrust-tracker-deployer create environment --env-file dev-config.json
# 2. When done, clean up
torrust-tracker-deployer destroy dev-envEnvironments transition through the following states:
Created → Provisioned → Configured → Released → Running → Destroyed
- Created: Environment configuration exists
- Provisioned: Infrastructure (VMs, networks) is running
- Configured: System software installed and configured
- Released: Application deployed
- Running: Services are active
- Destroyed: All resources cleaned up
The create and destroy commands support these common options:
--help- Display command help--log-output <OUTPUT>- Logging destination (file-onlyorfile-and-stderr)--log-file-format <FORMAT>- File log format (pretty,json, orcompact)--log-stderr-format <FORMAT>- Stderr log format (pretty,json, orcompact)--log-dir <DIR>- Log directory (default:./data/logs)--working-dir <DIR>- Working directory for environment data (default:.)
RUST_LOG- Control log verbosity (e.g.,RUST_LOG=debug)
New users should:
- Start with the
create environmentcommand documentation to set up your first environment - Use the
create templatecommand to generate a configuration file - Review the
destroycommand documentation to understand cleanup workflow - Consult individual command documentation as more commands become available
- Create Environment Command - Detailed create environment command documentation
- Destroy Command - Detailed destroy command documentation
- Logging Guide - Configure logging output
- E2E Testing - Testing infrastructure and commands