Skip to content

Puppetmodule to install and configure MariaDBs Maxscale service

Notifications You must be signed in to change notification settings

Kotty666/Kotty666-maxscale

Repository files navigation

maxscale

Puppet Forge Github Tag Build Status

Table of Contents

  1. Description
  2. Setup - The basics of getting started with maxscale
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module
  6. Contributers

Description

Puppetmodule for installing and configuring the MaxScale database gateway which is developed by the MariaDB.

Setup

What maxscale affects

  • Installs maxscale in version 2.5
  • overrides /etc/maxscale.cnf
  • adds per default the mariadb-maxscale repository and its key to the system

Setup Requirements

  • the module requires:
    • puppetlabs-stdlib
    • puppetlabs-apt (only if you wish to use the repo management)
    • puppetlabs-concat

Beginning with maxscale

This code will

  • install maxscale from the mariadb repo
  • configure a galera monitor
  • adds 2 sample servers
  • adds a Maxscale CLI Listener
  • adds the Maxscale CLI Service
# add the default configuration and Package installation
include maxscale

# Configure the Galera Monitor to check the Nodes
::maxscale::config::monitor{"Galera":
  module  => 'galeramon',
  servers => 'mydb01,mydb02',
  user    => 'Monitor',
  password  => 'SamplePassword',
}

# Create the Server resources
::maxscale::config::server{"mydb01":
  address => '192.168.0.1',
}
::maxscale::config::server{"mydb02":
  address => '192.168.0.2',
}

# Create the Commandlineinterface Service
::maxscale::config::service{"CLI":
  router => "cli",
}

# Add the connection Listener for the CLI Service
::maxscale::config::listener{"CLI Listener":
  service  => "CLI",
  protocol => "MariaDBClient",
  address  => "localhost",
  port     => 6603,
}

Usage

Using the default values:

include maxscale

Variables and Default values for the Package and main configuration

class {'maxscale':
  package_name              => 'maxscale',
  setup_mariadb_repository  => true,
  service_enable            => true,
  threads                   => 'auto',
  auth_connect_timeout      => 3,
  auth_read_timeout         => 1,
  auth_write_timeout        => 2,
  ms_timestamp              => 0,
  syslog                    => 0,
  maxlog                    => 1,
  log_warning               => 1,
  log_notice                => 0,
  log_info                  => 0,
  log_debug                 => 0,
  log_augmentation          => 0,
  logdir                    => '/var/log/maxscale/',
  datadir                   => '/var/lib/maxscale/data/',
  cachedir                  => '/var/cache/maxscale/',
  piddir                    =>  '/var/run/maxscale/',
}

Configuration and default values for a Listener

::maxscale::config::listener{"Listener Name":
  service,
  protocol,
  port,
  socket => undef,
  address => undef,
  ssl => undef,
  ssl_key => undef,
  ssl_cert => undef,
  ssl_ca_cert => undef,
  ssl_version => undef,
  ssl_cert_verification_depth => undef,
}

Configuration and default values for a Monitor

::maxscale::config::monitor{"Monitor Name":
  module,
  servers,
  user => undef,
  password => undef,
  monitor_interval => undef,
  backend_connect_timeout => undef,
  backend_write_timeout => undef,
  backend_read_timeout => undef,
}

Configuration and default values for a Server

::maxscale::config::server{"ServerName":
  address,
  port => 3306,
  protocol => 'MySQLBackend',
  monitoruser => undef,
  monitorpw => undef,
  persistpoolmax => undef,
  persistmaxtime => undef,
  serv_weight => undef,
}

Configuration and default values for a Service

::maxscale::config::service{"ServiceName":
  router,
  servers => undef,
  router_options => undef,
  filters => undef,
  user => undef,
  password => undef,
  enable_root_user => 0,
  localhost_match_wildcard_host => 1,
  version_string=>'MaxScale',
  weightby => undef,
  auth_all_servers => 1,
  strip_db_esc => 1,
  optimize_wildcard => 1,
  retry_on_failure => 1,
  log_auth_warnings => 0,
  connection_timeout => undef,
  max_slave_connections => undef,
  max_slave_replication_lag => undef,
  use_sql_variables_in => undef,
}

Limitations

Tested on Debian wheezy and jessie with maxscale version 1.4.1 (GA), this should also work on Ubuntu 12.04, 14.04, 15.10

Development

If you have whishes for features let me know.

Contributers

Release PR/Issue Contributer
1.0.0 @Kotty666
1.0.9 @xalimar

About

Puppetmodule to install and configure MariaDBs Maxscale service

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •