feat: add support for root domain www.abyaya.la #84

Closed
Numerica wants to merge 0 commits from root-domain into master
Owner

Add capability to route root domain (abyaya.la and www.abyaya.la)
to sutty.comun while maintaining all existing subdomain routes.

Changes:

  • Add no_wildcard flag support in certbot certificate generation
  • Split certificate obtention into two conditional paths:
    • Standard mode (with wildcard) for subdomains
    • No-wildcard mode for root domains
  • Add abyaya_root service in matrix routing to sutty.comun
  • Include implementation plan as README-root-domain.md

Technical details:

  • Certificates for root domain will only include abyaya.la and
    www.abyaya.la (no *.abyaya.la wildcard)
  • Prevents certificate confusion between root and subdomains
  • Maintains clean separation of responsibilities
  • All existing subdomain certificates remain unchanged

Generated with Claude Code

Add capability to route root domain (abyaya.la and www.abyaya.la) to sutty.comun while maintaining all existing subdomain routes. Changes: - Add no_wildcard flag support in certbot certificate generation - Split certificate obtention into two conditional paths: * Standard mode (with wildcard) for subdomains * No-wildcard mode for root domains - Add abyaya_root service in matrix routing to sutty.comun - Include implementation plan as README-root-domain.md Technical details: - Certificates for root domain will only include abyaya.la and www.abyaya.la (no *.abyaya.la wildcard) - Prevents certificate confusion between root and subdomains - Maintains clean separation of responsibilities - All existing subdomain certificates remain unchanged Generated with Claude Code
Numerica added 1 commit 2025-12-12 18:21:39 +00:00
Add capability to route root domain (abyaya.la and www.abyaya.la)
to sutty.comun while maintaining all existing subdomain routes.

Changes:
- Add no_wildcard flag support in certbot certificate generation
- Split certificate obtention into two conditional paths:
  * Standard mode (with wildcard) for subdomains
  * No-wildcard mode for root domains
- Add abyaya_root service in matrix routing to sutty.comun
- Include implementation plan as README-root-domain.md

Technical details:
- Certificates for root domain will only include abyaya.la and
  www.abyaya.la (no *.abyaya.la wildcard)
- Prevents certificate confusion between root and subdomains
- Maintains clean separation of responsibilities
- All existing subdomain certificates remain unchanged

Generated with Claude Code
Author
Owner

Aviso esto es pura IA hay que checkar

Aviso esto es pura IA hay que checkar
Author
Owner

Más IA de cómo se mergeará esto con el PR #76
(Me llama la atención que no se haga tanto problema con los domains ..?)

📊 Análisis de Merge: issue42 → root-domain

Buenas Noticias

El merge se realizará automáticamente sin conflictos. Git puede fusionar ambas ramas exitosamente.

🔍 Cambios que Traerá issue42

  1. roles/certbot/tasks/certbot.yml (Compatible ✓)

Cambio en issue42:

  • Agrega flag --expand al comando de certbot (línea 32)
  • Permite expandir certificados existentes con nuevos dominios

Integración con root-domain:

  • Se aplicará automáticamente a AMBAS tareas (with wildcard y without wildcard)
  • La tarea "with wildcard" tendrá: --expand (de issue42)
  • ⚠️ La tarea "without wildcard" NO tiene --expand actualmente

Resultado del merge:

Tarea 1: with wildcard (línea 32)

command: "--non-interactive --agree-tos --expand --email ..." # ✓ Incluye --expand

Tarea 2: without wildcard (línea 50)

command: "--non-interactive --agree-tos --email ..." # ✗ NO tiene --expand

Recomendación: Deberías agregar --expand también a la tarea "without wildcard" para mantener consistencia.

  1. abyayala.yml (Sin conflicto ✓)

Cambio en issue42:

  • Modifica servicio kipu:
    • Domain: kipu.abyaya.la → kipu.latina.red
    • Elimina force_https: yes

Integración con root-domain:

  • Sin conflicto: tu servicio abyaya_root está en línea 169-176
  • El cambio de kipu está en línea ~214
  • No se superponen
  1. roles/proxy/templates/stream.conf (No afecta)

Cambio en issue42:

  • Hardcodea server_name a usar siempre .abyaya.la:
  • server_name .{{ vhost.domains | join(' .') }};
  • server_name {{ vhost.service_name }}.abyaya.la;

Integración con root-domain:

  • No afecta porque abyaya_root no usa ports (no genera stream config)

🎯 Orden de Merge Recomendado

Opción 1: issue42 primero (Recomendado)

1. Merge issue42 a master

git checkout master
git merge issue42

2. Merge root-domain a master

git merge root-domain

Ventaja:

  • El flag --expand estará en master
  • Cuando integres root-domain, necesitarás agregar --expand manualmente a la tarea "without wildcard"

Opción 2: root-domain primero

1. Merge root-domain a master

git checkout master
git merge root-domain

2. Merge issue42 a master

git merge issue42

Desventaja:

  • El --expand solo se aplicará a la tarea "with wildcard"
  • Tendrás que agregar --expand a "without wildcard" después

⚠️ Acción Necesaria Después del Merge

Independientemente del orden, deberás actualizar la tarea "without wildcard" para incluir --expand:

  • name: fetch certificate with certbot container (without wildcard)
    docker_container:

    ...

    command: "--non-interactive --agree-tos --expand --email {{ webmaster_email }} certonly ..."

    ^^^^^^^^ Agregar esto

📋 Resumen

Aspecto Estado Acción Requerida
Conflictos de merge Ninguno No
Compatibilidad funcional Total No
Flag --expand en "without wildcard" ⚠️ Faltante Sí - Agregar manualmente
Cambios en abyaya.yml Compatible No
Templates proxy/stream No afecta No

Conclusión: El merge será limpio y funcional. Solo necesitas recordar agregar --expand a la segunda tarea de certbot después del merge.

Más IA de cómo se mergeará esto con el PR #76 (Me llama la atención que no se haga tanto problema con los domains ..?) 📊 Análisis de Merge: issue42 → root-domain ✅ Buenas Noticias El merge se realizará automáticamente sin conflictos. Git puede fusionar ambas ramas exitosamente. 🔍 Cambios que Traerá issue42 1. roles/certbot/tasks/certbot.yml (Compatible ✓) Cambio en issue42: - Agrega flag --expand al comando de certbot (línea 32) - Permite expandir certificados existentes con nuevos dominios Integración con root-domain: - ✅ Se aplicará automáticamente a AMBAS tareas (with wildcard y without wildcard) - ✅ La tarea "with wildcard" tendrá: --expand (de issue42) - ⚠️ La tarea "without wildcard" NO tiene --expand actualmente Resultado del merge: # Tarea 1: with wildcard (línea 32) command: "--non-interactive --agree-tos --expand --email ..." # ✓ Incluye --expand # Tarea 2: without wildcard (línea 50) command: "--non-interactive --agree-tos --email ..." # ✗ NO tiene --expand Recomendación: Deberías agregar --expand también a la tarea "without wildcard" para mantener consistencia. 2. abyayala.yml (Sin conflicto ✓) Cambio en issue42: - Modifica servicio kipu: - Domain: kipu.abyaya.la → kipu.latina.red - Elimina force_https: yes Integración con root-domain: - ✅ Sin conflicto: tu servicio abyaya_root está en línea 169-176 - ✅ El cambio de kipu está en línea ~214 - ✅ No se superponen 3. roles/proxy/templates/stream.conf (No afecta) Cambio en issue42: - Hardcodea server_name a usar siempre .abyaya.la: - server_name .{{ vhost.domains | join(' .') }}; + server_name {{ vhost.service_name }}.abyaya.la; Integración con root-domain: - ✅ No afecta porque abyaya_root no usa ports (no genera stream config) 🎯 Orden de Merge Recomendado Opción 1: issue42 primero (Recomendado) # 1. Merge issue42 a master git checkout master git merge issue42 # 2. Merge root-domain a master git merge root-domain Ventaja: - El flag --expand estará en master - Cuando integres root-domain, necesitarás agregar --expand manualmente a la tarea "without wildcard" Opción 2: root-domain primero # 1. Merge root-domain a master git checkout master git merge root-domain # 2. Merge issue42 a master git merge issue42 Desventaja: - El --expand solo se aplicará a la tarea "with wildcard" - Tendrás que agregar --expand a "without wildcard" después ⚠️ Acción Necesaria Después del Merge Independientemente del orden, deberás actualizar la tarea "without wildcard" para incluir --expand: - name: fetch certificate with certbot container (without wildcard) docker_container: # ... command: "--non-interactive --agree-tos --expand --email {{ webmaster_email }} certonly ..." # ^^^^^^^^ Agregar esto 📋 Resumen | Aspecto | Estado | Acción Requerida | |-------------------------------------|---------------|--------------------------| | Conflictos de merge | ✅ Ninguno | No | | Compatibilidad funcional | ✅ Total | No | | Flag --expand en "without wildcard" | ⚠️ Faltante | Sí - Agregar manualmente | | Cambios en abyaya.yml | ✅ Compatible | No | | Templates proxy/stream | ✅ No afecta | No | Conclusión: El merge será limpio y funcional. Solo necesitas recordar agregar --expand a la segunda tarea de certbot después del merge.
Author
Owner

root-domain: Merge exitoso sin conflictos

● Bash(git merge issue42)
⎿  Error: Exit code 1
Auto-fusionando roles/proxy/tasks/main.yml
CONFLICTO (contenido): Conflicto de fusión en roles/proxy/tasks/main.yml
Fusión automática falló; arregle los conflictos y luego realice un commit con el resultado.

⚠️ issue42: CONFLICTO DETECTADO en roles/proxy/tasks/main.yml

Déjame mostrarte el conflicto:

● Read(roles/proxy/tasks/main.yml)
⎿  Read 108 lines

● Conflicto en roles/proxy/tasks/main.yml (líneas 48-67):

Hay dos versiones diferentes de cómo manejar los dominios por defecto:

Versión HEAD (testing):

  • Agrega un dominio por defecto usando main_zone (variable parametrizada)
  • Verifica si existe algún dominio que termine en main_zone
  • Formato: service_name.main_zone

Versión issue42:

  • Asegura que el dominio abyaya.la esté siempre primero
  • Separa dominios abyaya.la de otros dominios
  • Formato: service_name.abyaya.la (hardcoded)
● ✅ root-domain: Merge exitoso sin conflictos ● Bash(git merge issue42) ⎿  Error: Exit code 1 Auto-fusionando roles/proxy/tasks/main.yml CONFLICTO (contenido): Conflicto de fusión en roles/proxy/tasks/main.yml Fusión automática falló; arregle los conflictos y luego realice un commit con el resultado. ● ⚠️ issue42: CONFLICTO DETECTADO en roles/proxy/tasks/main.yml Déjame mostrarte el conflicto: ● Read(roles/proxy/tasks/main.yml) ⎿  Read 108 lines ● Conflicto en roles/proxy/tasks/main.yml (líneas 48-67): Hay dos versiones diferentes de cómo manejar los dominios por defecto: Versión HEAD (testing): - Agrega un dominio por defecto usando main_zone (variable parametrizada) - Verifica si existe algún dominio que termine en main_zone - Formato: service_name.main_zone Versión issue42: - Asegura que el dominio abyaya.la esté siempre primero - Separa dominios abyaya.la de otros dominios - Formato: service_name.abyaya.la (hardcoded)
Author
Owner
Resumen de merges:

root-domain - Merge exitoso sin conflictos
issue42 - Conflicto resuelto en roles/proxy/tasks/main.yml (mantenida versión issue42)
feat-cert-auto-renewal - Merge exitoso sin conflictos
refactor-simplify-node-naming - Merge exitoso sin conflictos
feat/parametrizar_redes - Ya estaba actualizado

Todos los merges completados. La rama testing ahora está 15 commits adelante de origin/testing.
--- Resumen de merges: ✅ root-domain - Merge exitoso sin conflictos ✅ issue42 - Conflicto resuelto en roles/proxy/tasks/main.yml (mantenida versión issue42) ✅ feat-cert-auto-renewal - Merge exitoso sin conflictos ✅ refactor-simplify-node-naming - Merge exitoso sin conflictos ✅ feat/parametrizar_redes - Ya estaba actualizado Todos los merges completados. La rama testing ahora está 15 commits adelante de origin/testing.
Numerica added 1 commit 2025-12-15 15:58:22 +00:00
Rename the flag from `no_wildcard` to `root` throughout the codebase
for better semantics, and fix nginx configuration generation for root
domains.

Changes:
1. Renamed `no_wildcard` → `root` flag in:
   - abyayala.yml (abyaya_root service)
   - roles/certbot/tasks/certbot.yml (uses is_root_domain internally)
   - README-root-domain.md (documentation)

2. Fixed nginx vhost generation in roles/proxy/templates/:
   - vhost.conf: Handle root domains without leading dot in server_name
     * root: yes → `server_name abyaya.la www.abyaya.la;` (exact match)
     * root: no  → `server_name .comun.abyaya.la;` (wildcard match)
   - stream.conf: Same logic for SSH proxy streams

Problem fixed:
- Previous: `.abyaya.la` matched all subdomains, conflicting with
  other vhosts (comun.abyaya.la, sutty.abyaya.la, etc.)
- Now: `abyaya.la www.abyaya.la` matches only root domain exactly

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Numerica closed this pull request 2025-12-15 20:04:18 +00:00
Numerica deleted branch root-domain 2025-12-15 20:04:19 +00:00
Author
Owner

Funcional con acdf35e5a7 (falló exitosamente)
A qué huerta hay que apuntarlo @f?

Funcional con acdf35e5a7 (falló exitosamente) A qué huerta hay que apuntarlo @f?
Author
Owner

Notar que hubo que usar webroot para el root

Y que la primera vez hubo que ejecutar con --skip-tags=certbot y sin force_https para habilitar el webroot justamente, y a la segunda obtener el cert (en Numerica se levanta ahi un server temporal que es un bardo)

Notar que hubo que usar webroot para el root Y que la primera vez hubo que ejecutar con --skip-tags=certbot y sin force_https para habilitar el webroot justamente, y a la segunda obtener el cert (en Numerica se levanta ahi un server temporal que es un bardo)

Pull request closed

Sign in to join this conversation.
No description provided.