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
refactor: rename VM instance from 'torrust-vm' to 'torrust-tracker-vm'
- Update Ansible inventory template with new instance name
- Update all hardcoded references in Rust source code
- Update test assertions and mock data
- Update documentation and GitHub workflows
- Update OpenTofu variable references in comments
- Maintain backward compatibility while preparing for multiple Torrust application VMs
All linters, unit tests, and core e2e functionality verified to work with the new naming.
Copy file name to clipboardExpand all lines: docs/refactors/instance-name-parameterization.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Overview
4
4
5
-
This refactor aims to eliminate hardcoded "torrust-vm" instance names throughout the codebase and replace them with parameterized values. The goal is to enable dynamic instance naming for different environments and support running multiple instances simultaneously.
5
+
This refactor aims to eliminate hardcoded "torrust-tracker-vm" instance names throughout the codebase and replace them with parameterized values. The goal is to enable dynamic instance naming for different environments and support running multiple instances simultaneously.
6
6
7
7
## 📊 Progress Status
8
8
@@ -45,7 +45,7 @@ This refactor aims to eliminate hardcoded "torrust-vm" instance names throughout
45
45
All planned phases for instance name parameterization have been successfully implemented. The refactor is complete with the following achievements:
46
46
47
47
-**Instance names are now configurable** through the `Config` struct and E2E test environment
48
-
-**Hardcoded "torrust-vm" values eliminated** from key infrastructure components
48
+
-**Hardcoded "torrust-tracker-vm" values eliminated** from key infrastructure components
49
49
-**Template system supports dynamic instance naming** via Tera templating
50
50
-**E2E tests can use custom instance names** while maintaining backward compatibility
51
51
-**All quality gates passed**: linters, unit tests, and e2e tests successful
@@ -71,7 +71,7 @@ All planned phases for instance name parameterization have been successfully imp
71
71
- ✅ Create `templates/tofu/lxd/variables.tfvars` template file to define `instance_name` variable
72
72
- ✅ Update `TofuTemplateRenderer` to include this file in static template copying
73
73
- ✅ Keep `image` variable static (not templated)
74
-
-**Status**: Static variables file created with hardcoded "torrust-vm" value
74
+
-**Status**: Static variables file created with hardcoded "torrust-tracker-vm" value
75
75
-**Validation**: ✅ Unit tests + linters + e2e tests passed
76
76
77
77
#### Step 1b: Update OpenTofu client for variables file ✅
@@ -112,9 +112,9 @@ All planned phases for instance name parameterization have been successfully imp
112
112
- ✅ Created `render_variables_template()` method for dynamic rendering
113
113
- ✅ Updated `render_tera_templates()` to call variables template rendering
114
114
- ✅ Removed `variables.tfvars` from static template files list
115
-
- ✅ Added hardcoded "torrust-vm" values for backward compatibility
115
+
- ✅ Added hardcoded "torrust-tracker-vm" values for backward compatibility
116
116
- ✅ Updated all test constructors to include `instance_name` parameter
117
-
-**Status**: Variables template now dynamically renders with `instance_name = "torrust-vm"`
117
+
-**Status**: Variables template now dynamically renders with `instance_name = "torrust-tracker-vm"`
118
118
-**Validation**: ✅ All linters + unit tests + e2e tests passed
119
119
120
120
### Phase 3: Context Integration ✅
@@ -137,7 +137,7 @@ Instead of the originally planned `TofuContext` approach, we implemented instanc
137
137
- ✅ Added `instance_name` parameter to `TestEnvironment::with_ssh_user()` in `src/e2e/environment.rs`
138
138
- ✅ Updated `TestEnvironment::with_ssh_user_and_init()` to accept `instance_name` parameter
139
139
- ✅ Updated `create_config()` helper function to accept `instance_name` parameter
140
-
- ✅ Maintained backward compatibility with existing `new()` functions using hardcoded "torrust-vm"
140
+
- ✅ Maintained backward compatibility with existing `new()` functions using hardcoded "torrust-tracker-vm"
141
141
-**Status**: E2E test infrastructure can now create environments with custom instance names
142
142
-**Validation**: ✅ All linters + unit tests + e2e tests passed
143
143
@@ -147,7 +147,7 @@ Instead of the originally planned `TofuContext` approach, we implemented instanc
147
147
148
148
- ✅ Updated `TestEnvironment::new()` method in `src/e2e/environment.rs` to accept `instance_name: &str` parameter
149
149
- ✅ Updated `TestEnvironment::new_and_init()` method to accept `instance_name` parameter
150
-
- ✅ Added `instance_name` variable in `main()` function of `src/bin/e2e_tests.rs` with hardcoded "torrust-vm" value
150
+
- ✅ Added `instance_name` variable in `main()` function of `src/bin/e2e_tests.rs` with hardcoded "torrust-tracker-vm" value
151
151
- ✅ Updated method call to pass `instance_name` from main to `TestEnvironment::new()`
152
152
- ✅ Added proper documentation with `# Panics` section for clippy compliance
153
153
- ✅ Updated documentation example in `src/e2e/tasks/preflight_cleanup.rs` to use new signature
@@ -169,7 +169,7 @@ The implementation evolved from the original plan due to codebase changes:
0 commit comments