Ask Your Question
0

mariadb puppet config

asked 2015-09-29 08:18:37 -0500

updated 2015-09-29 12:16:17 -0500

ramindk gravatar image

I like to install mariadb in master master config with puppet. But i dont get 1 install to work.

class {'::mysql::params':
    package_name => 'mymariadbpackagename',
}

class {'::mysql::server':
    require => Class['::mysql::params'],
}

I get the error Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter package_name at.

How can i install mariadb on ubuntu 14.04? I'm using the following module.

"name": "puppetlabs-mysql",
"version": "3.6.1",

Thank you in advance.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2015-09-29 11:11:54 -0500

GregLarkin gravatar image

mysql::params is a private class, so you should not declare it yourself. mysql::server inherits its parameters from that class, and package_name is an attribute of the server class. So your code should simply look like this (untested):

class { '::mysql::server':
  package_name => 'mymariadbpackagename',
}

That should do it, and please post back here with any additional questions.

edit flag offensive delete link more
0

answered 2015-09-30 02:22:36 -0500

Thank you GregLarkin, i have managed it to get it to work.

class {'::mysql::server':
    package_name => 'mariadb-server',
    root_password => 'asecretpassword',
    override_options => {
        'mysqld' => {
            'bind_address'  => '0.0.0.0',
            'skip-name-resolve' => '1',
            'expire_logs_days' => '5',
            'max_binlog_size' => '256M',
            'slow_query_log' => '1',
            'slow_query_log_file' => '/var/log/mysql/maria-slow.log',
            'long_query_time' => '1',
            'query_cache_limit' => '1M',
            'query_cache_size' => '128M',
            'tmp_table_size' => '32M',
            'max_heap_table_size' => '32M',
            'join_buffer_size' => '8M',
            'table_open_cache' => '2048',
            'sort_buffer_size' => '32M',
            'max_allowed_packet' => '16M',
            'innodb_file_per_table' => '1',
            'innodb_flush_method' => 'O_DIRECT',
            'innodb_buffer_pool_size' => '1G',
            'innodb_additional_mem_pool_size' => '128M',
            'innodb_flush_log_at_trx_commit' => '0',
            'innodb_log_file_size' => '128M',
            'innodb_log_buffer_size' => '8M',
            'innodb_thread_concurrency' => '50',
            'binlog_format' => 'mixed',
            'server-id' => '1',
            'report_host' => 'master1',
            'log_bin' => '/var/log/mysql/mariadb-bin',
            'log_bin_index' => '/var/log/mysql/mariadb-bin.index',
            'relay_log' => '/var/log/mysql/relay-bin',
            'relay_log_index' => '/var/log/mysql/relay-bin.index'
        }
    }
}
edit flag offensive delete link more

Comments

Glad to help!

GregLarkin gravatar imageGregLarkin ( 2015-09-30 11:37:25 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-09-29 08:18:37 -0500

Seen: 109 times

Last updated: Sep 30 '15