Skip to content
Snippets Groups Projects
Commit e7922ace authored by Giovanni Zizzi's avatar Giovanni Zizzi
Browse files

added haproxy configuration about percona_cluster

parent a4375aaf
No related branches found
No related tags found
3 merge requests!8Development,!6Rhmk ha,!4Dev rhmk
......@@ -12,10 +12,12 @@ iaas::profile::base::ntp_servers: [ntp.cnaf.infn.it, pool.ntp.org]
#iaas::profile::base::ntp_servers: [puppet]
# Endpoints
iaas::role::endpoint::servers: [ocp-ubuntu15, ocp-ubuntu16, ocp-ubuntu17] # List of load-balancers
iaas::role::endpoint::main_hostname: 'ocp-ubuntu15'
iaas::role::endpoint::main_address: ocp-ubuntu15 # The main virtual address pointing to the load-balancers
#iaas::role::endpoint::servers: [ocp-ubuntu15, ocp-ubuntu16, ocp-ubuntu17] # List of load-balancers
#iaas::role::endpoint::main_hostname: 'ocp-ubuntu15'
#iaas::role::endpoint::main_address: ocp-ubuntu15 # The main virtual address pointing to the load-balancers
iaas::role::haproxy::servers: [ocp-ubuntu15, ocp-ubuntu16, ocp-ubuntu17]
iaas::role::haproxy::ipaddresses_server: [131.154.100.160,131.154.100.164,131.154.100.166]
iaas::profile::haproxy::stats_enabled: true
iaas::profile::haproxy::stats_ports: [1936]
iaas::profile::haproxy::stats_refresh: "30s"
......
......@@ -21,7 +21,7 @@ class iaas::profile::database (
mysql_cluster_servers => $mysql_cluster_servers,
mysql_port => $mysql_port,
master => $percona_master,
} -> iaas::resources::database { 'keystone': }
}
# class { 'galera':
# galera_servers => $servers,
# galera_master => $galera_master,
......@@ -32,11 +32,11 @@ class iaas::profile::database (
# }
# } -> Service['mysqld'] -> anchor { 'database-service': }
#
# @@haproxy::balancermember { "galera_${::fqdn}":
# listening_service => 'galera',
# server_names => $::hostname,
# ipaddresses => $::ipaddress,
# ports => '3306',
@@haproxy::balancermember { "percona_cluster_${::fqdn}":
listening_service => 'percona_cluster',
server_names => $::hostname,
ipaddresses => $::ipaddress,
ports => '3306',
# options => 'check port 9200 inter 2000 rise 2 fall 5 backup',
# }
}
}
......@@ -8,6 +8,13 @@ class iaas::profile::haproxy (
) {
class { '::haproxy':
defaults_options => {
'mode' => 'http',
'log' => 'global',
'option' => [
'tcplog',
'dontlognull',
'redispatch',
],
'retries' => '3',
'timeout' => [
'http-request 10s',
......@@ -15,9 +22,10 @@ class iaas::profile::haproxy (
'connect 10s',
'client 1m',
'server 1m',
'http-keep-alive 10s',
'check 10s',
],
'maxconn' => '8092',
'maxconn' => '4096',
},
}
......@@ -39,16 +47,25 @@ class iaas::profile::haproxy (
}
}
haproxy::listen { 'galera':
haproxy::listen { 'percona_cluster':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '3306',
options => {
'option' => ['httpchk'],
'option' => ['httpchk','tcpka'],
'balance' => 'leastconn',
}
}
# haproxy::listen { 'rabbitmq':
haproxy::balancermember { 'percona_cluster_bm':
listening_service => 'percona_cluster',
ports => '3307',
server_names => hiera('iaas::role::haproxy::servers', undef),
ipaddresses => hiera('iaas::role::haproxy::ipaddresses_server', undef),
options => 'check port 9200',
}
# haproxy::listen { 'rabbitmq':
# ipaddress => '0.0.0.0',
# mode => 'tcp',
# ports => '5672',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment