Solved MySQL installation in simple installation scenario.
This commit is contained in:
parent
267035464c
commit
2f8384069d
@ -13,7 +13,7 @@
|
||||
#
|
||||
class mysql (
|
||||
$package_name = $mysql::params::client_package_name,
|
||||
$package_ensure = 'present'
|
||||
$package_ensure = $mysql::params::client_version
|
||||
) inherits mysql::params {
|
||||
|
||||
package { 'mysql_client':
|
||||
|
@ -30,9 +30,13 @@ class mysql::params {
|
||||
'RedHat': {
|
||||
$basedir = '/usr'
|
||||
$datadir = '/var/lib/mysql'
|
||||
$service_name = 'mysqld'
|
||||
$service_name = 'mysql'
|
||||
$client_package_name = 'MySQL-client'
|
||||
$client_version = '5.5.28-6'
|
||||
$server_package_name = 'MySQL-server'
|
||||
$server_version = '5.5.28-6'
|
||||
$shared_package_name = 'MySQL-shared'
|
||||
$shared_version = '5.5.28_wsrep_23.7'
|
||||
$socket = '/var/lib/mysql/mysql.sock'
|
||||
$pidfile = '/var/run/mysqld/mysqld.pid'
|
||||
$config_file = '/etc/my.cnf'
|
||||
@ -52,7 +56,11 @@ class mysql::params {
|
||||
$datadir = '/var/lib/mysql'
|
||||
$service_name = 'mysql'
|
||||
$client_package_name = 'mysql-client'
|
||||
$client_version = '5.5.28'
|
||||
$server_package_name = 'mysql-server'
|
||||
$server_version = '5.5.28-23.7'
|
||||
$shared_package_name = 'mysql-common'
|
||||
$shared_version = '5.5.28'
|
||||
$socket = '/var/run/mysqld/mysqld.sock'
|
||||
$pidfile = '/var/run/mysqld/mysqld.pid'
|
||||
$config_file = '/etc/mysql/my.cnf'
|
||||
@ -71,7 +79,11 @@ class mysql::params {
|
||||
$datadir = '/var/db/mysql'
|
||||
$service_name = 'mysql-server'
|
||||
$client_package_name = 'databases/mysql55-client'
|
||||
$client_version = 'latest'
|
||||
$server_package_name = 'databases/mysql55-server'
|
||||
$server_version = 'latest'
|
||||
$shared_package_name = 'databases/mysql55-server'
|
||||
$shared_version = 'latest'
|
||||
$socket = '/tmp/mysql.sock'
|
||||
$pidfile = '/var/db/mysql/mysql.pid'
|
||||
$config_file = '/var/db/mysql/my.cnf'
|
||||
|
@ -27,15 +27,27 @@ class mysql::server (
|
||||
$galera_node_address = undef,
|
||||
$galera_nodes = undef
|
||||
) inherits mysql::params {
|
||||
|
||||
|
||||
if ($custom_setup_class == undef) {
|
||||
include mysql
|
||||
Class['mysql::server'] -> Class['mysql::config']
|
||||
Class['mysql'] -> Class['mysql::server']
|
||||
|
||||
create_resources( 'class', { 'mysql::config' => $config_hash } )
|
||||
# exec { "debug-mysql-server-installation" :
|
||||
# command => "/usr/bin/yum -d 10 -e 10 -y install MySQL-server-5.5.28-6 2>&1 | tee mysql_install.log",
|
||||
# before => Package["mysql-server"],
|
||||
# logoutput => true,
|
||||
# }
|
||||
package { 'mysql-server':
|
||||
name => $package_name,
|
||||
ensure => $package_ensure,
|
||||
ensure => $mysql::params::server_version,
|
||||
# require=> Package['mysql-shared'],
|
||||
}
|
||||
# package { 'mysql-client':
|
||||
# name => $package_name,
|
||||
# ensure => $mysql::params::client_version,
|
||||
# }
|
||||
|
||||
service { 'mysqld':
|
||||
name => $service_name,
|
||||
|
@ -6,7 +6,7 @@ socket = <%= socket %>
|
||||
nice = 0
|
||||
[mysqld]
|
||||
user = mysql
|
||||
pid-file = <%= pidfile %>
|
||||
#pid-file = <%= pidfile %>
|
||||
socket = <%= socket %>
|
||||
port = <%= port %>
|
||||
basedir = <%= basedir %>
|
||||
|
Loading…
Reference in New Issue
Block a user