Skip to content

Commit

Permalink
Remove support for Debian 10
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks committed Aug 12, 2024
1 parent 9fa6c3b commit 7326889
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 140 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/schedule_pg_debian10.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ It requires the installation of a consul in client mode on each application serv
RedHat and Debian based distros (x86_64)

###### Supported Linux Distributions:
- **Debian**: 10, 11, 12
- **Debian**: 11, 12
- **Ubuntu**: 20.04, 22.04, 24.04
- **CentOS Stream**: 9
- **Oracle Linux**: 8, 9
Expand All @@ -103,7 +103,6 @@ all supported PostgreSQL versions
_Table of results of daily automated testing of cluster deployment:_
| Distribution | Test result |
|--------------|:----------:|
| Debian 10 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_debian10.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_debian10.yml) |
| Debian 11 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_debian11.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_debian11.yml) |
| Debian 12 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_debian11.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_debian12.yml) |
| Ubuntu 20.04 | [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vitabaks/postgresql_cluster/schedule_pg_ubuntu2004.yml?branch=master)](https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_ubuntu2004.yml) |
Expand Down
2 changes: 1 addition & 1 deletion group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ os_minimum_versions:
AlmaLinux: 8.3
OracleLinux: 8
Ubuntu: 20.04
Debian: 10
Debian: 11
5 changes: 2 additions & 3 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,15 @@
delegate_to: localhost
run_once: true # noqa run-once

# Consul package for OracleLinux, Debian 10 (EOL) missing in HashiCorp repository
# Consul package for OracleLinux missing in HashiCorp repository
# Only the installation of a binary file is supported
- name: "Set variables: 'consul_install_from_repo: false' and 'patroni_installation_method: pip'"
ansible.builtin.set_fact:
consul_install_from_repo: false # whether to install consul from repository as opposed to installing the binary directly
patroni_installation_method: "pip" # the "rpm" method is supported only for consul installed from the repository
when:
- dcs_type == "consul"
- ansible_distribution == "OracleLinux" or
(ansible_distribution == "Debian" and ansible_distribution_major_version == '10')
- ansible_distribution == "OracleLinux"

- name: Set variables for custom PostgreSQL data and WAL directory test
ansible.builtin.set_fact:
Expand Down
5 changes: 2 additions & 3 deletions molecule/pg_upgrade/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@
delegate_to: localhost
run_once: true # noqa run-once

# Consul package for OracleLinux, Debian 10 (EOL) missing in HashiCorp repository
# Consul package for OracleLinux missing in HashiCorp repository
# Only the installation of a binary file is supported
- name: "Set variables: 'consul_install_from_repo: false' and 'patroni_installation_method: pip'"
ansible.builtin.set_fact:
consul_install_from_repo: false # whether to install consul from repository as opposed to installing the binary directly
patroni_installation_method: "pip" # the "rpm" method is supported only for consul installed from the repository
when:
- dcs_type == "consul"
- ansible_distribution == "OracleLinux" or
(ansible_distribution == "Debian" and ansible_distribution_major_version == '10')
- ansible_distribution == "OracleLinux"

- name: Set variables for custom PostgreSQL data and WAL directory test
ansible.builtin.set_fact:
Expand Down
114 changes: 27 additions & 87 deletions roles/haproxy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,97 +8,37 @@
when: hostvars[groups['postgres_cluster'][0]].ansible_hostname is not defined

# Install HAProxy from rpm/deb packages
- block:
# RedHat
- name: Install HAProxy package
ansible.builtin.package:
name: haproxy
state: present
register: package_status
until: package_status is success
delay: 5
retries: 3

# RedHat
- name: Install HAProxy package
ansible.builtin.package:
name: haproxy
state: present
register: package_status
until: package_status is success
delay: 5
retries: 3
environment: "{{ proxy_env | default({}) }}"
when: ansible_os_family == "RedHat" and
installation_method == "repo" and
haproxy_installation_method == "rpm"
when:
- ansible_os_family == "RedHat"
- installation_method == "repo"
- haproxy_installation_method == "rpm"
tags: haproxy, load_balancing

- block:
# Debian
- name: Add haproxy.debian.net repository apt-key
ansible.builtin.apt_key:
url: https://haproxy.debian.net/bernat.debian.org.gpg
state: present
when: haproxy_install_repo|bool and
(ansible_distribution == "Debian" and
ansible_distribution_major_version is version('10', '<='))

- name: Add haproxy.debian.net repository
ansible.builtin.apt_repository:
repo: "deb https://haproxy.debian.net {{ ansible_distribution_release }}-backports-1.8 main"
state: present
update_cache: true
when: haproxy_install_repo|bool and
(ansible_distribution == "Debian" and
ansible_distribution_major_version is version('10', '<='))

