--- # ПРЕСЕТ: Высокая доступность (6-10 машин) # # Описание: Кластер высокой доступности с репликацией и отказоустойчивостью # - 2 веб-сервера (nginx) - активный/резервный # - 2 базы данных (PostgreSQL) - мастер/слейв репликация # - 2 кэш-сервера (Redis) - кластер с репликацией # - 1 балансировщик (HAProxy) - с проверками здоровья # - 1 мониторинг (Prometheus) - контроль состояния # - 1 резервный мониторинг (Grafana) - визуализация # # Использование: make lab-test SCENARIO=universal LAB_SPEC=molecule/presets/ha.yml # # Автор: Сергей Антропов # Сайт: https://devops.org.ru docker_network: labnet images: debian: "ghcr.io/ansible-community/molecule-ubuntu-systemd:jammy" rhel: "quay.io/centos/centos:stream9-systemd" systemd_defaults: privileged: true command: "/sbin/init" volumes: - "/sys/fs/cgroup:/sys/fs/cgroup:ro" tmpfs: - "/run" - "/run/lock" capabilities: - "SYS_ADMIN" hosts: - name: haproxy group: loadbalancers family: rhel publish: - "80:80" - "443:443" - name: web1 group: webservers family: debian publish: - "8081:80" - name: web2 group: webservers family: rhel publish: - "8082:80" - name: db-master group: databases family: debian publish: - "5432:5432" - name: db-slave group: databases family: rhel publish: - "5433:5432" - name: cache1 group: caches family: debian publish: - "6379:6379" - name: cache2 group: caches family: rhel publish: - "6380:6379" - name: monitoring group: monitoring family: debian publish: - "9090:9090" - name: grafana group: monitoring family: rhel publish: - "3000:3000"