Skip to content

Latest commit

 

History

History
661 lines (401 loc) · 19.8 KB

REFERENCE.md

File metadata and controls

661 lines (401 loc) · 19.8 KB

Reference

Table of Contents

Classes

Public Classes

  • galera: Installs MySQL/MariaDB with galera cluster plugin
  • galera::firewall: Open firewall ports used by galera using puppetlabs-firewall.

Private Classes

  • galera::arbitrator: Installs and configures the Arbitrator service.
  • galera::debian: Adds workarounds to solve issues specific to Debian-based systems.
  • galera::redhat: Adds workarounds to solve issues specific to RedHat-based systems.
  • galera::repo: Evaluates which repositories should be enabled depending on $vendor_type and $vendor_version.
  • galera::status: Configures a user and script that will check the status of the galera cluster.
  • galera::validate: Validate that the cluster can accept connections at the point where the mysql::server resource is marked as complete. This is used because after returning success, the service is still not quite ready.

Defined types

Private Defined types

  • galera::repo::config: Configures a APT or YUM repository.

Classes

galera

Installs MySQL/MariaDB with galera cluster plugin

Parameters

The following parameters are available in the galera class:

additional_packages

Data type: Optional[Array]

Specifies a list of additional packages that may be required for SST and other features. The module automatically discovers all additional packages that are required for the selected vendor/sst, but this parameter can be used to overwrite the discovered package list. Default: A vendor-, version- and OS-specific value.

Default value: undef

arbitrator

Data type: Boolean

Specifies whether this node should run Galera Arbitrator instead of a MySQL/MariaDB server.

arbitrator_config_file

Data type: Optional[String]

Specifies the configuration file for the Arbitrator service. Default: A vendor-, version- and OS-specific value.

Default value: undef

arbitrator_log_file

Data type: Optional[String]

Specifies the optional log file for the Arbitrator service. By default it logs to syslog.

Default value: undef

arbitrator_options

Data type: String

Specifies configuration options for the Arbitrator service.

arbitrator_package_ensure

Data type: String

Specifies the ensure state for the Arbitrator package. Valid options: all values supported by the package type. Default: present

arbitrator_package_name

Data type: Optional[String]

Specifies the name of the Arbitrator package to install. Default: A vendor-, version- and OS-specific value.

Default value: undef

arbitrator_service_enabled

Data type: Boolean

Specifies whether the Arbitrator service should be enabled. Expects that $arbitrator is also set to true. Default: true

arbitrator_service_name

Data type: Optional[String]

Specifies the name of the Arbitrator service. Default: A vendor-, version- and OS-specific value.

Default value: undef

arbitrator_template

Data type: String

Specifies the template to use when creating $arbitrator_config_file.

bind_address

Data type: String

Specifies the IP address to bind MySQL/MariaDB to. The module expects the server to listen on localhost for proper operation. Default: ::

bootstrap_command

Data type: Optional[String]

Specifies a command used to bootstrap the galera cluster. Default: A vendor-, version- and OS-specific bootstrap command.

Default value: undef

client_package_name

Data type: Optional[String]

Specifies the name of the MySQL/MariaDB client package to install. Default: A vendor-, version- and OS-specific value.

Default value: undef

cluster_name

Data type: String

Specifies the name of the cluster and should be identical on all nodes. This must be set for the module to work properly (although galera does not require this value.)

configure_firewall

Data type: Boolean

Specifies whether to open firewall ports used by galera using puppetlabs-firewall. Default: true

configure_repo

Data type: Boolean

Specifies whether to configure additional repositories that are required for installing galera. Default: true

create_root_my_cnf

Data type: Boolean

A flag to indicate if we should manage the root .my.cnf. Set this to false if you wish to manage your root .my.cnf file elsewhere. Default: true

create_root_user

Data type: Optional[Boolean]

A flag to indicate if we should manage the root user. Set this to false if you wish to manage your root user elsewhere. If this is set to undef, the module will use true if this node is $galera_master. Default: undef

Default value: undef

create_status_user

Data type: Boolean

A flag to indicate if we should manage the status user. Set this to false if you wish to manage your status user elsewhere. Default: true

deb_sysmaint_password

Data type: String

Specifies the password to set on Debian/Ubuntu for the sysmaint user used during updates. Default: sysmaint

default_options

Data type: Hash

Internal parameter, do NOT change! Use $override_options to customize MySQL options.

epel_needed

Data type: Boolean

Specifies whether or not the EPEL repository should be enabled on RedHat-based systems. This is required for certain vendors and SST methods to install packages such as socat. Default: true

galera_master

Data type: String

Specifies the node that will bootstrap the cluster if all nodes go down. Default: $fqdn

galera_package_ensure

Data type: Optional[String]

Specifies the ensure state for the galera package. Note that some vendors do not allow installation of the wsrep-enabled MySQL/MariaDB and galera (arbitrator) on the same server. Valid options: all values supported by the package type. Default: absent

Default value: undef

galera_package_name

Data type: Optional[String]

Specifies the name of the galera wsrep package to install. Default: A vendor-, version- and OS-specific value.

Default value: undef

galera_servers

Data type: Optional[Array]

Specifies a list of IP addresses of the nodes in the galera cluster. Default: [${facts['networking']['ip']}]

Default value: undef

libgalera_location

Data type: Optional[String]

Specifies the location of the WSREP libraries.

Default value: undef

local_ip

Data type: String

Specifies the IP address of this node to use for communications. Default: $networking.ip

manage_additional_packages

Data type: Boolean

Specifies whether additional packages should be installed that may be required for SST and other features. Default: true

mysql_package_name

Data type: Optional[String]

Specifies the name of the server package to install. Default: A vendor-, version- and OS-specific value.

Default value: undef

mysql_port

Data type: Integer

Specifies the port to use for MySQL/MariaDB. Default: 3306

mysql_restart

Data type: Boolean

Specifies the option to pass through to mysql::server::restart. This can cause issues during bootstrapping if switched on. Default: false

mysql_service_name

Data type: Optional[String]

Specifies the option to pass through to mysql::server. Default: A vendor-, version- and OS-specific value.

Default value: undef

override_options

Data type: Hash

Specifies options to pass to mysql::server class. See the puppetlabs-mysql documentation for more information. Default: {}

override_repos

Data type: Optional[Array]

Usually the required YUM/APT repositories are automatically selected, depending on the values of $vendor_type and $vendor_version. This parameter will override this to provide a custom selection of repositories.

Default value: undef

package_ensure

Data type: String

Specifies the ensure state for packages. Valid options: all values supported by the package type. Default: present

purge_conf_dir

Data type: Boolean

Specifies the option to pass through to mysql::server. Default: true

root_password

Data type: String

Specifies the MySQL/MariaDB root password.

rundir

Data type: String

Specifies the rundir for the MySQL/MariaDB service. Default: /var/run/mysqld

service_enabled

Data type: Boolean

Specifies whether the MySQL/MariaDB service should be enabled. Default: true

status_allow

Data type: String

Specifies the subnet or host(s) (in MySQL/MariaDB syntax) to allow status checks from. Default: %

status_available_when_donor

Data type: Integer

Specifies whether the node will remain in the cluster when it enters donor mode. Valid options: 0 (remove), 1 (remain). Default: 0

status_available_when_readonly

Data type: Integer

When set to 0, clustercheck will return a "503 Service Unavailable" if the node is in the read_only state, as defined by the read_only MySQL/MariaDB variable. Values other than 0 have no effect. Default: -1

status_check

Data type: Boolean

Specifies whether to configure a user and script that will check the status of the galera cluster. Default: true

status_cps

Data type: Optional[String]

Rate limit config for the xinetd status service.

Default value: undef

status_flags

Data type: Optional[String]

Flags for the xinetd status service.

Default value: undef

status_host

Data type: String

Specifies the cluster to add the cluster check user to. Default: localhost

status_instances

Data type: Optional[String]

Number of active instances for the xinetd status service.

Default value: undef

status_log_on_failure

Data type: Optional[String]

Specifies which fields xinetd will log on failure. Default: undef

Default value: undef

status_log_on_failure_operator

Data type: Optional[String]

Specifies which operator xinetd uses to output logs on failure.

Default value: undef

status_log_on_success

Data type: Optional[String]

Specifies which fields xinetd will log on success. Default: ''

Default value: undef

status_log_on_success_operator

Data type: String

Specifies which operator xinetd uses to output logs on success. Default: =

status_log_type

Data type: Optional[String]

Log type for the xinetd status service.

Default value: undef

status_password

Data type: String

Specifies the password of the status check user.

status_port

Data type: Integer

Specifies the port for cluster check service. Default: 9200

status_script

Data type: Stdlib::Absolutepath

The script that will be used for status checks.

status_service_type

Data type: Optional[String]

Service type for the xinetd status service.

Default value: undef

status_system_group

Data type: String

The operating system group that will be managed for the status check.

status_system_user

Data type: String

The operating system user that will be managed for the status check.

status_system_user_config

Data type: Hash

The config for the operating system user.

status_user

Data type: String

Specifies the name of the user to use for status checks. Default: clustercheck

status_xinetd_service_name

Data type: String

The name of the xinetd service.

validate_connection

Data type: Boolean

Specifies whether the module should ensure that the cluster can accept connections at the point where the mysql::server resource is marked as complete. This is used because after returning success, the service is still not quite ready. Default: true

vendor_type

Data type: Enum['codership', 'mariadb', 'percona']

Specifies the galera vendor (or flavour) to use. Valid options: codership, mariadb, percona. Default: percona

vendor_version

Data type: Optional[String]

Specifies the galera version to use. To avoid accidential updates, set this to the required version. Default: A vendor- and OS-specific value. (Usually the most recent version.)

Default value: undef

wsrep_group_comm_port

Data type: Integer

Specifies the port to use for galera clustering. Default: 4567

wsrep_inc_state_transfer_port

Data type: Integer

Specifies the port to use for galera incremental state transfer. Default: 4568

wsrep_sst_auth

Data type: String

Specifies the authentication information to use for SST. Default: root:<%= $root_password %>

wsrep_sst_method

Data type: Enum['mariabackup', 'mysqldump', 'rsync', 'skip', 'xtrabackup', 'xtrabackup-v2']

Specifies the method to use for state snapshot transfer between nodes. Valid options: mysqldump, rsync, skip, xtrabackup, xtrabackup-v2 (Percona). Default: rsync

wsrep_state_transfer_port

Data type: Integer

Specifies the port to use for galera state transfer. Default: 4444

galera::firewall

Open firewall ports used by galera using puppetlabs-firewall.

Parameters

The following parameters are available in the galera::firewall class:

source

Data type: Optional[String]

Specifies the firewall source addresses to unblock. Valid options: a string. Default: undef

Default value: undef