feat: добавлена пометка типа операции (Build/Push) в истории сборок Dockerfile

- Добавлена колонка 'Тип' во все таблицы истории сборок
- Для push операций отображается registry вместо платформ
- Сохранение пользователя при создании push лога
- Исправлена ошибка с logger в push_docker_image endpoint
- Улучшено отображение истории сборок с визуальными индикаторами
This commit is contained in:
Сергей Антропов
2026-02-15 22:59:02 +03:00
parent 23e1a6037b
commit 1fbf9185a2
232 changed files with 38075 additions and 5 deletions

106
app/alembic/presets/cod.yml Normal file
View File

@@ -0,0 +1,106 @@
---
# COD пресет с 6 контейнерами (Ubuntu + Debian + Alt + Astra + CentOS + RHEL)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
# Описание: Пресет для тестирования ролей на различных ОС
# Использует образы Ubuntu, Debian, Alt, Astra, CentOS, RHEL (все ARM64)
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# Используем стабильные образы Ubuntu, Debian, Alt, Astra, CentOS, RHEL (все ARM64)
images:
ubuntu: "inecs/ansible-lab:ubuntu22-latest"
debian: "inecs/ansible-lab:debian12-latest"
alt: "inecs/ansible-lab:alt10-latest"
astra: "inecs/ansible-lab:astra-linux-arm64-latest" # ARM64 образ
centos: "inecs/ansible-lab:centos9-latest" # ARM64 образ
rhel: "inecs/ansible-lab:rhel-latest" # ARM64 образ
# Настройки для ARM64
# Используем нативные ARM64 образы
platform: "linux/arm64"
# Настройки Docker для ARM64
docker_options:
platform: "linux/arm64"
systemd_defaults:
privileged: true
command: "/bin/bash -c \"while true; do sleep 30; done\""
platform: "linux/arm64" # Используем ARM64
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
# Принудительная установка платформы для всех операций Docker
docker_platform: "linux/amd64"
hosts:
# =============================================================================
# UBUNTU СЕРВЕРЫ
# =============================================================================
#- name: ubuntu1
# family: ubuntu
# groups: [cod, ubuntu]
# platform: "linux/arm64" # Используем ARM64
# docker_options:
# platform: "linux/arm64"
# docker_platform: "linux/arm64"
# =============================================================================
# DEBIAN СЕРВЕРЫ
# =============================================================================
#- name: debian1
# family: debian
# groups: [cod, debian]
# platform: "linux/arm64" # Используем ARM64
# docker_options:
# platform: "linux/arm64"
# docker_platform: "linux/arm64"
# =============================================================================
# ALT СЕРВЕРЫ
# =============================================================================
- name: alt1
family: alt
groups: [cod, alt]
platform: "linux/arm64" # Используем ARM64
docker_options:
platform: "linux/arm64"
docker_platform: "linux/arm64"
# =============================================================================
# ASTRA СЕРВЕРЫ (ARM64)
# =============================================================================
- name: astra1
family: astra
groups: [cod, astra]
platform: "linux/arm64" # Используем ARM64
docker_options:
platform: "linux/arm64"
docker_platform: "linux/arm64"
# =============================================================================
# CENTOS СЕРВЕРЫ (ARM64)
# =============================================================================
#- name: centos1
# family: centos
# groups: [cod, centos]
# platform: "linux/arm64" # Используем ARM64
# docker_options:
# platform: "linux/arm64"
# docker_platform: "linux/arm64"
# =============================================================================
# RHEL СЕРВЕРЫ (ARM64)
# =============================================================================
#- name: rhel1
# family: rhel
# groups: [cod, rhel]
# platform: "linux/arm64" # Используем ARM64
# docker_options:
# platform: "linux/arm64"
# docker_platform: "linux/arm64"

View File

@@ -0,0 +1,44 @@
---
#description: Стандартный пресет по умолчанию для тестирования с 2 хостами (Ubuntu + Debian)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
alt9: "inecs/ansible-lab:alt9-latest"
alt10: "inecs/ansible-lab:alt10-latest"
astra: "inecs/ansible-lab:astra-linux-latest"
rhel: "inecs/ansible-lab:rhel-latest"
centos7: "inecs/ansible-lab:centos7-latest"
centos8: "inecs/ansible-lab:centos8-latest"
centos9: "inecs/ansible-lab:centos9-latest"
alma: "inecs/ansible-lab:alma-latest"
rocky: "inecs/ansible-lab:rocky-latest"
redos: "inecs/ansible-lab:redos-latest"
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
debian9: "inecs/ansible-lab:debian9-latest"
debian10: "inecs/ansible-lab:debian10-latest"
debian11: "inecs/ansible-lab:debian11-latest"
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Стандартный набор - 2 хоста для базового тестирования (стабильные ОС)
- name: u1
family: ubuntu22
groups: [test, web]
- name: u2
family: debian12
groups: [test, web]

View File

