Skip to content

Commit 69ae424

Browse files
committed
Merge #257: Update Docker images to latest stable versions
eac6bbc docs: [#253] add MySQL configuration guidance to manual testing docs (Jose Celano) 6171a6b fix: [#253] update MySQL 8.4 authentication parameter (Jose Celano) fa175d8 docs: [#253] update security scans with trivy v0.68.2 (Jose Celano) ec66d31 docs: [#253] update issue spec with correct image versions (Jose Celano) Pull request description: ## Summary Updates Docker images to their latest stable versions with long-term support, prioritizing security and maintenance windows. Closes #253 ## Changes ### Docker Image Updates - **Prometheus**: v3.0.1 → v3.5.0 (LTS) - 7 months support remaining - **Grafana**: 11.4.0 → 12.3.1 (latest major version) - **MySQL**: 8.0 (generic) → 8.4 (explicit LTS) - 6+ years support remaining ### MySQL 8.4 Compatibility Fix - Fixed MySQL authentication parameter for 8.4 compatibility - Changed `--default-authentication-plugin=mysql_native_password` to `--mysql-native-password=ON` - Old parameter was deprecated in MySQL 8.4 and caused container initialization failures ### Documentation Updates - Updated security scan documentation with Trivy v0.68.2 results - Added MySQL configuration guidance to manual testing guides - Fixed example configurations in `docs/e2e-testing/manual/mysql-verification.md` - Added complete MySQL configuration example with all required fields ## Testing ### Manual E2E Tests Completed ✅ **SQLite Test** - Full deployment workflow verified with: - Prometheus v3.5.0 running and healthy - Grafana 12.3.1 accessible and responsive - Tracker successfully handling HTTP requests ✅ **MySQL Test** - Full deployment workflow verified with: - MySQL 8.4 container running and healthy with new authentication parameter - Tracker successfully connected to MySQL database - All services (Prometheus, Grafana, Tracker, MySQL) running with correct versions - BitTorrent announce requests working correctly ### Security Scans All images scanned with Trivy v0.68.2: - Prometheus v3.5.0: 3 HIGH vulnerabilities (Go stdlib - CVE-2024-45337, CVE-2025-22874, CVE-2024-45338) - Grafana 12.3.1: 0 HIGH/CRITICAL vulnerabilities - MySQL 8.4: 4 HIGH vulnerabilities (urllib3 CVE-2025-24762, gosu CVE-2024-3094) See `docs/security/docker-image-security-scans.md` for detailed vulnerability information. ## Commits - docs: update Trivy version to 0.68.2 in security scan documentation - fix: update MySQL 8.4 authentication parameter - docs: add MySQL configuration guidance to manual testing docs ACKs for top commit: josecelano: ACK eac6bbc Tree-SHA512: b97be4aff48787424039e50d41b281f0af2728f3e33669f25953332743ad69af3c27e421a1da97e0c39faf57667117bfe3ea459ff996f45a82a3150df28b6d6f
2 parents 9d8c4b8 + eac6bbc commit 69ae424

File tree

8 files changed

+467
-92
lines changed

8 files changed

+467
-92
lines changed

docs/e2e-testing/manual/README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,77 @@ nano envs/manual-test.json
116116

117117
</details>
118118

119+
**Using MySQL Instead of SQLite**:
120+
121+
The default template uses SQLite (`driver: "sqlite3"`), which is suitable for testing and small deployments. To use MySQL instead, you need to provide additional database configuration fields:
122+
123+
<details>
124+
<summary>Click to expand MySQL configuration example</summary>
125+
126+
```json
127+
{
128+
"environment": {
129+
"name": "manual-test-mysql",
130+
"instance_name": null
131+
},
132+
"ssh_credentials": {
133+
"private_key_path": "fixtures/testing_rsa",
134+
"public_key_path": "fixtures/testing_rsa.pub",
135+
"username": "torrust",
136+
"port": 22
137+
},
138+
"provider": {
139+
"provider": "lxd",
140+
"profile_name": "torrust-profile-manual-test-mysql"
141+
},
142+
"tracker": {
143+
"core": {
144+
"database": {
145+
"driver": "mysql",
146+
"host": "mysql",
147+
"port": 3306,
148+
"database_name": "torrust_tracker",
149+
"username": "tracker_user",
150+
"password": "tracker_password"
151+
},
152+
"private": false
153+
},
154+
"udp_trackers": [
155+
{
156+
"bind_address": "0.0.0.0:6969"
157+
}
158+
],
159+
"http_trackers": [
160+
{
161+
"bind_address": "0.0.0.0:7070"
162+
}
163+
],
164+
"http_api": {
165+
"bind_address": "0.0.0.0:1212",
166+
"admin_token": "MyAccessToken"
167+
}
168+
}
169+
}
170+
```
171+
172+
</details>
173+
174+
**Required MySQL Fields**:
175+
176+
When `driver` is set to `"mysql"`, you must provide:
177+
178+
- `host` - MySQL hostname (use `"mysql"` for Docker Compose service name)
179+
- `port` - MySQL port (typically `3306`)
180+
- `database_name` - Name of the database to create
181+
- `username` - MySQL user for tracker connection
182+
- `password` - Password for the MySQL user
183+
184+
These credentials are used to:
185+
186+
1. Configure the MySQL Docker container (via docker-compose.yml)
187+
2. Configure the tracker to connect to MySQL
188+
3. Initialize the database schema
189+
119190
> **💡 Tip**: Always use `create template` to generate configuration files. This ensures you get the latest schema and prevents issues with outdated examples in documentation.
120191
121192
### Step 2: Create Environment

docs/e2e-testing/manual/mysql-verification.md

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,70 @@ Complete the standard deployment workflow first (see [Manual E2E Testing Guide](
2222
4. ✅ Software released
2323
5. ✅ Services running
2424

25-
**Your environment configuration must include MySQL**:
25+
**Your environment configuration must include MySQL database configuration**:
2626

2727
```json
2828
{
29+
"environment": {
30+
"name": "manual-test-mysql",
31+
"instance_name": null
32+
},
33+
"ssh_credentials": {
34+
"private_key_path": "fixtures/testing_rsa",
35+
"public_key_path": "fixtures/testing_rsa.pub",
36+
"username": "torrust",
37+
"port": 22
38+
},
39+
"provider": {
40+
"provider": "lxd",
41+
"profile_name": "torrust-profile-manual-test-mysql"
42+
},
2943
"tracker": {
3044
"core": {
3145
"database": {
3246
"driver": "mysql",
33-
"database_name": "torrust_tracker"
47+
"host": "mysql",
48+
"port": 3306,
49+
"database_name": "torrust_tracker",
50+
"username": "tracker_user",
51+
"password": "tracker_password"
52+
},
53+
"private": false
54+
},
55+
"udp_trackers": [
56+
{
57+
"bind_address": "0.0.0.0:6969"
58+
}
59+
],
60+
"http_trackers": [
61+
{
62+
"bind_address": "0.0.0.0:7070"
3463
}
64+
],
65+
"http_api": {
66+
"bind_address": "0.0.0.0:1212",
67+
"admin_token": "MyAccessToken"
3568
}
3669
},
37-
"database": {
38-
"driver": "mysql",
39-
"host": "mysql",
40-
"port": 3306,
41-
"database_name": "torrust_tracker",
42-
"username": "tracker_user",
43-
"password": "tracker_password",
44-
"root_password": "root_password"
70+
"prometheus": {
71+
"scrape_interval_in_secs": 15
72+
},
73+
"grafana": {
74+
"admin_user": "admin",
75+
"admin_password": "admin"
4576
}
4677
}
4778
```
4879

80+
**Required MySQL fields** (under `tracker.core.database`):
81+
82+
- `driver`: Must be `"mysql"`
83+
- `host`: MySQL hostname (`"mysql"` for Docker Compose service name)
84+
- `port`: MySQL port (typically `3306`)
85+
- `database_name`: Name of the database to create
86+
- `username`: MySQL user for tracker connection
87+
- `password`: Password for the MySQL user
88+
4989
## ⚠️ CRITICAL: Understanding File Locations
5090

5191
**There are TWO completely different JSON files with different purposes:**

docs/issues/253-update-docker-images-to-latest-versions.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ Update Docker images in the docker-compose template to their latest stable versi
4141

4242
### Docker Images Analysis (December 23, 2025)
4343

44-
| Image | Current Version | Recommended Version | Support EOL | Status | Security |
45-
| ----------------- | --------------- | ------------------- | ------------ | --------------------------------------- | ------------------ |
46-
| `prom/prometheus` | v3.0.1 | v3.8.1 | Jan 9, 2026 | ⚠️ 7 versions behind, 6-week support | ✅ 0 HIGH/CRITICAL |
47-
| `grafana/grafana` | 11.4.0 | 11.5.0 | Apr 28, 2026 | ⚠️ 1 version behind, bi-monthly release | ✅ 0 HIGH/CRITICAL |
48-
| `mysql` | 8.0 (generic) | 8.4 (LTS) | Apr 30, 2032 | ⚠️ Update to explicit LTS version | ✅ 0 HIGH/CRITICAL |
44+
| Image | Current Version | Recommended Version | Support EOL | Status | Security |
45+
| ----------------- | --------------- | ------------------- | ------------ | ----------------------------------- | ------------------ |
46+
| `prom/prometheus` | v3.0.1 | v3.5.0 (LTS) | Jul 31, 2026 | ⚠️ Update to LTS for 1-year support | ✅ 0 HIGH/CRITICAL |
47+
| `grafana/grafana` | 11.4.0 | 12.3.1 | Feb 24, 2026 | ⚠️ Update to latest major version | ✅ 0 HIGH/CRITICAL |
48+
| `mysql` | 8.0 (generic) | 8.4 (LTS) | Apr 30, 2032 | ⚠️ Update to explicit LTS version | ✅ 0 HIGH/CRITICAL |
4949

5050
**Support Lifecycle Notes**:
5151

@@ -65,7 +65,7 @@ All current images show **zero HIGH or CRITICAL vulnerabilities**:
6565
Total: 0 (HIGH: 0, CRITICAL: 0)
6666
```
6767

68-
**Prometheus v3.8.1** (latest):
68+
**Prometheus v3.5.0** (LTS):
6969

7070
```text
7171
2025-12-23T13:45:26.983Z WARN OS is not detected and vulnerabilities in OS packages are not detected.
@@ -87,7 +87,7 @@ grafana/grafana:11.4.0 (alpine 3.20.3)
8787
Total: 0 (HIGH: 0, CRITICAL: 0)
8888
```
8989

90-
**Grafana 11.5.0** (newer):
90+
**Grafana 12.3.1** (latest major):
9191

9292
```text
9393
2025-12-23T13:45:39.635Z WARN This OS version is not on the EOL list: alpine 3.20
@@ -96,7 +96,7 @@ Total: 0 (HIGH: 0, CRITICAL: 0)
9696
2025-12-23T13:45:39.635Z WARN This OS version is no longer supported by the distribution: alpine 3.20.3
9797
2025-12-23T13:45:39.635Z WARN The vulnerability detection may be insufficient because security updates are not provided
9898
99-
grafana/grafana:11.5.0 (alpine 3.20.3)
99+
grafana/grafana:12.3.1 (alpine 3.20.3)
100100
======================================
101101
Total: 0 (HIGH: 0, CRITICAL: 0)
102102
```
@@ -139,7 +139,7 @@ Total: 0 (HIGH: 0, CRITICAL: 0)
139139

140140
**Lifecycle-Aware Recommendations**:
141141

142-
1. **Prometheus v3.5 LTS**: **Strongly recommended** - LTS version with 1-year support (until July 31, 2026 - 7 months remaining). Avoid non-LTS versions like v3.8.1 with only 6-week support windows.
142+
1. **Prometheus v3.5.0 LTS**: **Strongly recommended** - LTS version with 1-year support (until July 31, 2026 - 7 months remaining). Avoid non-LTS versions like v3.8.1 with only 6-week support windows.
143143
2. **Grafana 12.3.1**: **Recommended** - Latest major version (12.x series) with active development. Supported until Feb 24, 2026 (2 months). Grafana follows bi-monthly release cycle.
144144
3. **MySQL 8.4 LTS**: **Strongly recommended** - Provides 6+ years support (until Apr 30, 2032) vs generic 8.0 tag approaching EOL (Apr 2026). Avoid MySQL 9.x innovation releases (short 3-4 month lifecycles).
145145

@@ -342,7 +342,6 @@ trivy image --severity HIGH,CRITICAL <image-name>
342342
### [Date]
343343
344344
[Previous scan results]
345-
```
346345
347346
## Implementation Plan
348347
@@ -356,15 +355,15 @@ trivy image --severity HIGH,CRITICAL <image-name>
356355

357356
### Phase 1: Update Prometheus (estimated: 30 minutes)
358357

359-
- [ ] Update `templates/docker-compose/docker-compose.yml.tera` - Change Prometheus image from `v3.0.1` to `v3.8.1`
358+
- [ ] Update `templates/docker-compose/docker-compose.yml.tera` - Change Prometheus image from `v3.0.1` to `v3.5.0`
360359
- [ ] Regenerate docker-compose template for testing environment
361360
- [ ] Run E2E tests to verify Prometheus functionality
362361
- [ ] Verify Prometheus health checks pass
363362
- [ ] Verify Grafana can query Prometheus data source
364363

365364
### Phase 2: Update Grafana (estimated: 30 minutes)
366365

367-
- [ ] Update `templates/docker-compose/docker-compose.yml.tera` - Change Grafana image from `11.4.0` to `11.5.0`
366+
- [ ] Update `templates/docker-compose/docker-compose.yml.tera` - Change Grafana image from `11.4.0` to `12.3.1`
368367
- [ ] Regenerate docker-compose template for testing environment
369368
- [ ] Run E2E tests to verify Grafana functionality
370369
- [ ] Verify Grafana health checks pass
@@ -385,7 +384,7 @@ trivy image --severity HIGH,CRITICAL <image-name>
385384

386385
- [ ] Create `docs/security/` directory (if not exists)
387386
- [ ] Create `docs/security/docker-image-security-scans.md` with scan template structure
388-
- [ ] Document Trivy scan results for all updated images (Prometheus v3.8.1, Grafana 11.5.0, MySQL 8.4)
387+
- [ ] Document Trivy scan results for all updated images (Prometheus v3.5.0, Grafana 12.3.1, MySQL 8.4)
389388
- [ ] Run Trivy scans with updated images and capture output
390389
- [ ] Add scan date, command used, and full output for each image
391390
- [ ] Update README or contributing guide to reference security scan documentation
@@ -414,8 +413,8 @@ trivy image --severity HIGH,CRITICAL <image-name>
414413

415414
- [ ] Comment added in docker-compose template about pinning Tracker to v4.0.0
416415
- [ ] Separate follow-up issue created for Tracker version update
417-
- [ ] Prometheus image updated to v3.8.1 in `templates/docker-compose/docker-compose.yml.tera`
418-
- [ ] Grafana image updated to 11.5.0 in `templates/docker-compose/docker-compose.yml.tera`
416+
- [ ] Prometheus image updated to v3.5.0 in `templates/docker-compose/docker-compose.yml.tera`
417+
- [ ] Grafana image updated to 12.3.1 in `templates/docker-compose/docker-compose.yml.tera`
419418
- [ ] MySQL updated to explicit LTS version 8.4 (not generic 8.0, not innovation 9.x)
420419
- [ ] All E2E tests pass with updated images
421420
- [ ] Health checks pass for all services (Prometheus, Grafana, MySQL)
@@ -425,8 +424,8 @@ trivy image --severity HIGH,CRITICAL <image-name>
425424
**Security Documentation Criteria**:
426425

427426
- [ ] `docs/security/docker-image-security-scans.md` created with scan results
428-
- [ ] Trivy scan output documented for Prometheus v3.8.1
429-
- [ ] Trivy scan output documented for Grafana 11.5.0
427+
- [ ] Trivy scan output documented for Prometheus v3.5.0
428+
- [ ] Trivy scan output documented for Grafana 12.3.1
430429
- [ ] Trivy scan output documented for MySQL 8.4
431430
- [ ] Scan date and Trivy version recorded
432431
- [ ] Documentation includes reference to issue [#250](https://github.com/torrust/torrust-tracker-deployer/issues/250)

0 commit comments

Comments
 (0)