Compare commits
2 Commits
80f98a9c4b
...
043f97ebac
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
043f97ebac | ||
|
|
134eceee0f |
61
docs/superpowers/plans/2026-04-01-docker-redeployment.md
Normal file
61
docs/superpowers/plans/2026-04-01-docker-redeployment.md
Normal file
@@ -0,0 +1,61 @@
|
||||
# Docker Service Redeployment Implementation Plan
|
||||
|
||||
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||
|
||||
**Goal:** Redeploy Docker services on `docker-host11` to update Jellyfin to version 10.11 and Gitea to version 1.24-rootless.
|
||||
|
||||
**Architecture:** Use the existing Ansible `docker.yaml` playbook and `docker_host` role to update the `compose.yaml` template on the target host, which triggers handlers to restart and recreate the containers with new images.
|
||||
|
||||
**Tech Stack:** Ansible, Docker, Docker Compose, Jinja2.
|
||||
|
||||
---
|
||||
|
||||
### Task 1: Verify Host Connectivity
|
||||
|
||||
**Files:**
|
||||
- Read: `vars/docker.ini`
|
||||
|
||||
- [ ] **Step 1: Run Ansible ping to verify connectivity**
|
||||
|
||||
Run: `ansible -i vars/docker.ini docker_host -m ping`
|
||||
Expected: `docker-host11 | SUCCESS => {"ping": "pong"}`
|
||||
|
||||
- [ ] **Step 2: Check current running versions (baseline)**
|
||||
|
||||
Run: `ansible -i vars/docker.ini docker_host -m shell -a "docker ps --format '{{.Names}}: {{.Image}}'"`
|
||||
Expected: `jellyfin: jellyfin/jellyfin:10.10` and `gitea: gitea/gitea:1.23-rootless` (or currently running versions).
|
||||
|
||||
### Task 2: Execute Redeployment Playbook
|
||||
|
||||
**Files:**
|
||||
- Read: `playbooks/docker.yaml`
|
||||
- Read: `vars/group_vars/docker/docker.yaml` (already modified with new versions)
|
||||
|
||||
- [ ] **Step 1: Run the full Docker deployment playbook**
|
||||
|
||||
Run: `ansible-playbook -i vars/docker.ini playbooks/docker.yaml`
|
||||
Expected: Playbook completes with `changed` for the `docker_host` role (template task) and `ok` for others.
|
||||
|
||||
- [ ] **Step 2: Commit changes to the repository**
|
||||
|
||||
```bash
|
||||
git add vars/group_vars/docker/docker.yaml
|
||||
git commit -m "chore: update jellyfin to 10.11 and gitea to 1.24-rootless"
|
||||
```
|
||||
|
||||
### Task 3: Verify Post-Deployment State
|
||||
|
||||
**Files:**
|
||||
- N/A
|
||||
|
||||
- [ ] **Step 1: Verify new versions are running**
|
||||
|
||||
Run: `ansible -i vars/docker.ini docker_host -m shell -a "docker ps --format '{{.Names}}: {{.Image}}'"`
|
||||
Expected:
|
||||
- `jellyfin: jellyfin/jellyfin:10.11`
|
||||
- `gitea: gitea/gitea:1.24-rootless`
|
||||
|
||||
- [ ] **Step 2: Verify container health status**
|
||||
|
||||
Run: `ansible -i vars/docker.ini docker_host -m shell -a "docker ps --format '{{.Names}}: {{.Status}}'"`
|
||||
Expected: Both containers show `Up` and `(healthy)` (if healthchecks are active).
|
||||
@@ -0,0 +1,40 @@
|
||||
# Design Specification: Docker Service Redeployment (Jellyfin & Gitea Updates)
|
||||
|
||||
## 1. Goal
|
||||
Redeploy Docker services on the `docker-host11` host to apply image version updates:
|
||||
- **Jellyfin:** `10.10` → `10.11`
|
||||
- **Gitea:** `1.23-rootless` → `1.24-rootless`
|
||||
|
||||
## 2. Context
|
||||
The `vars/group_vars/docker/docker.yaml` file has been modified with new image versions. These changes need to be applied via the existing Ansible infrastructure.
|
||||
|
||||
## 3. Implementation Approach: Full Playbook Execution
|
||||
This approach ensures the entire state of the Docker host matches the defined configuration.
|
||||
|
||||
### 3.1 Targeted Components
|
||||
- **Inventory:** `vars/docker.ini`
|
||||
- **Playbook:** `playbooks/docker.yaml`
|
||||
- **Target Host:** `docker-host11`
|
||||
|
||||
### 3.2 Workflow Details
|
||||
1. **Host Verification:** Confirm accessibility of `docker-host11` via Ansible.
|
||||
2. **Playbook Execution:** Run `ansible-playbook -i vars/docker.ini playbooks/docker.yaml`.
|
||||
3. **Template Application:** The `docker_host` role will update `/opt/docker/compose/compose.yaml` using the `compose.yaml.j2` template.
|
||||
4. **Trigger Handlers:** The `template` task triggers:
|
||||
- `Restart docker`
|
||||
- `Restart compose`
|
||||
5. **Container Recreation:** Docker Compose will detect the image change, pull the new images, and recreate the containers.
|
||||
|
||||
## 4. Success Criteria & Verification
|
||||
- **Criteria 1:** Playbook completes without failure.
|
||||
- **Criteria 2:** Jellyfin container is running image `jellyfin/jellyfin:10.11`.
|
||||
- **Criteria 3:** Gitea container is running image `gitea/gitea:1.24-rootless`.
|
||||
|
||||
### Verification Steps
|
||||
- Run `ansible -i vars/docker.ini docker_host -m shell -a "docker ps --format '{{.Names}}: {{.Image}}'"` to verify running versions.
|
||||
- Check service availability via HTTP (if accessible).
|
||||
|
||||
## 5. Potential Risks
|
||||
- **Service Downtime:** Containers will restart during image update.
|
||||
- **Pull Failures:** Depends on external network connectivity to Docker Hub / registries.
|
||||
- **Breaking Changes:** Version upgrades may have internal migration steps (standard for Jellyfin/Gitea).
|
||||
@@ -11,7 +11,7 @@ services:
|
||||
vm:
|
||||
- docker-host11
|
||||
container_name: jellyfin
|
||||
image: jellyfin/jellyfin:10.10
|
||||
image: jellyfin/jellyfin:10.11
|
||||
volumes:
|
||||
- name: "Configuration"
|
||||
internal: /config
|
||||
@@ -41,7 +41,7 @@ services:
|
||||
vm:
|
||||
- docker-host11
|
||||
container_name: gitea
|
||||
image: gitea/gitea:1.23-rootless
|
||||
image: gitea/gitea:1.24-rootless
|
||||
volumes:
|
||||
- name: "Configuration"
|
||||
internal: /etc/gitea
|
||||
|
||||
Reference in New Issue
Block a user