mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-30 15:28:12 +02:00
Refactor: migrate cmp/* and srv/* roles into sys-stk/* and sys-svc/* namespaces
- Removed obsolete 'cmp' category, introduced 'stk' category (fa-bars-staggered icon). - Renamed roles: * cmp-db-docker → sys-stk-back-stateful * cmp-docker-oauth2 → sys-stk-back-stateless * srv-domain-provision → sys-stk-front * cmp-db-docker-proxy → sys-stk-full-stateful * cmp-docker-proxy → sys-stk-full-stateless * cmp-rdbms → sys-svc-rdbms - Updated all include_role references, vars, templates and README.md files. - Adjusted run_once comments and variable paths accordingly. - Updated all web-app roles to use new sys-stk/* and sys-svc/* roles. Conversation: https://chatgpt.com/share/68b0ba66-09f8-800f-86fc-76c47009d431
This commit is contained in:
25
roles/sys-stk-back-stateful/README.md
Normal file
25
roles/sys-stk-back-stateful/README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Database Docker Composition
|
||||
|
||||
This role combines the central RDBMS role (`sys-svc-rdbms`) with Docker Compose to deliver a ready-to-use containerized database environment.
|
||||
|
||||
## Features
|
||||
|
||||
- **Central RDBMS Integration**
|
||||
Includes the `sys-svc-rdbms` role, which handles backups, restores, user and permission management for your relational database system (PostgreSQL, MariaDB, etc.).
|
||||
|
||||
- **Docker Compose**
|
||||
Utilizes the standalone `docker-compose` role to define and bring up containers, networks, and volumes automatically.
|
||||
|
||||
- **Variable Load Order**
|
||||
1. Docker Compose variables (`roles/docker-compose/vars/docker-compose.yml`)
|
||||
2. Database variables (`roles/sys-svc-rdbms/vars/database.yml`)
|
||||
Ensures compose ports and volumes are defined before the database role consumes them.
|
||||
|
||||
The role will load both sub-roles and satisfy all dependencies transparently.
|
||||
|
||||
## Task Breakdown
|
||||
|
||||
1. **Set Fact** `database_application_id` to work around lazy‐loading ordering.
|
||||
2. **Include Vars** in the specified order.
|
||||
3. **Invoke** `docker-compose` role to create containers, networks, and volumes.
|
||||
4. **Invoke** `sys-svc-rdbms` role to provision the database, backups, and users.
|
17
roles/sys-stk-back-stateful/meta/main.yml
Normal file
17
roles/sys-stk-back-stateful/meta/main.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
galaxy_info:
|
||||
author: "Kevin Veen-Birkenbach"
|
||||
description: >
|
||||
Combines Docker Compose with a central RDBMS role to automatically
|
||||
provision database containers with backup, user, and permission management.
|
||||
company: |
|
||||
Kevin Veen-Birkenbach
|
||||
Consulting & Coaching Solutions
|
||||
https://www.veen.world
|
||||
license: "Infinito.Nexus NonCommercial License"
|
||||
license_url: "https://s.infinito.nexus/license"
|
||||
galaxy_tags:
|
||||
- docker
|
||||
- database
|
||||
- rdbms
|
||||
- backup
|
||||
- compose
|
19
roles/sys-stk-back-stateful/tasks/main.yml
Normal file
19
roles/sys-stk-back-stateful/tasks/main.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
# run_once_sys_stk_back_stateful: disabled
|
||||
|
||||
- name: "For '{{ application_id }}': Set database_application_id (Needed due to lazzy loading issue)"
|
||||
set_fact:
|
||||
database_application_id: "{{ application_id }}"
|
||||
|
||||
- name: "For '{{ application_id }}': Load database variables"
|
||||
include_vars: "{{ item }}"
|
||||
loop:
|
||||
- "{{ DOCKER_VARS_FILE }}" # Important to load docker variables first so that database can use them
|
||||
- "{{ DATABASE_VARS_FILE }}" # Important to load them before docker role so that backup can use them
|
||||
|
||||
- name: "For '{{ application_id }}': Load central RDBMS"
|
||||
include_role:
|
||||
name: sys-svc-rdbms
|
||||
|
||||
- name: "For '{{ application_id }}': Load sys-stk-back-stateless"
|
||||
include_role:
|
||||
name: sys-stk-back-stateless
|
1
roles/sys-stk-back-stateful/vars/main.yml
Normal file
1
roles/sys-stk-back-stateful/vars/main.yml
Normal file
@@ -0,0 +1 @@
|
||||
DATABASE_VARS_FILE: "{{ playbook_dir }}/roles/sys-svc-rdbms/vars/database.yml"
|
Reference in New Issue
Block a user