Skip to content

Commit

Permalink
Update supported platforms
Browse files Browse the repository at this point in the history
- Default to MariaDB 11.6 from 10.3
- Update URI for yum and apt repos and GPG keys

Signed-off-by: Lance Albertson <lance@osuosl.org>
  • Loading branch information
ramereth committed Nov 15, 2024
1 parent a7d37dd commit 2797081
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 148 deletions.
82 changes: 15 additions & 67 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,89 +22,37 @@ jobs:
matrix:
os:
- almalinux-8
# - amazonlinux-2023
- centos-7
- centos-stream-8
- debian-10
- almalinux-9
- centos-stream-9
- debian-11
- debian-12
- rockylinux-8
- ubuntu-1804
- rockylinux-9
- ubuntu-2004
# Latest fedora (38 at time of writing) does not have any mariadb packages yet
# - fedora-latest
- ubuntu-2204
- ubuntu-2404
suite:
- "repository"
- "repository-10"
- "client-install"
- "client-install-10"
- "client-distro-install"
- "server-install"
- "server-install-1011"
- "server-install-10"
- "server-distro-install"
- "configuration"
- "server-configuration"
- "server-configuration-1011"
- "server-configuration-10"
- "resources"
- "resources-1011"
- "resources-10"
- "replication"
- "replication-1011"
- "replication-10"
- "datadir"
- "datadir-1011"
- "datadir-10"
- "port"
- "port-1011"
- "port-10"
- "galera-configuration"
- "galera-configuration-1011"
exclude:
- os: ubuntu-1804
suite: "server-install-1011"
- os: ubuntu-1804
suite: "server-configuration-1011"
- os: ubuntu-1804
suite: "resources-1011"
- os: ubuntu-1804
suite: "replication-1011"
- os: ubuntu-1804
suite: "datadir-1011"
- os: ubuntu-1804
suite: "port-1011"
- os: ubuntu-1804
suite: "galera-configuration-1011"
- os: centos-7
suite: "server-install-1011"
- os: centos-7
suite: "server-configuration-1011"
- os: centos-7
suite: "resources-1011"
- os: centos-7
suite: "replication-1011"
- os: centos-7
suite: "datadir-1011"
- os: centos-7
suite: "port-1011"
- os: centos-7
suite: "galera-configuration-1011"
- os: debian-11
suite: "repository"
- os: debian-11
suite: "client-install"
- os: debian-11
suite: "client-distro-install"
- os: debian-11
suite: "server-install"
- os: debian-11
suite: "server-distro-install"
- os: debian-11
suite: "configuration"
- os: debian-11
suite: "server-configuration"
- os: debian-11
suite: "resources"
- os: debian-11
suite: "replication"
- os: debian-11
suite: "datadir"
- os: debian-11
suite: "port"
- os: debian-11
suite: "galera-configuration"
- "galera-configuration-10"
fail-fast: false

steps:
Expand Down
11 changes: 6 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

## 5.5.5 - *2024-07-15*

Standardise files with files in sous-chefs/repo-management
- Update supported platforms
- Default to MariaDB 11.6 from 10.3
- Update URI for yum and apt repos and GPG keys
- Remove support for AmazonLinux

Standardise files with files in sous-chefs/repo-management
## 5.5.5 - *2024-07-15*

Standardise files with files in sous-chefs/repo-management
- Standardise files with files in sous-chefs/repo-management

## 5.5.4 - *2024-05-06*

Expand Down
85 changes: 30 additions & 55 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,143 +17,118 @@ verifier:

platforms:
- name: almalinux-8
# - name: amazonlinux-2023
- name: debian-10
- name: almalinux-9
- name: centos-stream-9
- name: debian-11
- name: centos-7
- name: centos-stream-8
# - name: fedora-latest
- name: ubuntu-18.04
- name: ubuntu-20.04
- name: debian-12
- name: rockylinux-8
- name: rockylinux-9
- name: ubuntu-20.04
- name: ubuntu-22.04
- name: ubuntu-24.04

