Puppet Class: ci_agent::integrations::mysql

Inherits:
ci_agent::params
Defined in:
manifests/integrations/mysql.pp

Overview

Class: ci_agent::integrations::mysql

This class will install the necessary configuration for the mysql integration

Parameters:

$host:
    The host mysql is running on
$password
    The mysql password for the oneapm_ci user
$user
    The mysql user for the oneapm_ci user
$sock
    Connect mysql via unix socket
$tags
    Optional array of tags
$replication
    replication option
$galera_cluster
    galera cluster option

Sample Usage:

class { 'ci_agent::integrations::mysql' :
  host     => 'localhost',
  password => 'some_pass',
  user     => 'oneapm_ci'
}

Parameters:

  • host (Any) (defaults to: 'localhost')
  • password (Any)
  • user (Any) (defaults to: 'oneapm_ci')
  • sock (Any) (defaults to: undef)
  • tags (Any) (defaults to: [])
  • replication (Any) (defaults to: '0')
  • galera_cluster (Any) (defaults to: '0')


30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'manifests/integrations/mysql.pp', line 30

class ci_agent::integrations::mysql(
  $host = 'localhost',
  $password,
  $user = 'oneapm_ci',
  $sock = undef,
  $tags = [],
  $replication = '0',
  $galera_cluster = '0'
) inherits ci_agent::params {

  validate_array($tags)

  file { "${ci_agent::params::conf_dir}/mysql.yaml":
    ensure  => file,
    owner   => $ci_agent::params::oneapm_ci_user,
    group   => $ci_agent::params::oneapm_ci_group,
    mode    => '0600',
    content => template('ci_agent/agent-conf.d/mysql.yaml.erb'),
    require => Package[$ci_agent::params::package_name],
    notify  => Service[$ci_agent::params::service_name],
  }
}