@@ -0,0 +1,185 @@
---
#description: Пресет для тестирования всех доступных образов (9 хостов)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
# Примечание: Astra Linux и RedOS поддерживают только linux/amd64
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
alt9: "inecs/ansible-lab:alt9-latest"
alt10: "inecs/ansible-lab:alt10-latest"
astra: "inecs/ansible-lab:astra-linux-latest"
rhel: "inecs/ansible-lab:rhel-latest"
centos7: "inecs/ansible-lab:centos7-latest"
centos8: "inecs/ansible-lab:centos8-latest"
centos9: "inecs/ansible-lab:centos9-latest"
alma: "inecs/ansible-lab:alma-latest"
rocky: "inecs/ansible-lab:rocky-latest"
redos: "inecs/ansible-lab:redos-latest"
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
debian9: "inecs/ansible-lab:debian9-latest"
debian10: "inecs/ansible-lab:debian10-latest"
debian11: "inecs/ansible-lab:debian11-latest"
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Debian-based системы
- name: ubuntu20-test
family: ubuntu2220
groups: [test, debian, ubuntu]
publish:
- "8080:80"
env:
TEST_OS: "Ubuntu 20.04"
TEST_FAMILY: "Debian"
- name: ubuntu22-test
family: ubuntu22
groups: [test, debian, ubuntu]
publish:
- "8081:80"
env:
TEST_OS: "Ubuntu 22.04"
TEST_FAMILY: "Debian"
- name: ubuntu24-test
family: ubuntu2224
groups: [test, debian, ubuntu]
publish:
- "8082:80"
env:
TEST_OS: "Ubuntu 24.04"
TEST_FAMILY: "Debian"
- name: debian9-test
family: debian129
groups: [test, debian]
publish:
- "8083:80"
env:
TEST_OS: "Debian 9"
TEST_FAMILY: "Debian"
- name: debian10-test
family: debian1210
groups: [test, debian]
publish:
- "8084:80"
env:
TEST_OS: "Debian 10"
TEST_FAMILY: "Debian"
- name: debian11-test
family: debian1211
groups: [test, debian]
publish:
- "8085:80"
env:
TEST_OS: "Debian 11"
TEST_FAMILY: "Debian"
- name: debian12-test
family: debian12
groups: [test, debian]
publish:
- "8086:80"
env:
TEST_OS: "Debian 12"
TEST_FAMILY: "Debian"
- name: alt-test
family: alt
groups: [test, altlinux]
publish:
- "8082:80"
env:
TEST_OS: "Alt Linux"
TEST_FAMILY: "Altlinux"
- name: astra-test
family: astra
groups: [test, astra]
supported_platforms: ["linux/amd64"] # Только amd64
publish:
- "8083:80"
env:
TEST_OS: "Astra Linux"
TEST_FAMILY: "Astra Linux"
# RHEL-based системы
- name: centos7-test
family: centos97
groups: [test, rhel, centos]
publish:
- "8090:80"
env:
TEST_OS: "CentOS 7"
TEST_FAMILY: "RedHat"
- name: centos8-test
family: centos98
groups: [test, rhel, centos]
publish:
- "8091:80"
env:
TEST_OS: "CentOS 8"
TEST_FAMILY: "RedHat"
- name: centos9-test
family: centos99
groups: [test, rhel, centos]
publish:
- "8092:80"
env:
TEST_OS: "CentOS 9"
TEST_FAMILY: "RedHat"
- name: rhel-test
family: rhel
groups: [test, rhel]
publish:
- "8085:80"
env:
TEST_OS: "RHEL"
TEST_FAMILY: "RedHat"
- name: alma-test
family: alma
groups: [test, rhel]
publish:
- "8086:80"
env:
TEST_OS: "AlmaLinux"
TEST_FAMILY: "RedHat"
- name: rocky-test
family: rocky
groups: [test, rhel]
publish:
- "8087:80"
env:
TEST_OS: "Rocky Linux"
TEST_FAMILY: "RedHat"
- name: redos-test
family: redos
groups: [test, rhel]
supported_platforms: ["linux/amd64"] # Только amd64
publish:
- "8088:80"
env:
TEST_OS: "RedOS"
TEST_FAMILY: "RedHat"

View File

@@ -0,0 +1,52 @@
---
#description: Пресет со всеми версиями CentOS (7, 8, 9)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы CentOS
images:
centos7: "inecs/ansible-lab:centos7-latest"
centos8: "inecs/ansible-lab:centos8-latest"
centos9: "inecs/ansible-lab:centos9-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# CentOS 7
- name: centos7-1
family: centos7
groups: [centos, test, web]
publish: ["7007:80"]
- name: centos7-2
family: centos7
groups: [centos, test, db]
publish: ["7008:80"]
# CentOS 8
- name: centos8-1
family: centos8
groups: [centos, test, web]
publish: ["7009:80"]
- name: centos8-2
family: centos8
groups: [centos, test, db]
publish: ["7010:80"]
# CentOS 9 Stream
- name: centos9-1
family: centos9
groups: [centos, test, web]
publish: ["7011:80"]
- name: centos9-2
family: centos9
groups: [centos, test, db]
publish: ["7012:80"]

View File

@@ -0,0 +1,34 @@
---
#description: Пресет для CentOS 7
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образ CentOS 7
images:
centos7: "inecs/ansible-lab:centos7-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# CentOS 7 хосты
- name: centos7-web
family: centos7
groups: [centos, test, web]
publish: ["7070:80"]
- name: centos7-db
family: centos7
groups: [centos, test, db]
publish: ["7071:80"]
- name: centos7-app
family: centos7
groups: [centos, test, app]
publish: ["7072:80"]

View File

@@ -0,0 +1,34 @@
---
#description: Пресет для CentOS 8
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образ CentOS 8
images:
centos8: "inecs/ansible-lab:centos8-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# CentOS 8 хосты
- name: centos8-web
family: centos8
groups: [centos, test, web]
publish: ["7080:80"]
- name: centos8-db
family: centos8
groups: [centos, test, db]
publish: ["7081:80"]
- name: centos8-app
family: centos8
groups: [centos, test, app]
publish: ["7082:80"]

View File

