Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/skills/dev/testing/run-local-e2e-test/skill.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ This skill walks you through a complete manual end-to-end test of the deployer u

```bash
# Verify all required tools are installed
cargo run -p torrust-dependency-installer --bin dependency-installer -- check
cargo run -p torrust-tracker-deployer-dependency-installer --bin dependency-installer -- check

# Install missing tools (LXD, OpenTofu, Ansible, Docker)
cargo run -p torrust-dependency-installer --bin dependency-installer -- install
cargo run -p torrust-tracker-deployer-dependency-installer --bin dependency-installer -- install
```

> **Note**: `cargo run --bin dependency-installer` does not work from the workspace root because the binary lives in a sub-package. Always use `-p torrust-dependency-installer`.
> **Note**: `cargo run --bin dependency-installer` does not work from the workspace root because the binary lives in a sub-package. Always use `-p torrust-tracker-deployer-dependency-installer`.

## Complete Workflow

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ Use the built-in `dependency-installer` package to verify all required tools are

```bash
# Check all dependencies
cargo run -p torrust-dependency-installer --bin dependency-installer check
cargo run -p torrust-tracker-deployer-dependency-installer --bin dependency-installer check

# Check a specific dependency
cargo run -p torrust-dependency-installer --bin dependency-installer check --dependency opentofu
cargo run -p torrust-tracker-deployer-dependency-installer --bin dependency-installer check --dependency opentofu

# List all dependencies with status
cargo run -p torrust-dependency-installer --bin dependency-installer list
cargo run -p torrust-tracker-deployer-dependency-installer --bin dependency-installer list

# Install all missing dependencies
cargo run -p torrust-dependency-installer --bin dependency-installer install
cargo run -p torrust-tracker-deployer-dependency-installer --bin dependency-installer install
```

## Required Dependencies
Expand Down Expand Up @@ -60,7 +60,7 @@ ERROR ... dependency is not installed dependency="opentofu"
- In CI/CD pipelines use `--log-level off` to suppress output and rely on exit code only:

```bash
cargo run -p torrust-dependency-installer --bin dependency-installer check --log-level off
cargo run -p torrust-tracker-deployer-dependency-installer --bin dependency-installer check --log-level off
```

- To install missing tools automatically, use the `install` subcommand (requires system package manager access)
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ Use the built-in `dependency-installer` package to install all tools required to

```bash
# 1. Check what is already installed
cargo run -p torrust-dependency-installer --bin dependency-installer check
cargo run -p torrust-tracker-deployer-dependency-installer --bin dependency-installer check

# 2. Install everything missing in one command
cargo run -p torrust-dependency-installer --bin dependency-installer install
cargo run -p torrust-tracker-deployer-dependency-installer --bin dependency-installer install

# 3. Verify all dependencies are now present
cargo run -p torrust-dependency-installer --bin dependency-installer check
cargo run -p torrust-tracker-deployer-dependency-installer --bin dependency-installer check
```

## Commands

```bash
# Install all missing dependencies
cargo run -p torrust-dependency-installer --bin dependency-installer install
cargo run -p torrust-tracker-deployer-dependency-installer --bin dependency-installer install

# Install a specific dependency
cargo run -p torrust-dependency-installer --bin dependency-installer install --dependency opentofu
cargo run -p torrust-tracker-deployer-dependency-installer --bin dependency-installer install --dependency opentofu

# Install with verbose output (shows download/install steps)
cargo run -p torrust-dependency-installer --bin dependency-installer install --verbose
cargo run -p torrust-tracker-deployer-dependency-installer --bin dependency-installer install --verbose
```

## Dependencies Installed
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
fi

publish:
name: Publish (${{ needs.context.outputs.type }})
name: Publish Image
environment: dockerhub-torrust
needs: context
if: needs.context.outputs.continue == 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- name: Build dependency-installer binary
run: |
cargo build --release -p torrust-dependency-installer --bin dependency-installer
cargo build --release -p torrust-tracker-deployer-dependency-installer --bin dependency-installer

