From 7acc94f6a29d48983b30fad527ce28730357f183 Mon Sep 17 00:00:00 2001 From: Trey Dockendorf Date: Sat, 6 Mar 2021 18:51:03 -0500 Subject: [PATCH 1/4] Support Ubuntu 20.04 --- .github/workflows/ci.yaml | 1 + .sync.yml | 1 + README.md | 6 ++++-- metadata.json | 3 ++- spec/acceptance/nodesets/ubuntu-2004.yml | 25 ++++++++++++++++++++++++ 5 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 spec/acceptance/nodesets/ubuntu-2004.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ac42dc29..e0d71488 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -60,6 +60,7 @@ jobs: - "debian-9" - "debian-10" - "ubuntu-1804" + - "ubuntu-2004" puppet: - "puppet6" - "puppet7" diff --git a/.sync.yml b/.sync.yml index e6d05c6b..f6050dfe 100644 --- a/.sync.yml +++ b/.sync.yml @@ -18,6 +18,7 @@ - debian-9 - debian-10 - ubuntu-1804 + - ubuntu-2004 puppet: - puppet6 - puppet7 diff --git a/README.md b/README.md index 17f27e6f..6753c41e 100644 --- a/README.md +++ b/README.md @@ -538,7 +538,9 @@ keycloak_required_action { 'webauthn-register on master': This module has been tested on: -* CentOS 7 x86_64 -* RedHat 7 x86_64 +* RedHat/CentOS 7 x86_64 +* RedHat/CentOS 8 x86_64 * Debian 9 x86_64 +* Debian 10 x86_64 * Ubuntu 18.04 x86_64 +* Ubuntu 20.04 x86_64 diff --git a/metadata.json b/metadata.json index b2b469b4..e44a9a36 100644 --- a/metadata.json +++ b/metadata.json @@ -77,7 +77,8 @@ { "operatingsystem": "Ubuntu", "operatingsystemrelease": [ - "18.04" + "18.04", + "20.04" ] } ], diff --git a/spec/acceptance/nodesets/ubuntu-2004.yml b/spec/acceptance/nodesets/ubuntu-2004.yml new file mode 100644 index 00000000..5ea5eeeb --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-2004.yml @@ -0,0 +1,25 @@ +HOSTS: + ubuntu2004: + roles: + - agent + platform: ubuntu-20.04-amd64 + hypervisor : docker + image: ubuntu:20.04 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - "rm -f /etc/dpkg/dpkg.cfg.d/excludes" + - 'apt-get install -y wget net-tools locales apt-transport-https ca-certificates' + - 'locale-gen en_US.UTF-8' + docker_env: + - LANG=en_US.UTF-8 + - LANGUAGE=en_US.UTF-8 + - LC_ALL=en_US.UTF-8 + docker_container_name: 'keycloak-ubuntu2004' +CONFIG: + log_level: debug + type: foss +ssh: + password: root + auth_methods: ["password"] + From af4b4b838265acb1dca8b7b0be800e6192dbb25c Mon Sep 17 00:00:00 2001 From: Trey Dockendorf Date: Sat, 6 Mar 2021 20:31:58 -0500 Subject: [PATCH 2/4] Bump dependency on puppetlabs/java and puppetlabs/postgresql --- .fixtures.yml | 4 ++-- metadata.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.fixtures.yml b/.fixtures.yml index 2f948b44..e1431928 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -8,10 +8,10 @@ fixtures: ref: v10.2.0 postgresql: repo: https://github.com/puppetlabs/puppetlabs-postgresql.git - ref: v6.4.0 + ref: v6.6.0 java: repo: https://github.com/puppetlabs/puppetlabs-java.git - ref: v5.0.0 + ref: v6.3.0 java_ks: repo: https://github.com/puppetlabs/puppetlabs-java_ks.git ref: 1.4.1 diff --git a/metadata.json b/metadata.json index e44a9a36..358b4edb 100644 --- a/metadata.json +++ b/metadata.json @@ -18,11 +18,11 @@ }, { "name": "puppetlabs/postgresql", - "version_requirement": ">= 6.4.0 <7.0.0" + "version_requirement": ">= 6.6.0 <8.0.0" }, { "name": "puppetlabs/java", - "version_requirement": ">= 5.0.0 <7.0.0" + "version_requirement": ">= 6.3.0 <8.0.0" }, { "name": "puppetlabs/java_ks", From bfda8053d44ac7185067c49215751b48ff14c8f1 Mon Sep 17 00:00:00 2001 From: Trey Dockendorf Date: Sun, 7 Mar 2021 09:42:58 -0500 Subject: [PATCH 3/4] Bump version requirement for mysql and java_ks modules --- .fixtures.yml | 2 +- metadata.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.fixtures.yml b/.fixtures.yml index e1431928..7cfde05a 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -5,7 +5,7 @@ fixtures: ref: 4.25.0 mysql: repo: https://github.com/puppetlabs/puppetlabs-mysql.git - ref: v10.2.0 + ref: v10.3.0 postgresql: repo: https://github.com/puppetlabs/puppetlabs-postgresql.git ref: v6.6.0 diff --git a/metadata.json b/metadata.json index 358b4edb..9e1ad048 100644 --- a/metadata.json +++ b/metadata.json @@ -14,7 +14,7 @@ }, { "name": "puppetlabs/mysql", - "version_requirement": ">= 10.2.0 <11.0.0" + "version_requirement": ">= 10.3.0 <12.0.0" }, { "name": "puppetlabs/postgresql", @@ -26,11 +26,11 @@ }, { "name": "puppetlabs/java_ks", - "version_requirement": ">= 1.0.0 <4.0.0" + "version_requirement": ">= 1.0.0 <5.0.0" }, { "name": "puppetlabs/augeas_core", - "version_requirement": ">= 1.0.0 <4.0.0" + "version_requirement": ">= 1.0.0 <2.0.0" }, { "name": "puppetlabs/yumrepo_core", From ca96534f9baf0519021212080383d47d5126f160 Mon Sep 17 00:00:00 2001 From: Trey Dockendorf Date: Sun, 7 Mar 2021 09:43:04 -0500 Subject: [PATCH 4/4] More changes to fix Ubuntu 20.04 support --- .sync.yml | 3 +++ manifests/init.pp | 3 ++- spec/acceptance/nodesets/ubuntu-2004.yml | 2 +- spec/spec_helper_acceptance_setup.rb | 14 +++++++------- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.sync.yml b/.sync.yml index f6050dfe..11d0797d 100644 --- a/.sync.yml +++ b/.sync.yml @@ -82,3 +82,6 @@ spec/acceptance/nodesets/ubuntu-1604.yml: spec/acceptance/nodesets/ubuntu-1804.yml: packages: - iproute2 +spec/acceptance/nodesets/ubuntu-2004.yml: + packages: + - iproute2 diff --git a/manifests/init.pp b/manifests/init.pp index 2629c246..7dcb071d 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -420,7 +420,8 @@ } } 'Debian': { - if $facts['os']['name'] == 'Debian' and versioncmp($facts['os']['release']['major'], '10') >= 0 { + if ($facts['os']['name'] == 'Debian' and versioncmp($facts['os']['release']['major'], '10') >= 0) or + ($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['major'], '20.04') >= 0) { $mysql_datasource_class = pick($datasource_xa_class, 'org.mariadb.jdbc.MariaDbDataSource') $mysql_jar_source = '/usr/share/java/mariadb-java-client.jar' } else { diff --git a/spec/acceptance/nodesets/ubuntu-2004.yml b/spec/acceptance/nodesets/ubuntu-2004.yml index 5ea5eeeb..346a6a3a 100644 --- a/spec/acceptance/nodesets/ubuntu-2004.yml +++ b/spec/acceptance/nodesets/ubuntu-2004.yml @@ -9,7 +9,7 @@ HOSTS: docker_cmd: '["/sbin/init"]' docker_image_commands: - "rm -f /etc/dpkg/dpkg.cfg.d/excludes" - - 'apt-get install -y wget net-tools locales apt-transport-https ca-certificates' + - 'apt-get install -y wget net-tools locales apt-transport-https ca-certificates iproute2' - 'locale-gen en_US.UTF-8' docker_env: - LANG=en_US.UTF-8 diff --git a/spec/spec_helper_acceptance_setup.rb b/spec/spec_helper_acceptance_setup.rb index 1318e66b..e66b16d0 100644 --- a/spec/spec_helper_acceptance_setup.rb +++ b/spec/spec_helper_acceptance_setup.rb @@ -23,12 +23,12 @@ data_hash: yaml_data hierarchy: - name: 'os family major release' - path: "os/%{facts.os.family}/%{facts.os.release.major}.yaml" + path: "os/%{facts.os.name}/%{facts.os.release.major}.yaml" - name: "Common" path: "common.yaml" EOS -# Hack until released: https://github.com/puppetlabs/puppetlabs-mysql/pull/1264 -debian10_yaml = <<-EOS +# TODO: Use until released https://github.com/puppetlabs/puppetlabs-mysql/pull/1373 +ubuntu2004_yaml = <<-EOS mysql::bindings::java_package_name: libmariadb-java EOS centos7_yaml = <<-EOS @@ -43,7 +43,7 @@ create_remote_file(hosts, '/etc/puppetlabs/puppet/hiera.yaml', hiera_yaml) on hosts, 'mkdir -p /etc/puppetlabs/puppet/data' create_remote_file(hosts, '/etc/puppetlabs/puppet/data/common.yaml', common_yaml) -on hosts, 'mkdir -p /etc/puppetlabs/puppet/data/os/Debian' -create_remote_file(hosts, '/etc/puppetlabs/puppet/data/os/Debian/10.yaml', debian10_yaml) -on hosts, 'mkdir -p /etc/puppetlabs/puppet/data/os/RedHat' -create_remote_file(hosts, '/etc/puppetlabs/puppet/data/os/RedHat/7.yaml', centos7_yaml) +on hosts, 'mkdir -p /etc/puppetlabs/puppet/data/os/Ubuntu' +create_remote_file(hosts, '/etc/puppetlabs/puppet/data/os/Ubuntu/20.04.yaml', ubuntu2004_yaml) +on hosts, 'mkdir -p /etc/puppetlabs/puppet/data/os/CentOS' +create_remote_file(hosts, '/etc/puppetlabs/puppet/data/os/CentOS/7.yaml', centos7_yaml)