@@ -0,0 +1,34 @@
---
#description: Пресет для CentOS 9 Stream
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образ CentOS 9
images:
centos9: "inecs/ansible-lab:centos9-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# CentOS 9 Stream хосты
- name: centos9-web
family: centos9
groups: [centos, test, web]
publish: ["7090:80"]
- name: centos9-db
family: centos9
groups: [centos, test, db]
publish: ["7091:80"]
- name: centos9-app
family: centos9
groups: [centos, test, app]
publish: ["7092:80"]

View File

@@ -0,0 +1,63 @@
---
#description: Пресет со всеми версиями Debian (9, 10, 11, 12)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы Debian
images:
debian9: "inecs/ansible-lab:debian9-latest"
debian10: "inecs/ansible-lab:debian10-latest"
debian11: "inecs/ansible-lab:debian11-latest"
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Debian 9 Stretch
- name: debian9-1
family: debian9
groups: [debian, test, web]
publish: ["9009:80"]
- name: debian9-2
family: debian9
groups: [debian, test, db]
publish: ["9010:80"]
# Debian 10 Buster
- name: debian10-1
family: debian10
groups: [debian, test, web]
publish: ["9011:80"]
- name: debian10-2
family: debian10
groups: [debian, test, db]
publish: ["9012:80"]
# Debian 11 Bullseye
- name: debian11-1
family: debian11
groups: [debian, test, web]
publish: ["9013:80"]
- name: debian11-2
family: debian11
groups: [debian, test, db]
publish: ["9014:80"]
# Debian 12 Bookworm
- name: debian12-1
family: debian12
groups: [debian, test, web]
publish: ["9015:80"]
- name: debian12-2
family: debian12
groups: [debian, test, db]
publish: ["9016:80"]

View File

@@ -0,0 +1,34 @@
---
#description: Пресет для Debian 10 Buster
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образ Debian 10
images:
debian10: "inecs/ansible-lab:debian10-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Debian 10 Buster хосты
- name: debian10-web
family: debian10
groups: [debian, test, web]
publish: ["9100:80"]
- name: debian10-db
family: debian10
groups: [debian, test, db]
publish: ["9101:80"]
- name: debian10-app
family: debian10
groups: [debian, test, app]
publish: ["9102:80"]

View File

@@ -0,0 +1,34 @@
---
#description: Пресет для Debian 11 Bullseye
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образ Debian 11
images:
debian11: "inecs/ansible-lab:debian11-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Debian 11 Bullseye хосты
- name: debian11-web
family: debian11
groups: [debian, test, web]
publish: ["9110:80"]
- name: debian11-db
family: debian11
groups: [debian, test, db]
publish: ["9111:80"]
- name: debian11-app
family: debian11
groups: [debian, test, app]
publish: ["9112:80"]

View File

@@ -0,0 +1,34 @@
---
#description: Пресет для Debian 12 Bookworm
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образ Debian 12
images:
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Debian 12 Bookworm хосты
- name: debian12-web
family: debian12
groups: [debian, test, web]
publish: ["9120:80"]
- name: debian12-db
family: debian12
groups: [debian, test, db]
publish: ["9121:80"]
- name: debian12-app
family: debian12
groups: [debian, test, app]
publish: ["9122:80"]

View File

@@ -0,0 +1,34 @@
---
#description: Пресет для Debian 9 Stretch
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образ Debian 9
images:
debian9: "inecs/ansible-lab:debian9-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Debian 9 Stretch хосты
- name: debian9-web
family: debian9
groups: [debian, test, web]
publish: ["9090:80"]
- name: debian9-db
family: debian9
groups: [debian, test, db]
publish: ["9091:80"]
- name: debian9-app
family: debian9
groups: [debian, test, app]
publish: ["9092:80"]

View File

@@ -0,0 +1,59 @@
---
#description: Полный пресет с Docker функциональностью (DinD + DOoD)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
alt9: "inecs/ansible-lab:alt9-latest"
alt10: "inecs/ansible-lab:alt10-latest"
astra: "inecs/ansible-lab:astra-linux-latest"
rhel: "inecs/ansible-lab:rhel-latest"
centos7: "inecs/ansible-lab:centos7-latest"
centos8: "inecs/ansible-lab:centos8-latest"
centos9: "inecs/ansible-lab:centos9-latest"
alma: "inecs/ansible-lab:alma-latest"
rocky: "inecs/ansible-lab:rocky-latest"
redos: "inecs/ansible-lab:redos-latest"
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
debian9: "inecs/ansible-lab:debian9-latest"
debian10: "inecs/ansible-lab:debian10-latest"
debian11: "inecs/ansible-lab:debian11-latest"
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Базовые хосты (стабильные ОС)
- name: u1
family: ubuntu22
groups: [test, web]
- name: u2
family: debian12
groups: [test, web]
# DinD узел (Docker-in-Docker)
- name: docker1
type: dind
groups: [docker]
publish: ["8080:8080"]
# DOoD узел (Docker-out-of-Docker)
- name: dood1
type: dood
family: ubuntu22
groups: [dood]
publish: ["8081:8081"]
env:
DOCKER_HOST: unix:///var/run/docker.sock

View File

