Andrew Bogott has submitted this change and it was merged.

Change subject: Change the labs rt role to use the mysql module.
......................................................................


Change the labs rt role to use the mysql module.

Add temporary role::labs-mysql-server-test class to use the mysql module.

Change-Id: Ic7ac381c7fa848ef4670961b86384be60b81003f
---
M manifests/role/labsmysql.pp
M manifests/role/request-tracker.pp
2 files changed, 28 insertions(+), 8 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/manifests/role/labsmysql.pp b/manifests/role/labsmysql.pp
index 2f7be92..9df855c 100644
--- a/manifests/role/labsmysql.pp
+++ b/manifests/role/labsmysql.pp
@@ -1,5 +1,25 @@
 #include "mysql.db"
 
+class role::labs-mysql-server-new {
+
+    $datadir = $::mysql_datadir ? {
+        undef   => '/mnt/mysql',
+        default => $::mysql_datadir,
+    }
+    $bind_address = $::mysql_server_bind_address ? {
+        undef   => '127.0.0.1',
+        default => $::mysql_server_bind_address
+    }
+
+    class { 'mysql::server':
+        config_hash => {
+            # Move mysql data to a place where there's actually space.
+            'datadir' => $role::labs-mysql-server::datadir,
+            'bind_address' => $role::labs-mysql-server::bind_address,
+        }
+    }
+}
+
 class role::labs-mysql-server {
        class { "generic::mysql::server":
                # Move mysql data to a place where there's actually space.
diff --git a/manifests/role/request-tracker.pp 
b/manifests/role/request-tracker.pp
index 146bda4..a9ccfb0 100644
--- a/manifests/role/request-tracker.pp
+++ b/manifests/role/request-tracker.pp
@@ -3,24 +3,24 @@
 class role::request-tracker-apache::labs {
        include passwords::misc::rt
 
+       $datadir = "/srv/mysql"
+
        class { "misc::rt-apache::server":
                dbuser => $passwords::misc::rt::rt_mysql_user,
                dbpass => $passwords::misc::rt::rt_mysql_pass,
                site => $::fqdn,
-               datadir => "/a/mysql",
+               datadir => $datadir,
        }
 
-       class { 'generic::mysql::server':
-               version => $::lsbdistrelease ? {
-                       '12.04' => '5.5',
-                       default => false,
-               },
-               datadir => $datadir;
+       class { 'mysql::server':
+               config_hash => {
+                       'datadir' => $datadir,
+               }
        }
 
        exec { 'rt-db-initialize':
                command => "/bin/echo '' | /usr/sbin/rt-setup-database --action 
init --dba root --prompt-for-dba-password",
-               require => Class['misc::rt-apache::server', 
'generic::mysql::server'],
+               require => Class['misc::rt-apache::server', 'mysql::server'],
                unless  => '/usr/bin/mysqlshow rt4';
        }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic7ac381c7fa848ef4670961b86384be60b81003f
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <[email protected]>
Gerrit-Reviewer: Andrew Bogott <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to