feat(ansible): деплой engine + k3s DNS-моста в роли sarex_stack

This commit is contained in:
emelinda 2026-07-30 11:52:50 +03:00
parent 714dc55db1
commit 5105eee602
2 changed files with 19 additions and 0 deletions

View File

@ -49,6 +49,9 @@ compose_cmd: "docker compose"
# Сервисы приложения, поднимаемые при sarex_compose_up (depends_on тянет
# зависимости и порядок). k3s/gitea намеренно не поднимаем.
sarex_services:
# k3s + провижининг DNS-моста (нужны engine'у до старта)
- k3s-server
- processing-k8s-init
- postgres
- postgres-init
- redis
@ -62,4 +65,5 @@ sarex_services:
- frontend
- processing-api
- processing-frontend
- engine
- nginx

View File

@ -35,6 +35,21 @@
mode: "0644"
notify: Recreate backend and celery
# k3s-манифесты DNS-моста (namespace processing + Service/Endpoints postgres/minio).
# processing-k8s-init монтирует ./k3s/manifests/processing и применяет их kubectl'ом.
- name: Скопировать k3s-манифесты (DNS-мост processing)
ansible.builtin.copy:
src: "{{ deploy_src_root }}/k3s/manifests/"
dest: "{{ deploy_dir }}/k3s/manifests/"
mode: "0644"
# engine монтирует ./engine/yc-s3-service-account.json (доступ Job-подов к S3).
- name: Скопировать конфиги engine (S3 service-account)
ansible.builtin.copy:
src: "{{ deploy_src_root }}/engine/"
dest: "{{ deploy_dir }}/engine/"
mode: "0644"
# --- Секреты: генерация с персистом на control-node (идемпотентно) --------
- name: Сгенерировать/загрузить пароли (persist в secrets_store, gitignored)
ansible.builtin.set_fact: