You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/dependency-installer/README.md
+83-47Lines changed: 83 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,28 @@
2
2
3
3
This package provides dependency detection and installation utilities for the Torrust Tracker Deployer project.
4
4
5
+
## Design Philosophy
6
+
7
+
**This is an internal automation tool** - Its primary purpose is to check dependencies in CI/CD pipelines and automated workflows. As such, it uses **structured logging only** (via the `tracing` crate) rather than user-facing console output.
8
+
9
+
This design choice offers several benefits:
10
+
11
+
-**Automation-friendly**: Structured logs are easy to parse and filter programmatically
12
+
-**Consistent**: Same output format as the rest of the Torrust ecosystem
13
+
-**Simple**: The tool is straightforward enough that logging output is sufficient even for manual use
14
+
-**Observable**: Rich contextual information through structured fields
15
+
16
+
For manual usage, you can control log verbosity with the `--verbose` flag or `RUST_LOG` environment variable.
17
+
5
18
## Features
6
19
7
-
-**Tool Detection**: Check if required development tools are installed
8
-
-**Extensible**: Easy to add new tool detectors
9
-
-**Logging**: Built-in tracing support for observability
20
+
-**Dependency Detection**: Check if required development tools are installed
21
+
-**Extensible**: Easy to add new dependency detectors
22
+
-**Structured Logging**: Built-in tracing support for observability and automation
23
+
-**Type-Safe**: Uses strongly-typed enums for dependencies
2025-11-04T17:33:20.959855Z INFO torrust_dependency_installer::handlers::check: Checking specific dependency dependency=opentofu
88
+
2025-11-04T17:33:20.960473Z INFO torrust_dependency_installer::detector::opentofu: OpenTofu is not installed dependency="opentofu"
89
+
2025-11-04T17:33:20.960482Z INFO torrust_dependency_installer::handlers::check: Dependency is not installed dependency="OpenTofu" status="not installed"
90
+
Error: Check command failed: Failed to check specific dependency: opentofu: not installed
91
+
92
+
# List all dependencies
71
93
$ dependency-installer list
72
-
Available tools:
73
-
74
-
- cargo-machete (installed)
75
-
- OpenTofu (not installed)
76
-
- Ansible (not installed)
77
-
- LXD (installed)
94
+
2025-11-04T17:33:20.960482Z INFO torrust_dependency_installer::handlers::list: Available dependency dependency="cargo-machete" status="installed"
95
+
2025-11-04T17:33:20.960494Z INFO torrust_dependency_installer::handlers::list: Available dependency dependency="OpenTofu" status="not installed"
96
+
2025-11-04T17:33:20.960962Z INFO torrust_dependency_installer::handlers::list: Available dependency dependency="Ansible" status="not installed"
97
+
2025-11-04T17:33:20.961521Z INFO torrust_dependency_installer::handlers::list: Available dependency dependency="LXD" status="installed"
98
+
99
+
# Enable verbose logging (includes DEBUG level)
100
+
$ dependency-installer check --verbose
101
+
2025-11-04T17:33:20.959872Z DEBUG torrust_dependency_installer::detector::cargo_machete: Checking if cargo-machete is installed dependency="cargo-machete"
102
+
...
78
103
```
79
104
80
-
#### Tool Aliases
105
+
#### Dependency Names
81
106
82
-
The CLI accepts multiple aliases for tools:
107
+
The CLI accepts the following dependency names:
83
108
84
-
-`cargo-machete`or `machete`
85
-
-`opentofu`or `tofu`
86
-
-`ansible`
87
-
-`lxd`
109
+
- `cargo-machete`- Rust dependency analyzer
110
+
- `opentofu`- Infrastructure provisioning tool
111
+
- `ansible` - Configuration management tool
112
+
- `lxd` - Lightweight VM manager
88
113
89
114
### Library Usage
90
115
@@ -94,33 +119,44 @@ The CLI accepts multiple aliases for tools:
94
119
use torrust_dependency_installer::DependencyManager;
0 commit comments