@@ -0,0 +1,59 @@
---
#description: Пресет с Docker контейнерами (DinD + DOoD) для тестирования Docker-задач
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
alt9: "inecs/ansible-lab:alt9-latest"
alt10: "inecs/ansible-lab:alt10-latest"
astra: "inecs/ansible-lab:astra-linux-latest"
rhel: "inecs/ansible-lab:rhel-latest"
centos7: "inecs/ansible-lab:centos7-latest"
centos8: "inecs/ansible-lab:centos8-latest"
centos9: "inecs/ansible-lab:centos9-latest"
alma: "inecs/ansible-lab:alma-latest"
rocky: "inecs/ansible-lab:rocky-latest"
redos: "inecs/ansible-lab:redos-latest"
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
debian9: "inecs/ansible-lab:debian9-latest"
debian10: "inecs/ansible-lab:debian10-latest"
debian11: "inecs/ansible-lab:debian11-latest"
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Тестовые хосты
- name: test1
family: debian12
groups: [test]
- name: test2
family: rhel
groups: [test]
# DinD узел (Docker-in-Docker)
- name: docker1
type: dind
groups: [docker]
publish: ["8080:8080"]
# DOoD узел (Docker-out-of-Docker)
- name: dood1
type: dood
family: debian12
groups: [dood]
publish: ["8081:8081"]
env:
DOCKER_HOST: unix:///var/run/docker.sock

View File

@@ -0,0 +1,77 @@
---
#description: Пресет для тестирования кластера etcd + PostgreSQL + Patroni (9 хостов)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
alt9: "inecs/ansible-lab:alt9-latest"
alt10: "inecs/ansible-lab:alt10-latest"
astra: "inecs/ansible-lab:astra-linux-latest"
rhel: "inecs/ansible-lab:rhel-latest"
centos7: "inecs/ansible-lab:centos7-latest"
centos8: "inecs/ansible-lab:centos8-latest"
centos9: "inecs/ansible-lab:centos9-latest"
alma: "inecs/ansible-lab:alma-latest"
rocky: "inecs/ansible-lab:rocky-latest"
redos: "inecs/ansible-lab:redos-latest"
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
debian9: "inecs/ansible-lab:debian9-latest"
debian10: "inecs/ansible-lab:debian10-latest"
debian11: "inecs/ansible-lab:debian11-latest"
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
# Описание кластера etcd + Patroni + HAProxy
hosts:
# ETCD кластер (5 узлов для высокой доступности)
- name: etcd1
family: debian12
groups: [etcd, cluster]
- name: etcd2
family: rhel
groups: [etcd, cluster]
- name: etcd3
family: debian12
groups: [etcd, cluster]
- name: etcd4
family: rhel
groups: [etcd, cluster]
- name: etcd5
family: debian12
groups: [etcd, cluster]
# Patroni кластер (3 узла PostgreSQL)
- name: patroni1
family: rhel
groups: [patroni, database, cluster]
- name: patroni2
family: debian12
groups: [patroni, database, cluster]
- name: patroni3
family: rhel
groups: [patroni, database, cluster]
# HAProxy для балансировки
- name: haproxy
family: debian12
groups: [haproxy, loadbalancer]
publish: ["5000:5000", "5001:5001"] # RW и RO порты
# DinD узел для тестирования Docker Compose внутри
- name: app-dind
type: dind
groups: [apps, docker]
publish: ["8080:8080"]

View File

@@ -0,0 +1,45 @@
---
#description: Минимальный пресет для быстрого тестирования с 1 хостом (Debian)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
alt9: "inecs/ansible-lab:alt9-latest"
alt10: "inecs/ansible-lab:alt10-latest"
astra: "inecs/ansible-lab:astra-linux-latest"
rhel: "inecs/ansible-lab:rhel-latest"
centos7: "inecs/ansible-lab:centos7-latest"
centos8: "inecs/ansible-lab:centos8-latest"
centos9: "inecs/ansible-lab:centos9-latest"
alma: "inecs/ansible-lab:alma-latest"
rocky: "inecs/ansible-lab:rocky-latest"
redos: "inecs/ansible-lab:redos-latest"
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
debian9: "inecs/ansible-lab:debian9-latest"
debian10: "inecs/ansible-lab:debian10-latest"
debian11: "inecs/ansible-lab:debian11-latest"
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Минимальный набор - один хост
- name: u1
family: astra
groups: [test]
supported_platforms: ["linux/amd64"] # Только amd64
- name: u2
family: alt
groups: [test]

View File

@@ -0,0 +1,85 @@
---
#description: Пресет для тестирования на разных ОС с 12 хостами (Debian + RHEL)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы для разных ОС
images:
alt9: "inecs/ansible-lab:alt9-latest"
alt10: "inecs/ansible-lab:alt10-latest"
astra: "inecs/ansible-lab:astra-linux-latest"
rhel: "inecs/ansible-lab:rhel-latest"
centos7: "inecs/ansible-lab:centos7-latest"
centos8: "inecs/ansible-lab:centos8-latest"
centos9: "inecs/ansible-lab:centos9-latest"
alma: "inecs/ansible-lab:alma-latest"
rocky: "inecs/ansible-lab:rocky-latest"
redos: "inecs/ansible-lab:redos-latest"
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
debian9: "inecs/ansible-lab:debian9-latest"
debian10: "inecs/ansible-lab:debian10-latest"
debian11: "inecs/ansible-lab:debian11-latest"
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
# Описание кластера с разными ОС
hosts:
# Debian серверы
- name: debian1
family: debian12
groups: [debian, servers, web]
- name: debian2
family: debian12
groups: [debian, servers, web]
- name: debian3
family: debian12
groups: [debian, servers, app]
- name: debian4
family: debian12
groups: [debian, servers, app]
# RHEL серверы
- name: rhel1
family: rhel
groups: [rhel, servers, web]
- name: rhel2
family: rhel
groups: [rhel, servers, web]
- name: rhel3
family: rhel
groups: [rhel, servers, app]
- name: rhel4
family: rhel
groups: [rhel, servers, app]
# База данных на разных ОС
- name: db-debian
family: debian12
groups: [database, debian, db]
- name: db-rhel
family: rhel
groups: [database, rhel, db]
# Load balancer
- name: lb-mixed
family: debian12
groups: [loadbalancer, haproxy]
publish: ["80:80", "443:443"]
# DinD узел для тестирования Docker
- name: docker-mixed
type: dind
groups: [docker, apps]
publish: ["8080:8080"]

