Skip to content

Platform Matrix

Overview

Solti-Monitoring is tested across multiple Linux distributions to ensure compatibility and reliability.

Supported Platforms

Debian

Versions: - Debian 11 (Bullseye) - Debian 12 (Bookworm) - Primary

Package Manager: apt Init System: systemd Python: 3.9+ (Debian 11), 3.11+ (Debian 12)

Status: ✅ Fully supported

Rocky Linux

Versions: - Rocky Linux 9 - Primary

Package Manager: dnf Init System: systemd Python: 3.9+

Status: ✅ Fully supported

Ubuntu

Versions: - Ubuntu 22.04 LTS (Jammy) - Ubuntu 24.04 LTS (Noble) - Primary

Package Manager: apt Init System: systemd Python: 3.10+ (22.04), 3.12+ (24.04)

Status: ✅ Fully supported

Testing Matrix

Container Testing (Podman/Docker)

Distribution Version Tested CI/CD
Debian 11 ⏭️
Debian 12
Rocky Linux 9
Ubuntu 22.04 ⏭️
Ubuntu 24.04

VM Testing (Proxmox)

Distribution Version Tested Frequency
Debian 12 Weekly
Rocky Linux 9 Weekly
Ubuntu 24.04 ⚠️ Manual

Platform-Specific Considerations

Debian 12

Strengths: - Stable package versions - Long support lifecycle - Extensive documentation - Primary development platform

Considerations: - Conservative package updates - May have older versions of dependencies

Role-specific notes: - InfluxDB: Uses official InfluxData repository - Loki: Compiled binary installation - Telegraf: Official package repository - Alloy: GitHub releases

Rocky Linux 9

Strengths: - RHEL compatibility - Enterprise-grade stability - SELinux integration - Strong security defaults

Considerations: - Different package names vs Debian - SELinux policies may need adjustment - Firewalld instead of ufw

Role-specific notes: - InfluxDB: Official repository, works well - Loki: Binary installation, SELinux context needed - Telegraf: Official repository - Alloy: Requires manual SELinux policy

Ubuntu 24.04

Strengths: - Latest packages - Strong community support - Similar to Debian (apt-based) - Good container support

Considerations: - Shorter support cycle than Debian - More frequent updates - Potential for breaking changes

Role-specific notes: - Similar to Debian 12 - May have newer Python/systemd versions - Excellent Podman support

Platform Detection

Roles automatically detect platform and adjust behavior:

# Example from influxdb role
- name: Install InfluxDB (Debian/Ubuntu)
  apt:
    name: influxdb2
    state: present
  when: ansible_os_family == 'Debian'

- name: Install InfluxDB (Rocky/RHEL)
  dnf:
    name: influxdb2
    state: present
  when: ansible_os_family == 'RedHat'

OS Family Detection

# Common patterns
when: ansible_os_family == 'Debian'      # Debian, Ubuntu
when: ansible_os_family == 'RedHat'      # Rocky, RHEL, CentOS
when: ansible_distribution == 'Debian'    # Only Debian
when: ansible_distribution == 'Ubuntu'    # Only Ubuntu
when: ansible_distribution_major_version == '12'  # Debian 12

Testing Across Platforms

Local Multi-Platform Testing

# Test all platforms with podman scenario
cd roles/influxdb
molecule test -s podman

# This runs on:
# - Debian 12
# - Rocky Linux 9
# - Ubuntu 24.04

Test Specific Platform

# Only test Debian
molecule converge -s podman -- --limit debian12

# Only test Rocky
molecule converge -s podman -- --limit rocky9

CI/CD Matrix Testing

# .github/workflows/test.yml
strategy:
  matrix:
    distro:
      - debian:12
      - rockylinux:9
      - ubuntu:24.04
    scenario:
      - default
      - podman

steps:
  - name: Test ${{ matrix.distro }}
    run: molecule test -s ${{ matrix.scenario }}
    env:
      MOLECULE_DISTRO: ${{ matrix.distro }}

Platform-Specific Variables

Defaults by Platform

# roles/influxdb/vars/Debian.yml
influxdb_package_name: influxdb2
influxdb_service_name: influxdb

# roles/influxdb/vars/RedHat.yml
influxdb_package_name: influxdb2
influxdb_service_name: influxdb

Load Platform Variables

# roles/influxdb/tasks/main.yml
- name: Load platform variables
  include_vars: "{{ ansible_os_family }}.yml"

- name: Install InfluxDB
  package:
    name: "{{ influxdb_package_name }}"
    state: present

Package Management

Debian/Ubuntu (apt)

- name: Update apt cache
  apt:
    update_cache: true
    cache_valid_time: 3600

- name: Install packages
  apt:
    name:
      - curl
      - gnupg
    state: present

Rocky Linux (dnf/yum)

- name: Install packages
  dnf:
    name:
      - curl
      - gnupg2
    state: present
    enablerepo: epel  # If needed

Service Management

Systemd (All Platforms)

All supported platforms use systemd:

- name: Start service
  systemd:
    name: influxdb
    state: started
    enabled: true
    daemon_reload: true  # Always reload after unit changes

Firewall Management

Debian/Ubuntu (ufw)

- name: Allow InfluxDB port
  ufw:
    rule: allow
    port: '8086'
    proto: tcp
  when: ansible_os_family == 'Debian'

Rocky Linux (firewalld)

- name: Allow InfluxDB port
  firewalld:
    port: 8086/tcp
    permanent: true
    state: enabled
    immediate: true
  when: ansible_os_family == 'RedHat'

SELinux Considerations

Rocky Linux SELinux

- name: Install SELinux Python module
  dnf:
    name: python3-libselinux
    state: present
  when: ansible_os_family == 'RedHat'

- name: Set SELinux context for Loki
  sefcontext:
    target: '/usr/local/bin/loki'
    setype: bin_t
    state: present
  when:
    - ansible_os_family == 'RedHat'
    - ansible_selinux.status == 'enabled'

- name: Apply SELinux context
  command: restorecon -v /usr/local/bin/loki
  when:
    - ansible_os_family == 'RedHat'
    - ansible_selinux.status == 'enabled'

Container Runtime

Podman (All Platforms)

Podman is preferred for all platforms:

- name: Install Podman (Debian/Ubuntu)
  apt:
    name: podman
    state: present
  when: ansible_os_family == 'Debian'

- name: Install Podman (Rocky)
  dnf:
    name: podman
    state: present
  when: ansible_os_family == 'RedHat'

Platform Verification

Check Platform Compatibility

# roles/influxdb/tasks/main.yml
- name: Verify supported platform
  assert:
    that:
      - ansible_os_family in ['Debian', 'RedHat']
      - ansible_distribution_major_version | int >= 11
    fail_msg: "Unsupported platform: {{ ansible_distribution }} {{ ansible_distribution_version }}"
    success_msg: "Platform supported: {{ ansible_distribution }} {{ ansible_distribution_version }}"

Platform-Specific Tests

# molecule/default/verify.yml
- name: Verify package manager
  block:
    - name: Check apt (Debian/Ubuntu)
      command: apt --version
      when: ansible_os_family == 'Debian'

    - name: Check dnf (Rocky)
      command: dnf --version
      when: ansible_os_family == 'RedHat'

Troubleshooting Platform Issues

Debug Platform Info

- name: Show platform information
  debug:
    msg:
      - "OS Family: {{ ansible_os_family }}"
      - "Distribution: {{ ansible_distribution }}"
      - "Version: {{ ansible_distribution_version }}"
      - "Major Version: {{ ansible_distribution_major_version }}"
      - "Python: {{ ansible_python_version }}"

Common Platform Issues

Issue: Package not found

# Solution: Use platform-specific package names
vars:
  package_name: "{{ 'gnupg' if ansible_os_family == 'Debian' else 'gnupg2' }}"

Issue: Service name differs

# Solution: Map service names
vars:
  service_name_map:
    Debian: influxdb
    RedHat: influxdb
  service_name: "{{ service_name_map[ansible_os_family] }}"

Issue: Path differences

# Solution: Use platform-specific paths
vars:
  config_path: "{{ '/etc/default' if ansible_os_family == 'Debian' else '/etc/sysconfig' }}"

Platform Support Policy

Tier 1 (Full Support)

  • Debian 12
  • Rocky Linux 9
  • Ubuntu 24.04

Commitment: - Tested in CI/CD - Bug fixes prioritized - New features tested - Documentation provided

Tier 2 (Best Effort)

  • Debian 11
  • Ubuntu 22.04

Commitment: - Periodic testing - Major bug fixes - Limited documentation

Unsupported

  • CentOS (EOL)
  • Debian < 11
  • Ubuntu < 22.04
  • RHEL < 9

Adding New Platforms

Process

  1. Add to molecule platform matrix
  2. Test all roles
  3. Document platform-specific issues
  4. Update README with support status
  5. Add to CI/CD if Tier 1

Example: Adding Fedora

# molecule/podman/molecule.yml
platforms:
  # ... existing platforms ...

  - name: fedora39
    image: fedora:39
    systemd: true

Test and document any issues before declaring support.

Next Steps

  • CI/CD Integration: Automating platform testing
  • Verification Tasks: Platform-specific verification
  • Operations: Platform-specific operational procedures