suites:
- name: repository
run_list:
- recipe[test::repository]
excludes:
- debian-11
- name: repository-10
run_list:
- recipe[test::repository]
attributes:
mariadb_server_test_version: '10.11'
verifier:
inspec_tests:
- path: test/integration/repository
- name: client_install
run_list:
- recipe[test::client_install]
excludes:
- debian-11
- name: client_install-10
run_list:
- recipe[test::client_install]
attributes:
mariadb_server_test_version: '10.11'
verifier:
inspec_tests:
- path: test/integration/client_install
- name: client_distro_install
run_list:
- recipe[test::client_distro_install]
- name: server_install
run_list:
- recipe[test::server_install]
excludes:
- debian-11
- name: server_install_10.11
- name: server_install-10
run_list:
- recipe[test::server_install]
attributes:
mariadb_server_test_version: '10.11'
verifier:
inspec_tests:
- path: test/integration/server_install
excludes:
- ubuntu-18.04
- centos-7
- name: server_distro_install
run_list:
- recipe[test::server_distro_install]
- name: configuration
run_list:
- recipe[test::configuration]
excludes:
- debian-11
- name: server_configuration
run_list:
- recipe[test::server_configuration]
excludes:
- debian-11
- name: server_configuration_10.11
- name: server_configuration_10
run_list:
- recipe[test::server_configuration]
attributes:
mariadb_server_test_version: '10.11'
verifier:
inspec_tests:
- path: test/integration/server_configuration
excludes:
- ubuntu-18.04
- centos-7
- name: resources
run_list:
- recipe[test::user_database]
excludes:
- debian-11
- name: resources_10.11
- name: resources_10
run_list:
- recipe[test::user_database]
attributes:
mariadb_server_test_version: '10.11'
verifier:
inspec_tests:
- path: test/integration/resources
excludes:
- ubuntu-18.04
- centos-7
- name: replication
run_list:
- recipe[test::replication]
excludes:
- debian-11
- name: replication_10.11
- name: replication_10
run_list:
- recipe[test::replication]
attributes:
mariadb_server_test_version: '10.11'
verifier:
inspec_tests:
- path: test/integration/replication
excludes:
- ubuntu-18.04
- centos-7
- name: datadir
run_list:
- recipe[test::datadir]
excludes:
- debian-11
- name: datadir_10.11
- name: datadir_10
run_list:
- recipe[test::datadir]
verifier:
inspec_tests:
- path: test/integration/datadir
excludes:
- ubuntu-18.04
- centos-7
- name: port
run_list:
- recipe[test::port]
excludes:
- debian-11
- name: port_10.11
- name: port_10
run_list:
- recipe[test::port]
verifier:
inspec_tests:
- path: test/integration/port
excludes:
- ubuntu-18.04
- centos-7
- name: galera_configuration
run_list:
- recipe[test::galera_configuration]
excludes:
- debian-11
- name: galera_configuration_10.11
- name: galera_configuration_10
run_list:
- recipe[test::galera_configuration]
attributes:
mariadb_server_test_version: '10.11'
verifier:
inspec_tests:
- path: test/integration/galera_configuration
excludes:
- ubuntu-18.04
- centos-7
18 changes: 6 additions & 12 deletions libraries/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def secure_random
end

def mariadbbackup_pkg_name
if platform_family?('rhel', 'fedora', 'amazon')
if platform_family?('rhel', 'fedora')
'MariaDB-backup'
else
'mariadb-backup'
Expand Down Expand Up @@ -257,20 +257,14 @@ def yum_repo_url(base_url)

# build the platform string that makes up the final component of the yum repo URL
def yum_repo_platform_string
release = yum_releasever
# Treat Alma and Rocky as RHEL
if platform?('almalinux', 'rocky', 'amazon', 'redhat')
"rhel/#{release}/$basearch"
if platform?('almalinux', 'rocky', 'redhat')
'rhel/$releasever/$basearch'
else
"#{node['platform']}/#{release}/$basearch"
"#{node['platform']}/$releasever/$basearch"
end
end

# on amazon use the RHEL 7 packages. Otherwise use the releasever yum variable
def yum_releasever
platform?('amazon') ? '7' : '$releasever'
end

def default_socket
platform_family?('debian') ? '/var/run/mysqld/mysqld.sock' : '/var/lib/mysql/mysql.sock'
end
Expand All @@ -292,7 +286,7 @@ def default_libgalera_smm_path

def default_mysqld_path
case node['platform_family']
when 'rhel', 'fedora', 'amazon'
when 'rhel', 'fedora'
if new_resource.setup_repo
'/usr/sbin/mysqld'
else
Expand All @@ -304,7 +298,7 @@ def default_mysqld_path
end

def default_selinux_module_path
if platform_family?('rhel', 'fedora', 'amazon')
if platform_family?('rhel', 'fedora')
'/usr/share/mariadb/policy/selinux'
elsif new_resource.setup_repo
'/usr/share/mariadb/policy/selinux'
Expand Down
10 changes: 5 additions & 5 deletions resources/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
provides :mariadb_repository
unified_mode true

property :version, String, default: '10.3'
property :version, String, default: '11.6'
property :enable_mariadb_org, [true, false], default: true
property :yum_gpg_key_uri, String, default: 'https://yum.mariadb.org/RPM-GPG-KEY-MariaDB'
property :yum_gpg_key_uri, String, default: 'https://mirror.mariadb.org/yum/RPM-GPG-KEY-MariaDB'
property :apt_gpg_keyserver, String, default: 'keyserver.ubuntu.com'
property :apt_gpg_key, String, default: lazy {
if node['lsb']['codename'] == 'buster' || node['lsb']['codename'] == 'buster/sid'
Expand All @@ -32,12 +32,12 @@
end
}
property :apt_key_proxy, [String, false], default: false
property :apt_repository_uri, String, default: 'http://mariadb.mirrors.ovh.net/MariaDB/repo'
property :apt_repository_uri, String, default: 'https://mirror.mariadb.org/repo'

action :add do
case node['platform_family']

when 'rhel', 'fedora', 'amazon'
when 'rhel', 'fedora'
remote_file "/etc/pki/rpm-gpg/RPM-GPG-KEY-MariaDB-#{new_resource.version}" do
source new_resource.yum_gpg_key_uri
end
Expand All @@ -52,7 +52,7 @@
yum_repository "MariaDB #{new_resource.version}" do
repositoryid "mariadb#{new_resource.version}"
description "MariaDB.org #{new_resource.version}"
baseurl yum_repo_url('http://yum.mariadb.org')
baseurl yum_repo_url('https://mirror.mariadb.org/yum')
enabled new_resource.enable_mariadb_org
options opts
gpgcheck true
Expand Down
2 changes: 1 addition & 1 deletion test/cookbooks/test/attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Which default MariaDB version to use for testing (can be overridden in kitchen.yml)
default['mariadb_server_test_version'] = '10.3'
default['mariadb_server_test_version'] = '11.6'
Loading

0 comments on commit 2797081

Please sign in to comment.