View File

@@ -0,0 +1,88 @@
---
#description: Пресет для нагрузочного тестирования с 12 хостами (серверы + БД + кэш)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
alt9: "inecs/ansible-lab:alt9-latest"
alt10: "inecs/ansible-lab:alt10-latest"
astra: "inecs/ansible-lab:astra-linux-latest"
rhel: "inecs/ansible-lab:rhel-latest"
centos7: "inecs/ansible-lab:centos7-latest"
centos8: "inecs/ansible-lab:centos8-latest"
centos9: "inecs/ansible-lab:centos9-latest"
alma: "inecs/ansible-lab:alma-latest"
rocky: "inecs/ansible-lab:rocky-latest"
redos: "inecs/ansible-lab:redos-latest"
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
debian9: "inecs/ansible-lab:debian9-latest"
debian10: "inecs/ansible-lab:debian10-latest"
debian11: "inecs/ansible-lab:debian11-latest"
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
# Описание кластера для нагрузочного тестирования
hosts:
# Основные серверы (5 узлов)
- name: server1
family: debian12
groups: [servers, web, app]
- name: server2
family: rhel
groups: [servers, web, app]
- name: server3
family: debian12
groups: [servers, web, app]
- name: server4
family: rhel
groups: [servers, web, app]
- name: server5
family: debian12
groups: [servers, web, app]
# База данных (3 узла)
- name: db1
family: rhel
groups: [database, db]
- name: db2
family: debian12
groups: [database, db]
- name: db3
family: rhel
groups: [database, db]
# Кэш (3 узла Redis)
- name: cache1
family: debian12
groups: [cache, redis]
- name: cache2
family: rhel
groups: [cache, redis]
- name: cache3
family: debian12
groups: [cache, redis]
# Load balancer
- name: lb1
family: rhel
groups: [loadbalancer, haproxy]
publish: ["80:80", "443:443"]
# DinD узел для тестирования Docker Compose
- name: compose-dind
type: dind
groups: [apps, docker]
publish: ["8080:8080", "8081:8081"]

View File

@@ -0,0 +1,91 @@
---
#description: Пресет для тестирования безопасности с 10 хостами (bastion + internal + monitoring)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
alt9: "inecs/ansible-lab:alt9-latest"
alt10: "inecs/ansible-lab:alt10-latest"
astra: "inecs/ansible-lab:astra-linux-latest"
rhel: "inecs/ansible-lab:rhel-latest"
centos7: "inecs/ansible-lab:centos7-latest"
centos8: "inecs/ansible-lab:centos8-latest"
centos9: "inecs/ansible-lab:centos9-latest"
alma: "inecs/ansible-lab:alma-latest"
rocky: "inecs/ansible-lab:rocky-latest"
redos: "inecs/ansible-lab:redos-latest"
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
debian9: "inecs/ansible-lab:debian9-latest"
debian10: "inecs/ansible-lab:debian10-latest"
debian11: "inecs/ansible-lab:debian11-latest"
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
# Описание кластера для тестирования безопасности
hosts:
# Bastion хосты (точки входа)
- name: bastion1
family: rhel
groups: [bastion, security, jump]
publish: ["2222:22"]
- name: bastion2
family: debian12
groups: [bastion, security, jump]
publish: ["2223:22"]
# Внутренние серверы (без внешнего доступа)
- name: internal1
family: rhel
groups: [internal, servers, app]
- name: internal2
family: debian12
groups: [internal, servers, app]
- name: internal3
family: rhel
groups: [internal, servers, app]
# База данных (изолированная сеть)
- name: db-secure1
family: rhel
groups: [database, secure, internal]
- name: db-secure2
family: debian12
groups: [database, secure, internal]
# Мониторинг и логирование
- name: monitor1
family: debian12
groups: [monitoring, security, logs]
- name: monitor2
family: rhel
groups: [monitoring, security, logs]
# Firewall и сетевые компоненты
- name: fw1
family: rhel
groups: [firewall, network, security]
- name: fw2
family: debian12
groups: [firewall, network, security]
# DOoD узел для тестирования Docker безопасности
- name: docker-secure
type: dood
family: debian12
groups: [docker, security, apps]
publish: ["8080:8080"]
env:
DOCKER_HOST: "unix:///var/run/docker.sock"

View File

@@ -0,0 +1,44 @@
---
#description: Стабильный пресет для тестирования с Ubuntu и Debian (проверенные ОС)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
alt9: "inecs/ansible-lab:alt9-latest"
alt10: "inecs/ansible-lab:alt10-latest"
astra: "inecs/ansible-lab:astra-linux-latest"
rhel: "inecs/ansible-lab:rhel-latest"
centos7: "inecs/ansible-lab:centos7-latest"
centos8: "inecs/ansible-lab:centos8-latest"
centos9: "inecs/ansible-lab:centos9-latest"
alma: "inecs/ansible-lab:alma-latest"
rocky: "inecs/ansible-lab:rocky-latest"
redos: "inecs/ansible-lab:redos-latest"
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
debian9: "inecs/ansible-lab:debian9-latest"
debian10: "inecs/ansible-lab:debian10-latest"
debian11: "inecs/ansible-lab:debian11-latest"
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Стабильные ОС для надежного тестирования
- name: u1
family: ubuntu22
groups: [test, web]
- name: u2
family: debian12
groups: [test, web]

View File

@@ -0,0 +1,61 @@
---
#description: Стандартный пресет для тестирования с 3 хостами (Debian + RHEL)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
alt9: "inecs/ansible-lab:alt9-latest"
alt10: "inecs/ansible-lab:alt10-latest"
astra: "inecs/ansible-lab:astra-linux-latest"
rhel: "inecs/ansible-lab:rhel-latest"
centos7: "inecs/ansible-lab:centos7-latest"
centos8: "inecs/ansible-lab:centos8-latest"
centos9: "inecs/ansible-lab:centos9-latest"
alma: "inecs/ansible-lab:alma-latest"
rocky: "inecs/ansible-lab:rocky-latest"
redos: "inecs/ansible-lab:redos-latest"
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
debian9: "inecs/ansible-lab:debian9-latest"
debian10: "inecs/ansible-lab:debian10-latest"
debian11: "inecs/ansible-lab:debian11-latest"
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
# Kind кластеры (опционально)
# kind_clusters:
# - name: lab
# workers: 2
# api_port: 6443
# addons:
# ingress_nginx: true
# metrics_server: true
# istio: true
# kiali: true
# prometheus_stack: true
# ingress_host_http_port: 8081
# ingress_host_https_port: 8443
hosts:
# Стандартный набор - 3 хоста
- name: u1
family: debian12
groups: [test]
- name: u2
family: rhel
groups: [test]
- name: u3
family: debian12
groups: [test]

View File

@@ -0,0 +1,41 @@
---
#description: Минимальный пресет для быстрого тестирования с 1 хостом (Debian)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
alt9: "inecs/ansible-lab:alt9-latest"
alt10: "inecs/ansible-lab:alt10-latest"
astra: "inecs/ansible-lab:astra-linux-latest"
rhel: "inecs/ansible-lab:rhel-latest"
centos7: "inecs/ansible-lab:centos7-latest"
centos8: "inecs/ansible-lab:centos8-latest"
centos9: "inecs/ansible-lab:centos9-latest"
alma: "inecs/ansible-lab:alma-latest"
rocky: "inecs/ansible-lab:rocky-latest"
redos: "inecs/ansible-lab:redos-latest"
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
debian9: "inecs/ansible-lab:debian9-latest"
debian10: "inecs/ansible-lab:debian10-latest"
debian11: "inecs/ansible-lab:debian11-latest"
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Минимальный набор - один хост
- name: u1
family: debian12
groups: [test]

View File

@@ -0,0 +1,52 @@
---
#description: Пресет со всеми версиями Ubuntu (20.04, 22.04, 24.04)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы Ubuntu
images:
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Ubuntu 20.04 LTS
- name: ubuntu20-1
family: ubuntu20
groups: [ubuntu, test, web]
publish: ["8020:80"]
- name: ubuntu20-2
family: ubuntu20
groups: [ubuntu, test, db]
publish: ["8026:80"]
# Ubuntu 22.04 LTS
- name: ubuntu22-1
family: ubuntu22
groups: [ubuntu, test, web]
publish: ["8022:80"]
- name: ubuntu22-2
family: ubuntu22
groups: [ubuntu, test, db]
publish: ["8023:80"]
# Ubuntu 24.04 LTS
- name: ubuntu24-1
family: ubuntu24
groups: [ubuntu, test, web]
publish: ["8024:80"]
- name: ubuntu24-2
family: ubuntu24
groups: [ubuntu, test, db]
publish: ["8025:80"]

View File

@@ -0,0 +1,34 @@
---
#description: Пресет для Ubuntu 20.04 LTS
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образ Ubuntu 20.04
images:
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Ubuntu 20.04 LTS хосты
- name: ubuntu20-web
family: ubuntu20
groups: [ubuntu, test, web]
publish: ["8020:80"]
- name: ubuntu20-db
family: ubuntu20
groups: [ubuntu, test, db]
publish: ["8021:80"]
- name: ubuntu20-app
family: ubuntu20
groups: [ubuntu, test, app]
publish: ["8022:80"]

View File

@@ -0,0 +1,34 @@
---
#description: Пресет для Ubuntu 22.04 LTS
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образ Ubuntu 22.04
images:
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Ubuntu 22.04 LTS хосты
- name: ubuntu22-web
family: ubuntu22
groups: [ubuntu, test, web]
publish: ["8220:80"]
- name: ubuntu22-db
family: ubuntu22
groups: [ubuntu, test, db]
publish: ["8221:80"]
- name: ubuntu22-app
family: ubuntu22
groups: [ubuntu, test, app]
publish: ["8222:80"]

View File

@@ -0,0 +1,34 @@
---
#description: Пресет для Ubuntu 24.04 LTS
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образ Ubuntu 24.04
images:
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Ubuntu 24.04 LTS хосты
- name: ubuntu24-web
family: ubuntu24
groups: [ubuntu, test, web]
publish: ["8240:80"]
- name: ubuntu24-db
family: ubuntu24
groups: [ubuntu, test, db]
publish: ["8241:80"]
- name: ubuntu24-app
family: ubuntu24
groups: [ubuntu, test, app]
publish: ["8242:80"]

View File