# Ubuntu
- name: Add ppa:vbernat/haproxy-1.8 repository apt-key
ansible.builtin.apt_key: # https://github.com/ansible/ansible/issues/31691
data: |
-----BEGIN PGP PUBLIC KEY BLOCK-----
xo0EUa70wAEEAMtI29s01PCX0JleVmh1QQr3rfPkfGo/GFKfcXRGE40nQHq+rWUh
9slUN+kXBckSE0DDrnQH08Uvf12TJiHHFlbXnH5Ep+hgYPZGlVSpvBGO+c/CopU7
RHMx9bl+pVOhrVeDWqLl2KqJI2wjJBLXA0dbRbCzmXPvrg3mBQ0hZ533ABEBAAHN
IExhdW5jaHBhZCBQUEEgZm9yIFZpbmNlbnQgQmVybmF0wrgEEwECACIFAlGu9MAC
GwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEFBdl6QcYbnN8aMD/RM3InMu
bxTF9hzToCPF2EP37Q9WUQNF15f90jTOl8VqqpnUfGd2qlxUW31soCpDVxqX6lXf
qB0bI9EDz2r7w+goxBH+cRArJ2APdC7wE/U9eIxY49mzNsqjsl7zY+eoX4v4fjqk
33hFyMMJDUtPxSRHWFqP5QNwCN+fbPh5GiyL
=ZiOf
-----END PGP PUBLIC KEY BLOCK-----
state: present
when: haproxy_install_repo|bool and
(ansible_distribution == 'Ubuntu' and
ansible_distribution_major_version is version('18', '<='))

- name: Add ppa:vbernat/haproxy-1.8 repository
ansible.builtin.apt_repository:
repo: "deb http://ppa.launchpad.net/vbernat/haproxy-1.8/ubuntu {{ ansible_distribution_release }} main"
state: present
update_cache: true
when: haproxy_install_repo|bool and
(ansible_distribution == 'Ubuntu' and
ansible_distribution_major_version is version('18', '<='))

- name: Install HAProxy v1.8 package
ansible.builtin.apt:
force_apt_get: true
name: "haproxy=1.8.*"
state: present
register: apt_status
until: apt_status is success
delay: 5
retries: 3
when: (ansible_distribution == "Debian" and ansible_distribution_major_version is version('10', '<=')) or
(ansible_distribution == 'Ubuntu' and ansible_distribution_major_version is version('18', '<='))

- name: Install HAProxy package
ansible.builtin.apt:
name: haproxy
state: present
register: apt_status
until: apt_status is success
delay: 5
retries: 3
when: (ansible_distribution == "Debian" and ansible_distribution_major_version is version('11', '>=')) or
(ansible_distribution == 'Ubuntu' and ansible_distribution_major_version is version('20', '>='))
# Debian
- name: Install HAProxy package
ansible.builtin.apt:
name: haproxy
state: present
register: apt_status
until: apt_status is success
delay: 5
retries: 3
environment: "{{ proxy_env | default({}) }}"
when: ansible_os_family == "Debian" and
installation_method == "repo" and
haproxy_installation_method == "deb"
when:
- ansible_os_family == "Debian"
- installation_method == "repo"
- haproxy_installation_method == "deb"
tags: haproxy, load_balancing

# from file (rpm/deb packages)
Expand Down
13 changes: 1 addition & 12 deletions vars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,8 @@ apt_repository:
# - repo: "deb https://deb.debian.org/debian/ {{ ansible_distribution_release }}-updates main" # debian repo (optional)
# - repo: "deb https://security.debian.org/debian-security/ {{ ansible_distribution_release }}/updates main" # debian repo (optional)

# Packages (for apt repo)
os_specific_packages:
Debian-10: [python, python-dev, python-psycopg2, python-setuptools]
Debian-11: [python3] # python 2 is not required
Debian-12: [python3] # python 2 is not required
Ubuntu-20: [python3] # python 2 is not required
Ubuntu-22: [python3] # python 2 is not required
Ubuntu-24: [python3] # python 2 is not required
# Packages
system_packages:
- "{{ os_specific_packages[ansible_distribution ~ '-' ~ ansible_distribution_major_version] }}"
- python3
- python3-dev
- python3-psycopg2
Expand Down Expand Up @@ -119,9 +111,6 @@ patroni_pip_package_repo: []

# if with_haproxy_load_balancing: true
haproxy_installation_method: "deb" # "deb" (default) or "src"
haproxy_install_repo: true # or 'false'
# for Debian 10 the haproxy version 1.8 (LTS) will be installed from the haproxy.debian.net repository.
# you can preload the haproxy deb packages to your APT repository (in this case specify "haproxy_install_repo: false").
confd_package_repo: "https://github.com/kelseyhightower/confd/releases/download/v0.16.0/confd-0.16.0-linux-amd64"

# if haproxy_installation_method: 'src' (optional)
Expand Down

0 comments on commit 7326889

Please sign in to comment.