- name: Install all development dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
name: Build All Binaries
run: |
cargo build --bins
cargo build -p torrust-dependency-installer --bin dependency-installer
cargo build -p torrust-tracker-deployer-dependency-installer --bin dependency-installer

- id: coverage-text
name: Generate Text Coverage Summary
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/publish-crate.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Crate publication workflow for Torrust Tracker Deployer
#
# Publishes all four workspace crates in dependency order when a release branch is pushed:
# 1. torrust-deployer-types (no internal deps)
# 2. torrust-dependency-installer (no internal deps)
# 1. torrust-tracker-deployer-types (no internal deps)
# 2. torrust-tracker-deployer-dependency-installer (no internal deps)
# 3. torrust-tracker-deployer (depends on 1 and 2)
# 4. torrust-tracker-deployer-sdk (depends on 1 and 3)
#
Expand All @@ -18,8 +18,8 @@ on:

env:
CARGO_TERM_COLOR: always
DEPLOYER_TYPES_CRATE: torrust-deployer-types
DEPENDENCY_INSTALLER_CRATE: torrust-dependency-installer
DEPLOYER_TYPES_CRATE: torrust-tracker-deployer-types
DEPENDENCY_INSTALLER_CRATE: torrust-tracker-deployer-dependency-installer
MAIN_CRATE: torrust-tracker-deployer
SDK_CRATE: torrust-tracker-deployer-sdk

Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
cargo package --list -p "$crate"
done

- name: Dry Run Publish torrust-deployer-types
- name: Dry Run Publish torrust-tracker-deployer-types
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --dry-run -p ${{ env.DEPLOYER_TYPES_CRATE }}
Expand All @@ -119,12 +119,12 @@ jobs:
fi
done

- name: Publish torrust-deployer-types
- name: Publish torrust-tracker-deployer-types
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish -p ${{ env.DEPLOYER_TYPES_CRATE }}

- name: Wait for torrust-deployer-types to Be Indexed
- name: Wait for torrust-tracker-deployer-types to Be Indexed
run: |
release_version="${{ steps.release.outputs.version }}"
for attempt in 1 2 3 4 5 6; do
Expand All @@ -137,17 +137,17 @@ jobs:
sleep 15
done

- name: Dry Run Publish torrust-dependency-installer
- name: Dry Run Publish torrust-tracker-deployer-dependency-installer
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish --dry-run -p ${{ env.DEPENDENCY_INSTALLER_CRATE }}

- name: Publish torrust-dependency-installer
- name: Publish torrust-tracker-deployer-dependency-installer
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish -p ${{ env.DEPENDENCY_INSTALLER_CRATE }}

- name: Wait for torrust-dependency-installer to Be Indexed
- name: Wait for torrust-tracker-deployer-dependency-installer to Be Indexed
run: |
release_version="${{ steps.release.outputs.version }}"
for attempt in 1 2 3 4 5; do
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-dependency-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Build dependency-installer binary
run: |
echo "🔨 Building dependency-installer binary..."
cargo build --release -p torrust-dependency-installer --bin dependency-installer
cargo build --release -p torrust-tracker-deployer-dependency-installer --bin dependency-installer
echo "✅ Binary built successfully"

- name: Install all development dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-e2e-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:

- name: Install dependencies
run: |
cargo build -p torrust-dependency-installer --bin dependency-installer
cargo run -p torrust-dependency-installer --bin dependency-installer -- install
cargo build -p torrust-tracker-deployer-dependency-installer --bin dependency-installer
cargo run -p torrust-tracker-deployer-dependency-installer --bin dependency-installer -- install

- name: Setup Docker
uses: docker/setup-buildx-action@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-e2e-infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:

- name: Install dependencies
run: |
cargo build -p torrust-dependency-installer --bin dependency-installer
cargo run -p torrust-dependency-installer --bin dependency-installer -- install
cargo build -p torrust-tracker-deployer-dependency-installer --bin dependency-installer
cargo run -p torrust-tracker-deployer-dependency-installer --bin dependency-installer -- install

- name: Verify installations
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-lxd-provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ jobs:

- name: Install dependencies
run: |
cargo build -p torrust-dependency-installer --bin dependency-installer
cargo run -p torrust-dependency-installer --bin dependency-installer -- install
cargo build -p torrust-tracker-deployer-dependency-installer --bin dependency-installer
cargo run -p torrust-tracker-deployer-dependency-installer --bin dependency-installer -- install

- name: Render template configurations
run: |
Expand Down
62 changes: 31 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ tempfile = "3.0"
tera = "1.0"
testcontainers = { version = "0.27", features = [ "blocking" ] }
thiserror = "2.0"
torrust-dependency-installer = { path = "packages/dependency-installer", version = "0.1.0-beta.1" }
torrust-deployer-types = { path = "packages/deployer-types", version = "0.1.0-beta.1" }
torrust-tracker-deployer-dependency-installer = { path = "packages/dependency-installer", version = "0.1.0-beta.1" }
torrust-tracker-deployer-types = { path = "packages/deployer-types", version = "0.1.0-beta.1" }
torrust-linting = "0.1.0"
tracing = { version = "0.1", features = [ "attributes" ] }
tracing-appender = "0.2"
Expand Down
2 changes: 1 addition & 1 deletion docs/codebase-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ Independently versioned Cargo workspace packages in `packages/`:

- ✅ [`torrust-linting`](https://crates.io/crates/torrust-linting) (external crate) - Unified linting framework (runs markdownlint, yamllint, taplo, cspell, clippy, rustfmt, shellcheck)
- ✅ `packages/dependency-installer/` - Dependency detection and installation for development setup (OpenTofu, Ansible, LXD, cargo-machete)
- ✅ `packages/deployer-types/` - Shared value objects and traits (`torrust-deployer-types`) — cross-cutting foundational types (e.g., `EnvironmentName`, `DomainName`, `Username`, `Clock`, `ErrorKind`) shared by the root crate and SDK
- ✅ `packages/deployer-types/` - Shared value objects and traits (`torrust-tracker-deployer-types`) — cross-cutting foundational types (e.g., `EnvironmentName`, `DomainName`, `Username`, `Clock`, `ErrorKind`) shared by the root crate and SDK
- ✅ `packages/sdk/` - Programmatic SDK (`torrust-tracker-deployer-sdk`) — independently consumable Rust crate for deploying Torrust Tracker instances without the CLI

### Presentation Layer
Expand Down
2 changes: 1 addition & 1 deletion docs/deployments/hetzner-demo-tracker/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The image starts, prints tool versions, and shows the CLI help. Tool versions in
All dependencies verified with:

```bash
cargo run -p torrust-dependency-installer --bin dependency-installer check
cargo run -p torrust-tracker-deployer-dependency-installer --bin dependency-installer check
```

- [x] **Rust toolchain** — `rustc 1.96.0-nightly (ec818fda3 2026-03-02)`
Expand Down
2 changes: 1 addition & 1 deletion docs/refactors/completed-refactorings.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
| --------------------------------------------------- | ------------ | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Standardize JsonView Render API | Feb 28, 2026 | Consistent `render()` return type + `Render<T>` trait for all views | See git history at `docs/refactors/plans/standardize-json-view-render-api.md` - Introduced `ViewRenderError` + `Render<T>` trait; removed inherent `render()` from all 26 view structs (13 `JsonView` + 13 `TextView`); eliminated dead fallback code; propagated errors through all handler chains with new `OutputFormatting` variant on 11 command error types; removed asymmetry between text and JSON renderers (3 phases, final commit `221c998a`, PR #402, 750 additions / 1528 deletions) |
| SDK DDD Layer Boundary Fixes | Feb 25, 2026 | Remove DDD violations from SDK public surface | See git history at `docs/refactors/plans/sdk-ddd-layer-boundary-fixes.md` - Introduced `PersistenceError`, `InvalidStateError`, `ReleaseWorkflowStep` application-layer wrappers; updated all 9 command handler error enums; added `RepositoryProvider` trait; moved infra wiring to bootstrap; deleted orphaned `src/presentation/sdk/`; renamed `RepositoryFactory` → `FileRepositoryFactory` (commits `6f3028f4`, `52628329`, PR #381) |
| Extract Shared Types Package | Feb 25, 2026 | Extract shared value objects and traits into packages/deployer-types/ | See git history at `docs/refactors/plans/extract-shared-types-package.md` - Created `packages/deployer-types/` (`torrust-deployer-types`) with all shared value objects and traits from `src/shared/` and `EnvironmentName` from `src/domain/`; root crate and SDK now depend on the types package, backward-compat re-exports maintained, PR #381 |
| Extract Shared Types Package | Feb 25, 2026 | Extract shared value objects and traits into packages/deployer-types/ | See git history at `docs/refactors/plans/extract-shared-types-package.md` - Created `packages/deployer-types/` (`torrust-tracker-deployer-types`) with all shared value objects and traits from `src/shared/` and `EnvironmentName` from `src/domain/`; root crate and SDK now depend on the types package, backward-compat re-exports maintained, PR #381 |
| Extract SDK Workspace Package | Feb 25, 2026 | Create packages/sdk/ as independently consumable workspace package | See git history at `docs/refactors/plans/extract-sdk-workspace-package.md` - Created `packages/sdk/` (`torrust-tracker-deployer-sdk`) with SDK source, README, and examples moved from root `examples/sdk/`; backward compat deferred (cyclic dep resolved in Plan 3), PR #381 |
| Presentation CLI/SDK Separation | Feb 25, 2026 | Separate CLI and SDK in presentation layer | See git history at `docs/refactors/plans/presentation-cli-sdk-separation.md` - Moved all CLI-specific modules (controllers, dispatch, input, views, error, errors, tests) under `src/presentation/cli/`, updated 160 files, SDK confirmed zero CLI imports (commit f02024f6, PR #381) |
| E2E Test Isolation - Complete Log Directory Support | Feb 18, 2026 | Add log_dir to all E2E tests | See git history at `docs/refactors/plans/e2e-test-isolation-log-dir.md` - Added `.log_dir()` to 45 ProcessRunner calls across 6 E2E test files (validate, create, list, show, destroy, purge commands); all tests produce zero production `data/` pollution (6 phases, commits 1d576a5a→1c437d80, Issue [#365](https://github.com/torrust/torrust-tracker-deployer/issues/365)) |
Expand Down
2 changes: 1 addition & 1 deletion packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ All packages in this directory:
// Add to your Cargo.toml
[dependencies]
torrust-linting = "0.1.0" # external crate: https://crates.io/crates/torrust-linting
torrust-dependency-installer = { path = "packages/dependency-installer" }
torrust-tracker-deployer-dependency-installer = { path = "packages/dependency-installer" }
torrust-tracker-deployer-sdk = { path = "packages/sdk" }
```

Expand Down
4 changes: 2 additions & 2 deletions packages/dependency-installer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "torrust-dependency-installer"
name = "torrust-tracker-deployer-dependency-installer"
version = "0.1.0-beta.1"
edition = "2021"
description = "Dependency detection and installation utilities for the Torrust Tracker Deployer project"
Expand All @@ -8,7 +8,7 @@ repository = "https://github.com/torrust/torrust-tracker-deployer"
readme = "README.md"

[lib]
name = "torrust_dependency_installer"
name = "torrust_tracker_deployer_dependency_installer"
path = "src/lib.rs"

[[bin]]
Expand Down
Loading
Loading