@@ -0,0 +1,93 @@
---
# Геополитический пресет с 5 контейнерами (Ubuntu + Debian + Alt + Astra + RedOS)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
# Описание: Пресет для тестирования ролей на различных ОС
# Использует образы Ubuntu, Debian, Alt, Astra и RedOS
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# Используем стабильные образы Ubuntu, Debian, Alt, Astra и RedOS (ARM64)
images:
ubuntu: "inecs/ansible-lab:ubuntu22-latest"
debian: "inecs/ansible-lab:debian12-latest"
alt: "inecs/ansible-lab:alt10-latest"
astra: "inecs/ansible-lab:astra-latest-arm64" # ARM64 образ
redos: "inecs/ansible-lab:redos-latest-arm64" # ARM64 образ
# Настройки для ARM64
# Используем нативные ARM64 образы
platform: "linux/arm64"
# Настройки Docker для ARM64
docker_options:
platform: "linux/arm64"
systemd_defaults:
privileged: true
command: "/bin/bash -c \"while true; do sleep 30; done\""
platform: "linux/arm64" # Используем ARM64
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
# Принудительная установка платформы для всех операций Docker
docker_platform: "linux/amd64"
hosts:
# =============================================================================
# UBUNTU СЕРВЕРЫ
# =============================================================================
- name: ubuntu1
family: ubuntu
groups: [geop, ubuntu]
platform: "linux/arm64" # Используем ARM64
docker_options:
platform: "linux/arm64"
docker_platform: "linux/arm64"
# =============================================================================
# DEBIAN СЕРВЕРЫ
# =============================================================================
- name: debian1
family: debian
groups: [geop, debian]
platform: "linux/arm64" # Используем ARM64
docker_options:
platform: "linux/arm64"
docker_platform: "linux/arm64"
# =============================================================================
# ALT СЕРВЕРЫ
# =============================================================================
- name: alt1
family: alt
groups: [geop, alt]
platform: "linux/arm64" # Используем ARM64
docker_options:
platform: "linux/arm64"
docker_platform: "linux/arm64"
# =============================================================================
# ASTRA СЕРВЕРЫ (ARM64)
# =============================================================================
- name: astra1
family: astra
groups: [geop, astra]
platform: "linux/arm64" # Используем ARM64
docker_options:
platform: "linux/arm64"
docker_platform: "linux/arm64"
# =============================================================================
# REDOS СЕРВЕРЫ (ARM64)
# =============================================================================
#- name: redos1
# family: redos
# groups: [geop, redos]
# platform: "linux/arm64" # Используем ARM64
# docker_options:
# platform: "linux/arm64"
# docker_platform: "linux/arm64"

View File

@@ -0,0 +1,55 @@
---
# ПРЕСЕТ: Kubernetes + Istio Full Stack (1 кластер с полным стеком)
#
# Описание: Полноценный Kubernetes кластер с полным стеком Istio
# - 1 Kind кластер с 3 workers
# - Полный Istio service mesh с Kiali
# - Prometheus + Grafana для мониторинга
# - Jaeger для трассировки
# - Все аддоны включены
#
# Использование: make lab-test SCENARIO=universal LAB_SPEC=molecule/presets/k8s-istio-full.yml
#
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
kind_clusters:
- name: istio-full
workers: 3
api_port: 6443
addons:
ingress_nginx: true
metrics_server: true
istio: true
kiali: true
prometheus_stack: true
ingress_host_http_port: 8081
ingress_host_https_port: 8443
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: k8s-controller
group: controllers
family: debian
publish:
- "6443:6443"
- "9090:9090" # Prometheus
- "3000:3000" # Grafana
- "16686:16686" # Jaeger
- "20001:20001" # Kiali

View File

@@ -0,0 +1,42 @@
---
#description: Минимальный Kind кластер без аддонов
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
alt: "inecs/ansible-lab:alt-linux-latest"
astra: "inecs/ansible-lab:astra-linux-latest"
rhel: "inecs/ansible-lab:rhel-latest"
centos7: "inecs/ansible-lab:centos7-latest"
centos8: "inecs/ansible-lab:centos8-latest"
centos9: "inecs/ansible-lab:centos9-latest"
alma: "inecs/ansible-lab:alma-latest"
rocky: "inecs/ansible-lab:rocky-latest"
redos: "inecs/ansible-lab:redos-latest"
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
debian9: "inecs/ansible-lab:debian9-latest"
debian10: "inecs/ansible-lab:debian10-latest"
debian11: "inecs/ansible-lab:debian11-latest"
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
# Минимальный Kind кластер без аддонов
kind_clusters:
- name: minimal
workers: 0 # Только control-plane
api_port: 6443
hosts: []

View File

@@ -0,0 +1,81 @@
---
# ПРЕСЕТ: Kubernetes Multi-Cluster (3 кластера)
#
# Описание: Несколько Kind кластеров для тестирования мульти-кластерных сценариев
# - 3 Kind кластера: dev, staging, prod
# - Различные конфигурации для каждого окружения
# - Полный стек мониторинга и service mesh
#
# Использование: make lab-test SCENARIO=universal LAB_SPEC=molecule/presets/k8s-multi.yml
#
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
kind_clusters:
- name: dev
workers: 1
api_port: 6443
addons:
ingress_nginx: true
metrics_server: true
ingress_host_http_port: 8081
ingress_host_https_port: 8443
- name: staging
workers: 2
api_port: 6444
addons:
ingress_nginx: true
metrics_server: true
istio: true
kiali: true
ingress_host_http_port: 8082
ingress_host_https_port: 8444
- name: prod
workers: 3
api_port: 6445
addons:
ingress_nginx: true
metrics_server: true
istio: true
kiali: true
prometheus_stack: true
ingress_host_http_port: 8083
ingress_host_https_port: 8445
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: k8s-dev-controller
group: controllers
family: debian
publish:
- "6443:6443"
- name: k8s-staging-controller
group: controllers
family: rhel
publish:
- "6444:6444"
- name: k8s-prod-controller
group: controllers
family: debian
publish:
- "6445:6445"

