Skip to content

Remove EOL platforms Debian 8 and Ubuntu 14.04 #1406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .nodeset.yml

This file was deleted.

28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ $override_options = {

For options that you would traditionally represent in this format:

```
```ini
[section]
thing = X
```
Expand All @@ -88,7 +88,7 @@ $override_options = {

produces

```puppet
```ini
[mysqld]
replicate-do-db = base1
replicate-do-db = base2
Expand Down Expand Up @@ -176,7 +176,7 @@ mysql_user { 'root@::1':

To instantiate databases and users on an existing MySQL server, you need a `.my.cnf` file in `root`'s home directory. This file must specify the remote server address and credentials. For example:

```puppet
```ini
[client]
user=root
host=localhost
Expand Down Expand Up @@ -252,7 +252,7 @@ yumrepo { 'percona':
gpgcheck => 1,
}

class {'mysql::server':
class { 'mysql::server':
package_name => 'Percona-Server-server-57',
service_name => 'mysql',
config_file => '/etc/my.cnf',
Expand All @@ -266,7 +266,7 @@ class {'mysql::server':
mysqld_safe => {
log-error => '/var/log/mysqld.log',
},
}
},
}

# Note: Installing Percona-Server-server-57 also installs Percona-Server-client-57.
Expand Down Expand Up @@ -349,7 +349,7 @@ class { 'mysql::server':
mysqld_safe => {
'log-error' => '/var/log/mysql/mariadb.log',
},
}
},
}

# Dependency management. Only use that part if you are installing the repository
Expand All @@ -367,7 +367,7 @@ This example shows how to install the MariaDB client and all of the bindings at
Specify the version of the package you want with the `package_ensure` parameter.

```puppet
class {'::mysql::client':
class { 'mysql::client':
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is just style updates I missed on the last pass

package_name => 'mariadb-client',
package_ensure => '1:10.3.21+maria~xenial',
bindings_enable => true,
Expand All @@ -376,7 +376,7 @@ class {'::mysql::client':
# Dependency management. Only use that part if you are installing the repository as shown in the Preliminary step of this example.
Apt::Source['mariadb'] ~>
Class['apt::update'] ->
Class['::mysql::client']
Class['mysql::client']
```

### Install MySQL Community server on CentOS
Expand All @@ -391,7 +391,7 @@ You can install MySQL Community Server on CentOS using the mysql module and Hier
In Puppet:

```puppet
include ::mysql::server
include mysql::server

create_resources(yumrepo, hiera('yumrepo', {}))

Expand Down Expand Up @@ -602,11 +602,11 @@ When the `/root/.mylogin.cnf` exists the environment variable `MYSQL_TEST_LOGIN_
This is required if `create_root_user` and `create_root_login_file` are true. If `root_password` is 'UNSET', then `create_root_user` and `create_root_login_file` are assumed to be false --- that is, the MySQL root user and `/root/.mylogin.cnf` are not created.

```puppet
class { '::mysql::server':
root_password => 'password',
create_root_my_cnf => false,
create_root_login_file => true,
login_file => "puppet:///modules/${module_name}/mylogin.cnf",
class { 'mysql::server':
root_password => 'password',
create_root_my_cnf => false,
create_root_login_file => true,
login_file => 'puppet:///modules/${module_name}/mylogin.cnf',
}
```

Expand Down
4 changes: 1 addition & 3 deletions manifests/backup/mysqlbackup.pp
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@
}

if $install_cron {
if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '5' {
ensure_packages('crontabs')
} elsif $::osfamily == 'RedHat' {
if $::osfamily == 'RedHat' {
ensure_packages('cronie')
} elsif $::osfamily != 'FreeBSD' {
ensure_packages('cron')
Expand Down
4 changes: 1 addition & 3 deletions manifests/backup/mysqldump.pp
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@
}

if $install_cron {
if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '5' {
ensure_packages('crontabs')
} elsif $::osfamily == 'RedHat' {
if $::osfamily == 'RedHat' {
ensure_packages('cronie')
} elsif $::osfamily != 'FreeBSD' {
ensure_packages('cron')
Expand Down
4 changes: 1 addition & 3 deletions manifests/backup/xtrabackup.pp
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@
}

if $install_cron {
if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '5' {
ensure_packages('crontabs')
} elsif $::osfamily == 'RedHat' {
if $::osfamily == 'RedHat' {
ensure_packages('cronie')
} elsif $::osfamily != 'FreeBSD' {
ensure_packages('cron')
Expand Down
76 changes: 21 additions & 55 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -123,28 +123,24 @@
'Suse': {
case $::operatingsystem {
'OpenSuSE': {
if versioncmp( $::operatingsystemmajrelease, '12' ) >= 0 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

12 is the smallest version we support (we support 12 and 15) so no need for the comparison.

$client_package_name = 'mariadb-client'
$server_package_name = 'mariadb'
# First service start fails if this is set. Runs fine without
# it being set, in any case. Leaving it as-is for the mysql.
$basedir = undef
} else {
$client_package_name = 'mysql-community-server-client'
$server_package_name = 'mysql-community-server'
$basedir = '/usr'
}
$socket = '/var/run/mysql/mysql.sock'
$log_error = '/var/log/mysql/mysqld.log'
$pidfile = '/var/run/mysql/mysqld.pid'
$ruby_package_name = 'rubygem-mysql'
$client_package_name = 'mariadb-client'
$server_package_name = 'mariadb'
# First service start fails if this is set. Runs fine without
# it being set, in any case. Leaving it as-is for the mysql.
$basedir = undef
}
'SLES','SLED': {
if versioncmp($::operatingsystemrelease, '12') >= 0 {
$client_package_name = 'mariadb-client'
$server_package_name = 'mariadb'
$basedir = undef
} else {
$client_package_name = 'mysql-client'
$server_package_name = 'mysql'
$basedir = '/usr'
}
$socket = '/run/mysql/mysql.sock'
$log_error = '/var/log/mysqld.log'
$pidfile = '/var/lib/mysql/mysqld.pid'
$ruby_package_name = 'ruby-mysql'
$client_package_name = 'mariadb-client'
$server_package_name = 'mariadb'
$basedir = undef
}
default: {
fail("Unsupported platform: puppetlabs-${module_name} currently doesn\'t support ${::operatingsystem}.")
Expand All @@ -153,31 +149,13 @@
$config_file = '/etc/my.cnf'
$includedir = '/etc/my.cnf.d'
$datadir = '/var/lib/mysql'
$log_error = $::operatingsystem ? {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already a conditional above, so removing this pattern and adding to the correct block above.

/OpenSuSE/ => '/var/log/mysql/mysqld.log',
/(SLES|SLED)/ => '/var/log/mysqld.log',
}
$pidfile = $::operatingsystem ? {
/OpenSuSE/ => '/var/run/mysql/mysqld.pid',
/(SLES|SLED)/ => '/var/lib/mysql/mysqld.pid',
}
$root_group = 'root'
$mysql_group = 'mysql'
$mycnf_owner = undef
$mycnf_group = undef
$server_service_name = 'mysql'
$xtrabackup_package_name_override = 'xtrabackup'

if $::operatingsystem =~ /(SLES|SLED)/ {
if versioncmp( $::operatingsystemmajrelease, '12' ) >= 0 {
$socket = '/run/mysql/mysql.sock'
} else {
$socket = '/var/lib/mysql/mysql.sock'
}
} else {
$socket = '/var/run/mysql/mysql.sock'
}

$ssl_ca = '/etc/mysql/cacert.pem'
$ssl_cert = '/etc/mysql/server-cert.pem'
$ssl_key = '/etc/mysql/server-key.pem'
Expand All @@ -188,18 +166,14 @@
$perl_package_name = 'perl-DBD-mysql'
$php_package_name = 'apache2-mod_php53'
$python_package_name = 'python-mysql'
$ruby_package_name = $::operatingsystem ? {
/OpenSuSE/ => 'rubygem-mysql',
/(SLES|SLED)/ => 'ruby-mysql',
}
$client_dev_package_name = 'libmysqlclient-devel'
$daemon_dev_package_name = 'mysql-devel'
}

'Debian': {
if $::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') >= 0 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We support Debian 9 and 10 so all Debian is at least version 9 :)

if $::operatingsystem == 'Debian' {
$provider = 'mariadb'
} else {
} else { # Ubuntu
$provider = 'mysql'
}
if $provider == 'mariadb' {
Expand Down Expand Up @@ -242,7 +216,7 @@
}
$perl_package_name = 'libdbd-mysql-perl'
if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '16.04') >= 0) or
($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') >= 0) {
($::operatingsystem == 'Debian') {
$php_package_name = 'php-mysql'
} else {
$php_package_name = 'php5-mysql'
Expand All @@ -260,10 +234,8 @@
}

$ruby_package_name = $facts['os']['release']['major'] ? {
'8' => 'ruby-mysql', # jessie
'9' => 'ruby-mysql2', # stretch
'10' => 'ruby-mysql2', # buster
'14.04' => 'ruby-mysql', # trusty
'16.04' => 'ruby-mysql', # xenial
'18.04' => 'ruby-mysql2', # bionic
'20.04' => 'ruby-mysql2', # focal
Expand Down Expand Up @@ -487,13 +459,7 @@

case $::operatingsystem {
'Ubuntu': {
# lint:ignore:only_variable_string
if versioncmp("${::operatingsystemmajrelease}", '14.10') > 0 {
# lint:endignore
$server_service_provider = 'systemd'
} else {
$server_service_provider = 'upstart'
}
$server_service_provider = 'systemd'
}
'Alpine': {
$server_service_provider = 'rc-service'
Expand Down Expand Up @@ -579,6 +545,6 @@

## Additional graceful failures
if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '4' and $::operatingsystem != 'Amazon' {
fail("Unsupported platform: puppetlabs-${module_name} only supports RedHat 5.0 and beyond.")
fail("Unsupported platform: puppetlabs-${module_name} only supports RedHat 6.0 and beyond.")
}
}
1 change: 0 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"14.04",
"16.04",
"18.04"
]
Expand Down
7 changes: 0 additions & 7 deletions provision.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@ vagrant:
travis_deb:
provisioner: docker
images:
- litmusimage/debian:8
- litmusimage/debian:9
- litmusimage/debian:10
travis_ub_5:
provisioner: docker
images:
- litmusimage/ubuntu:14.04
- litmusimage/ubuntu:16.04
- litmusimage/ubuntu:18.04
travis_ub_6:
provisioner: docker
images:
- litmusimage/ubuntu:14.04
- litmusimage/ubuntu:16.04
- litmusimage/ubuntu:18.04
- litmusimage/ubuntu:20.04
Expand Down Expand Up @@ -51,10 +48,8 @@ release_checks_5:
- oracle-7-x86_64
- scientific-6-x86_64
- scientific-7-x86_64
- debian-8-x86_64
- debian-9-x86_64
- debian-10-x86_64
- ubuntu-1404-x86_64
- ubuntu-1604-x86_64
- ubuntu-1804-x86_64
release_checks_6:
Expand All @@ -71,10 +66,8 @@ release_checks_6:
- oracle-7-x86_64
- scientific-6-x86_64
- scientific-7-x86_64
- debian-8-x86_64
- debian-9-x86_64
- debian-10-x86_64
- ubuntu-1404-x86_64
- ubuntu-1604-x86_64
- ubuntu-1804-x86_64
- ubuntu-2004-x86_64
Expand Down
Loading