Skip to content
Snippets Groups Projects
Commit fbf22eb6 authored by Quentin MACHU's avatar Quentin MACHU
Browse files

Moved HAProxy from the role::endpoint to its own profile::haproxy

parent 40cafef9
No related branches found
No related tags found
No related merge requests found
class iaas::role::endpoint (
$haproxy_ip,
$haproxy_port
) {
class { 'haproxy': }
haproxy::listen { 'galera':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '3306',
options => {
'option' => ['httpchk'],
'balance' => 'source',
}
}
haproxy::listen { 'rabbitmq':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '5672',
options => {
'option' => ['clitcpka'],
'balance' => 'source',
'timeout client' => '1h',
'timeout server' => '1h',
}
}
haproxy::listen { 'keystone_admin_cluster':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '35357',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
haproxy::listen { 'keystone_public_internal_cluster':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '5000',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
haproxy::listen { 'glance_api_cluster':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '9292',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
haproxy::listen { 'glance_registry_cluster':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '9191',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
haproxy::listen { 'cinder_api_cluster':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '8776',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
haproxy::listen { 'nova_api_cluster':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '8774',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
haproxy::listen { 'neutron_api_cluster':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '9696',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
haproxy::listen { 'heat_api_cluster':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '8004',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
haproxy::listen { 'horizon_cluster':
ipaddress => '0.0.0.0',
mode => 'http',
ports => '80',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
}
class iaas::role::endpoint (
$haproxy_ip,
$haproxy_port
) {
# Base
class { 'iaas::profile::base': } ->
# HAProxy
class { 'haproxy': }
haproxy::listen { 'galera':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '3306',
options => {
'option' => ['httpchk'],
'balance' => 'source',
}
}
haproxy::listen { 'rabbitmq':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '5672',
options => {
'option' => ['clitcpka'],
'balance' => 'source',
'timeout client' => '1h',
'timeout server' => '1h',
}
}
haproxy::listen { 'keystone_admin_cluster':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '35357',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
haproxy::listen { 'keystone_public_internal_cluster':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '5000',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
haproxy::listen { 'glance_api_cluster':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '9292',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
haproxy::listen { 'glance_registry_cluster':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '9191',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
haproxy::listen { 'cinder_api_cluster':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '8776',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
haproxy::listen { 'nova_api_cluster':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '8774',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
haproxy::listen { 'neutron_api_cluster':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '9696',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
haproxy::listen { 'heat_api_cluster':
ipaddress => '0.0.0.0',
mode => 'tcp',
ports => '8004',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
haproxy::listen { 'horizon_cluster':
ipaddress => '0.0.0.0',
mode => 'http',
ports => '80',
options => {
'option' => ['tcpka', 'httpchk', 'tcplog'],
'balance' => 'source',
}
}
) {
class { 'iaas::profile::base': }
class { 'iaas::profile::haproxy': }
}
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