View File

@@ -0,0 +1,46 @@
---
# ПРЕСЕТ: Kubernetes Single Node (1 кластер)
#
# Описание: Одиночный Kind кластер для простого тестирования K8s ролей
# - 1 Kind кластер с 1 worker
# - Базовые аддоны: Ingress NGINX, Metrics Server
# - Простая конфигурация для быстрого старта
#
# Использование: make lab-test SCENARIO=universal LAB_SPEC=molecule/presets/k8s-single.yml
#
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
kind_clusters:
- name: single
workers: 1
api_port: 6443
addons:
ingress_nginx: true
metrics_server: true
ingress_host_http_port: 8081
ingress_host_https_port: 8443
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: k8s-controller
group: controllers
family: debian
publish:
- "6443:6443"

View File

@@ -0,0 +1,66 @@
---
#description: Пресет для тестирования с Kubernetes Kind кластером
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
alt: "inecs/ansible-lab:alt-linux-latest"
astra: "inecs/ansible-lab:astra-linux-latest"
rhel: "inecs/ansible-lab:rhel-latest"
centos7: "inecs/ansible-lab:centos7-latest"
centos8: "inecs/ansible-lab:centos8-latest"
centos9: "inecs/ansible-lab:centos9-latest"
alma: "inecs/ansible-lab:alma-latest"
rocky: "inecs/ansible-lab:rocky-latest"
redos: "inecs/ansible-lab:redos-latest"
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
debian9: "inecs/ansible-lab:debian9-latest"
debian10: "inecs/ansible-lab:debian10-latest"
debian11: "inecs/ansible-lab:debian11-latest"
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
# Kind кластеры с полным набором аддонов
kind_clusters:
- name: lab
workers: 2
api_port: 6443
addons:
ingress_nginx: true
metrics_server: true
istio: true
kiali: true
prometheus_stack: true
# Порты для доступа к аддонам извне
# Ingress HTTP: http://localhost:8081
# Ingress HTTPS: https://localhost:8443
# Prometheus: http://localhost:9090
# Grafana: http://localhost:3000 (admin/admin)
# Kiali: http://localhost:20001
# Metrics Server: http://localhost:4443
addon_ports:
ingress_http: 8081
ingress_https: 8443
prometheus: 9090
grafana: 3000
kiali: 20001
metrics_server: 4443
hosts: []
# # Стандартный набор - 2 хоста для базового тестирования (стабильные ОС)
# - name: u1
# family: ubuntu22
# groups: [test, web]

View File

@@ -0,0 +1,42 @@
---
#description: Минимальный пресет для быстрого тестирования с 1 хостом (Debian)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
alt9: "inecs/ansible-lab:alt9-latest"
alt10: "inecs/ansible-lab:alt10-latest"
astra: "inecs/ansible-lab:astra-linux-latest"
rhel: "inecs/ansible-lab:rhel-latest"
centos7: "inecs/ansible-lab:centos7-latest"
centos8: "inecs/ansible-lab:centos8-latest"
centos9: "inecs/ansible-lab:centos9-latest"
alma: "inecs/ansible-lab:alma-latest"
rocky: "inecs/ansible-lab:rocky-latest"
redos: "inecs/ansible-lab:redos-latest"
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
debian9: "inecs/ansible-lab:debian9-latest"
debian10: "inecs/ansible-lab:debian10-latest"
debian11: "inecs/ansible-lab:debian11-latest"
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Минимальный набор - один хост Astra Linux для arm64
- name: u1
family: astra
groups: [test]
supported_platforms: ["linux/arm64", "linux/amd64"]

View File

@@ -0,0 +1,47 @@
---
#description: Стандартный пресет по умолчанию для тестирования с 2 хостами (Ubuntu + Debian)
# Автор: Сергей Антропов
# Сайт: https://devops.org.ru
docker_network: labnet
generated_inventory: "{{ molecule_ephemeral_directory }}/inventory/hosts.ini"
# systemd-ready образы
images:
alt9: "inecs/ansible-lab:alt9-latest"
alt10: "inecs/ansible-lab:alt10-latest"
astra: "inecs/ansible-lab:astra-linux-latest"
rhel: "inecs/ansible-lab:rhel-latest"
centos7: "inecs/ansible-lab:centos7-latest"
centos8: "inecs/ansible-lab:centos8-latest"
centos9: "inecs/ansible-lab:centos9-latest"
alma: "inecs/ansible-lab:alma-latest"
rocky: "inecs/ansible-lab:rocky-latest"
redos: "inecs/ansible-lab:redos-latest"
ubuntu20: "inecs/ansible-lab:ubuntu20-latest"
ubuntu22: "inecs/ansible-lab:ubuntu22-latest"
ubuntu24: "inecs/ansible-lab:ubuntu24-latest"
debian9: "inecs/ansible-lab:debian9-latest"
debian10: "inecs/ansible-lab:debian10-latest"
debian11: "inecs/ansible-lab:debian11-latest"
debian12: "inecs/ansible-lab:debian12-latest"
systemd_defaults:
privileged: true
command: "/sbin/init"
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
tmpfs: ["/run", "/run/lock"]
capabilities: ["SYS_ADMIN"]
hosts:
# Стандартный набор - 2 хоста для базового тестирования (стабильные ОС)
- name: u1
family: ubuntu22
groups: [test]
- name: u2
family: debian12
groups: [test]
- name: u3
family: centos9
groups: [test]