Forge Home

maxscale

Installs and Configures MaxScale from MariaDB

8,617 downloads

129 latest version

4.8 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 2.4.1 (latest)
  • 2.4.0
  • 2.3.1
  • 2.3.0
  • 2.2.0
  • 2.0.2
  • 2.0.1
  • 2.0.0
  • 1.0.8
  • 1.0.7
  • 1.0.6
  • 1.0.5
  • 1.0.4
  • 1.0.3
  • 1.0.2
  • 1.0.1
  • 1.0.0 (deleted)
released Dec 4th 2023
This version is compatible with:
  • Puppet Enterprise 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
  • Puppet >= 5.5.0 < 10.0.0
  • , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'Kotty666-maxscale', '2.4.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add Kotty666-maxscale
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install Kotty666-maxscale --version 2.4.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

Kotty666/maxscale — version 2.4.1 Dec 4th 2023

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