Faidon Liambotis has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/183789

Change subject: coredb_mysql/mysql_wmf: remove MySQL-fb support
......................................................................

coredb_mysql/mysql_wmf: remove MySQL-fb support

We've migrated fully to MariaDB now. Also, no Lucid in any database \o/

There's still some Ubuntu-12.04-specific code, but since the two modules
are deprecated in favor of the mariadb module, just add an "else fail()"
and be done with it.

Change-Id: I8b218226cb00c51b1a0708f32d4823683ae3bfad
---
M manifests/site.pp
M modules/coredb_mysql/manifests/packages.pp
M modules/mysql_wmf/manifests/packages.pp
3 files changed, 41 insertions(+), 87 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/89/183789/1

diff --git a/manifests/site.pp b/manifests/site.pp
index a0e9fb3..af616e3 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2243,8 +2243,7 @@
     include mysql_wmf::mysqluser
     include mysql_wmf::datadirs
     include mysql_wmf::pc::conf
-
-    class { 'mysql_wmf::packages': mariadb => true }
+    include mysql_wmf::packages
 
     system::role { 'mysql::pc::conf':
         description => 'parser cache mysql server',
diff --git a/modules/coredb_mysql/manifests/packages.pp 
b/modules/coredb_mysql/manifests/packages.pp
index 2eb53c5..af64f80 100644
--- a/modules/coredb_mysql/manifests/packages.pp
+++ b/modules/coredb_mysql/manifests/packages.pp
@@ -1,51 +1,30 @@
 # coredb_mysql required packages
-class coredb_mysql::packages ( $mariadb = $::coredb_mysql::mariadb ) {
+class coredb_mysql::packages {
     if $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '12.04') >= 
0 {
-        if $mariadb == true {
-            file { '/etc/apt/sources.list.d/wikimedia-mariadb.list':
-                group  => 'root',
-                mode   => '0444',
-                owner  => 'root',
-                source => 
'puppet:///modules/coredb_mysql/wikimedia-mariadb.list',
-            }
-
-            exec { 'update_mysql_apt':
-                subscribe   => 
File['/etc/apt/sources.list.d/wikimedia-mariadb.list'],
-                command     => '/usr/bin/apt-get update',
-                refreshonly => true,
-            }
-
-            package { [
-                'libmariadbclient18',
-                'mariadb-client-5.5',
-                'mariadb-server-5.5',
-                'mariadb-server-core-5.5',
-            ]:
-                ensure  => present,
-                require => 
File['/etc/apt/sources.list.d/wikimedia-mariadb.list'],
-            }
-
-        } else {
-            package { [
-                'libmysqlfbclient16',
-                'mysqlfb-client-5.1',
-                'mysqlfb-server-5.1',
-                'mysqlfb-server-core-5.1',
-            ]:
-                ensure => '5.1.53-fb3875-wm1',
-            }
+        file { '/etc/apt/sources.list.d/wikimedia-mariadb.list':
+            group  => 'root',
+            mode   => '0444',
+            owner  => 'root',
+            source => 'puppet:///modules/coredb_mysql/wikimedia-mariadb.list',
         }
-    }
 
-    if $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '10.04') == 
0 {
+        exec { 'update_mysql_apt':
+            subscribe   => 
File['/etc/apt/sources.list.d/wikimedia-mariadb.list'],
+            command     => '/usr/bin/apt-get update',
+            refreshonly => true,
+        }
+
         package { [
-            'libmysqlclient16',
-            'mysql-client-5.1',
-            'mysql-server-5.1',
-            'mysql-server-core-5.1',
+            'libmariadbclient18',
+            'mariadb-client-5.5',
+            'mariadb-server-5.5',
+            'mariadb-server-core-5.5',
         ]:
-            ensure => '5.1.53-fb3753-wm1',
+            ensure  => present,
+            require => File['/etc/apt/sources.list.d/wikimedia-mariadb.list'],
         }
+    } else {
+        fail("coredb_mysql is deprecated and does not support ${::lsbdistid}. 
Please use the 'mariadb' module")
     }
 
     package { [
diff --git a/modules/mysql_wmf/manifests/packages.pp 
b/modules/mysql_wmf/manifests/packages.pp
index c97a73d..cc2f197 100644
--- a/modules/mysql_wmf/manifests/packages.pp
+++ b/modules/mysql_wmf/manifests/packages.pp
@@ -3,56 +3,32 @@
 # the wmf production DB systems.  If you want to construct
 # a general-purpose DB server or client, best look elsewhere.
 
-class mysql_wmf::packages(
-    $mariadb = false,
-    ) {
-
+class mysql_wmf::packages {
     if $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '12.04') >= 
0 {
-        if $mariadb == true {
-            file { '/etc/apt/sources.list.d/wikimedia-mariadb.list':
-                group  => 'root',
-                mode   => '0444',
-                owner  => 'root',
-                source => 'puppet:///modules/mysql_wmf/wikimedia-mariadb.list',
-            }
-
-            exec { 'update_mysql_apt':
-                subscribe   => 
File['/etc/apt/sources.list.d/wikimedia-mariadb.list'],
-                command     => '/usr/bin/apt-get update',
-                refreshonly => true,
-            }
-
-            package { [
-                'libmariadbclient18',
-                'mariadb-client-5.5',
-                'mariadb-server-5.5',
-                'mariadb-server-core-5.5',
-            ]:
-                ensure  => present,
-                require => 
File['/etc/apt/sources.list.d/wikimedia-mariadb.list'],
-            }
-
-        } else {
-            package { [
-                'libmysqlfbclient16',
-                'mysqlfb-client-5.1',
-                'mysqlfb-server-5.1',
-                'mysqlfb-server-core-5.1',
-            ]:
-                ensure => '5.1.53-fb3875-wm1',
-            }
+        file { '/etc/apt/sources.list.d/wikimedia-mariadb.list':
+            group  => 'root',
+            mode   => '0444',
+            owner  => 'root',
+            source => 'puppet:///modules/mysql_wmf/wikimedia-mariadb.list',
         }
-    }
 
-    if $::lsbdistid == 'Ubuntu' and versioncmp($::lsbdistrelease, '10.04') == 
0 {
+        exec { 'update_mysql_apt':
+            subscribe   => 
File['/etc/apt/sources.list.d/wikimedia-mariadb.list'],
+            command     => '/usr/bin/apt-get update',
+            refreshonly => true,
+        }
+
         package { [
-            'libmysqlclient16',
-            'mysql-client-5.1',
-            'mysql-server-5.1',
-            'mysql-server-core-5.1',
+            'libmariadbclient18',
+            'mariadb-client-5.5',
+            'mariadb-server-5.5',
+            'mariadb-server-core-5.5',
         ]:
-            ensure => '5.1.53-fb3753-wm1',
+            ensure  => present,
+            require => File['/etc/apt/sources.list.d/wikimedia-mariadb.list'],
         }
+    } else {
+        fail("coredb_mysql is deprecated and does not support ${::lsbdistid}. 
Please use the 'mariadb' module")
     }
 
     package { [

-- 
To view, visit https://gerrit.wikimedia.org/r/183789
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b218226cb00c51b1a0708f32d4823683ae3bfad
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to