Add posibility to change remote IP addresses of all HA services
Partial blueprint: detach-components-from-controllers Change-Id: I7c328ed292567eb94e3ea93f7d630fbbd34e7d35
This commit is contained in:
parent
c35e5cafdb
commit
e33ec6c075
@ -1,10 +1,15 @@
|
|||||||
# HA configuration for OpenStack Ceilometer
|
# HA configuration for OpenStack Ceilometer
|
||||||
class openstack::ha::ceilometer {
|
class openstack::ha::ceilometer (
|
||||||
|
$server_names,
|
||||||
|
$ipaddresses,
|
||||||
|
) {
|
||||||
|
|
||||||
openstack::ha::haproxy_service { 'ceilometer':
|
openstack::ha::haproxy_service { 'ceilometer':
|
||||||
order => '140',
|
order => '140',
|
||||||
listen_port => 8777,
|
listen_port => 8777,
|
||||||
public => true,
|
public => true,
|
||||||
require_service => 'ceilometer-api',
|
require_service => 'ceilometer-api',
|
||||||
|
server_names => $server_names,
|
||||||
|
ipaddresses => $ipaddresses,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
# HA configuration for OpenStack Nova
|
# HA configuration for OpenStack Nova
|
||||||
class openstack::ha::cinder {
|
class openstack::ha::cinder (
|
||||||
|
$server_names,
|
||||||
|
$ipaddresses,
|
||||||
|
) {
|
||||||
|
|
||||||
openstack::ha::haproxy_service { 'cinder-api':
|
openstack::ha::haproxy_service { 'cinder-api':
|
||||||
order => '070',
|
order => '070',
|
||||||
listen_port => 8776,
|
listen_port => 8776,
|
||||||
public => true,
|
public => true,
|
||||||
require_service => 'cinder-api',
|
require_service => 'cinder-api',
|
||||||
|
server_names => $server_names,
|
||||||
|
ipaddresses => $ipaddresses,
|
||||||
haproxy_config_options => {
|
haproxy_config_options => {
|
||||||
option => ['httpchk', 'httplog','httpclose'],
|
option => ['httpchk', 'httplog','httpclose'],
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
# HA configuration for OpenStack Glance
|
# HA configuration for OpenStack Glance
|
||||||
class openstack::ha::glance {
|
class openstack::ha::glance (
|
||||||
|
$server_names,
|
||||||
|
$ipaddresses,
|
||||||
|
) {
|
||||||
|
|
||||||
openstack::ha::haproxy_service { 'glance-api':
|
openstack::ha::haproxy_service { 'glance-api':
|
||||||
# before neutron
|
# before neutron
|
||||||
@ -7,6 +10,8 @@ class openstack::ha::glance {
|
|||||||
listen_port => 9292,
|
listen_port => 9292,
|
||||||
public => true,
|
public => true,
|
||||||
require_service => 'glance-api',
|
require_service => 'glance-api',
|
||||||
|
server_names => $server_names,
|
||||||
|
ipaddresses => $ipaddresses,
|
||||||
haproxy_config_options => {
|
haproxy_config_options => {
|
||||||
'option' => ['httpchk', 'httplog','httpclose'],
|
'option' => ['httpchk', 'httplog','httpclose'],
|
||||||
'timeout server' => '11m',
|
'timeout server' => '11m',
|
||||||
|
@ -18,31 +18,94 @@ class openstack::ha::haproxy (
|
|||||||
Haproxy::Service { use_include => true }
|
Haproxy::Service { use_include => true }
|
||||||
Haproxy::Balancermember { use_include => true }
|
Haproxy::Balancermember { use_include => true }
|
||||||
|
|
||||||
|
$controllers_server_names = filter_hash($controllers, 'name')
|
||||||
|
$controllers_ipaddresses = filter_hash($controllers, 'internal_address')
|
||||||
|
|
||||||
Openstack::Ha::Haproxy_service {
|
Openstack::Ha::Haproxy_service {
|
||||||
server_names => filter_hash($controllers, 'name'),
|
server_names => $controllers_server_names,
|
||||||
ipaddresses => filter_hash($controllers, 'internal_address'),
|
ipaddresses => $controllers_ipaddresses,
|
||||||
public_virtual_ip => $public_virtual_ip,
|
public_virtual_ip => $public_virtual_ip,
|
||||||
internal_virtual_ip => $internal_virtual_ip,
|
internal_virtual_ip => $internal_virtual_ip,
|
||||||
}
|
}
|
||||||
|
|
||||||
class { 'openstack::ha::horizon': use_ssl => $horizon_use_ssl }
|
class { 'openstack::ha::horizon':
|
||||||
class { 'openstack::ha::keystone': }
|
use_ssl => $horizon_use_ssl,
|
||||||
class { 'openstack::ha::nova': }
|
server_names => hiera_array('horizon_names', $controllers_server_names),
|
||||||
class { 'openstack::ha::heat': }
|
ipaddresses => hiera_array('horizon_ipaddresses', $controllers_ipaddresses),
|
||||||
class { 'openstack::ha::glance': }
|
}
|
||||||
class { 'openstack::ha::cinder': }
|
|
||||||
|
|
||||||
if $neutron { class { 'openstack::ha::neutron': } }
|
class { 'openstack::ha::keystone':
|
||||||
|
server_names => hiera_array('keystone_names', $controllers_server_names),
|
||||||
|
ipaddresses => hiera_array('keystone_ipaddresses', $controllers_ipaddresses),
|
||||||
|
}
|
||||||
|
|
||||||
if $custom_mysql_setup_class == 'galera' {
|
class { 'openstack::ha::nova':
|
||||||
class { 'openstack::ha::mysqld':
|
server_names => hiera_array('nova_names', $controllers_server_names),
|
||||||
is_primary_controller => $is_primary_controller,
|
ipaddresses => hiera_array('nova_ipaddresses', $controllers_ipaddresses),
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'openstack::ha::heat':
|
||||||
|
server_names => hiera_array('heat_names', $controllers_server_names),
|
||||||
|
ipaddresses => hiera_array('heat_ipaddresses', $controllers_ipaddresses),
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'openstack::ha::glance':
|
||||||
|
server_names => hiera_array('glance_names', $controllers_server_names),
|
||||||
|
ipaddresses => hiera_array('glance_ipaddresses', $controllers_ipaddresses),
|
||||||
|
}
|
||||||
|
|
||||||
|
class { 'openstack::ha::cinder':
|
||||||
|
server_names => hiera_array('cinder_names', $controllers_server_names),
|
||||||
|
ipaddresses => hiera_array('cinder_ipaddresses', $controllers_ipaddresses),
|
||||||
|
}
|
||||||
|
|
||||||
|
if $neutron {
|
||||||
|
class { 'openstack::ha::neutron':
|
||||||
|
server_names => hiera_array('neutron_names', $controllers_server_names),
|
||||||
|
ipaddresses => hiera_array('neutron_ipaddresses', $controllers_ipaddresses),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if $swift_proxies { class { 'openstack::ha::swift': servers => $swift_proxies } }
|
if $custom_mysql_setup_class == 'galera' or $custom_mysql_setup_class == 'percona' {
|
||||||
if $rgw_servers { class { 'openstack::ha::radosgw': servers => $rgw_servers } }
|
class { 'openstack::ha::mysqld':
|
||||||
if $ceilometer { class { 'openstack::ha::ceilometer': } }
|
is_primary_controller => $is_primary_controller,
|
||||||
if $sahara { class { 'openstack::ha::sahara': } }
|
server_names => hiera_array('mysqld_names', $controllers_server_names),
|
||||||
if $murano { class { 'openstack::ha::murano': } }
|
ipaddresses => hiera_array('mysqld_ipaddresses', $controllers_ipaddresses),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if $swift_proxies {
|
||||||
|
class { 'openstack::ha::swift':
|
||||||
|
server_names => hiera_array('swift_server_names', filter_hash($swift_proxies, 'name')),
|
||||||
|
ipaddresses => hiera_array('swift_ipaddresses', filter_hash($swift_proxies, 'storage_address')),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if $rgw_servers {
|
||||||
|
class { 'openstack::ha::radosgw':
|
||||||
|
server_names => hiera_array('radosgw_server_names', filter_hash($rgw_servers, 'name')),
|
||||||
|
ipaddresses => hiera_array('radosgw_ipaddresses', filter_hash($rgw_servers, 'internal_address')),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if $ceilometer {
|
||||||
|
class { 'openstack::ha::ceilometer':
|
||||||
|
server_names => hiera_array('ceilometer_names', $controllers_server_names),
|
||||||
|
ipaddresses => hiera_array('ceilometer_ipaddresses', $controllers_ipaddresses),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if $sahara {
|
||||||
|
class { 'openstack::ha::sahara':
|
||||||
|
server_names => hiera_array('sahara_names', $controllers_server_names),
|
||||||
|
ipaddresses => hiera_array('sahara_ipaddresses', $controllers_ipaddresses),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if $murano {
|
||||||
|
class { 'openstack::ha::murano':
|
||||||
|
server_names => hiera_array('murano_names', $controllers_server_names),
|
||||||
|
ipaddresses => hiera_array('murano_ipaddresses', $controllers_ipaddresses),
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
# HA configuration for OpenStack Nova
|
# HA configuration for OpenStack Nova
|
||||||
class openstack::ha::heat {
|
class openstack::ha::heat (
|
||||||
|
$server_names,
|
||||||
|
$ipaddresses,
|
||||||
|
) {
|
||||||
|
|
||||||
openstack::ha::haproxy_service { 'heat-api':
|
openstack::ha::haproxy_service { 'heat-api':
|
||||||
order => '160',
|
order => '160',
|
||||||
listen_port => 8004,
|
listen_port => 8004,
|
||||||
public => true,
|
public => true,
|
||||||
require_service => 'heat-api',
|
require_service => 'heat-api',
|
||||||
|
server_names => $server_names,
|
||||||
|
ipaddresses => $ipaddresses,
|
||||||
haproxy_config_options => {
|
haproxy_config_options => {
|
||||||
option => ['httpchk', 'httplog','httpclose'],
|
option => ['httpchk', 'httplog','httpclose'],
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
# HA configuration for OpenStack Horizon
|
# HA configuration for OpenStack Horizon
|
||||||
class openstack::ha::horizon (
|
class openstack::ha::horizon (
|
||||||
$use_ssl = false,
|
$use_ssl = false,
|
||||||
|
$server_names,
|
||||||
|
$ipaddresses,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
openstack::ha::haproxy_service { 'horizon':
|
openstack::ha::haproxy_service { 'horizon':
|
||||||
@ -9,6 +11,8 @@ class openstack::ha::horizon (
|
|||||||
public => true,
|
public => true,
|
||||||
internal => false,
|
internal => false,
|
||||||
define_cookies => true,
|
define_cookies => true,
|
||||||
|
server_names => $server_names,
|
||||||
|
ipaddresses => $ipaddresses,
|
||||||
|
|
||||||
haproxy_config_options => {
|
haproxy_config_options => {
|
||||||
'option' => ['forwardfor', 'httpchk', 'httpclose', 'httplog'],
|
'option' => ['forwardfor', 'httpchk', 'httpclose', 'httplog'],
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
# HA configuration for OpenStack Keystone
|
# HA configuration for OpenStack Keystone
|
||||||
class openstack::ha::keystone {
|
class openstack::ha::keystone (
|
||||||
|
$server_names,
|
||||||
|
$ipaddresses,
|
||||||
|
) {
|
||||||
|
|
||||||
openstack::ha::haproxy_service { 'keystone-1':
|
openstack::ha::haproxy_service { 'keystone-1':
|
||||||
order => '020',
|
order => '020',
|
||||||
listen_port => 5000,
|
listen_port => 5000,
|
||||||
public => true,
|
public => true,
|
||||||
|
server_names => $server_names,
|
||||||
|
ipaddresses => $ipaddresses,
|
||||||
haproxy_config_options => {
|
haproxy_config_options => {
|
||||||
option => ['httpchk', 'httplog','httpclose'],
|
option => ['httpchk', 'httplog','httpclose'],
|
||||||
},
|
},
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
# HA configuration for OpenStack Murano
|
# HA configuration for OpenStack Murano
|
||||||
class openstack::ha::murano {
|
class openstack::ha::murano (
|
||||||
|
$server_names,
|
||||||
|
$ipaddresses,
|
||||||
|
) {
|
||||||
|
|
||||||
openstack::ha::haproxy_service { 'murano':
|
openstack::ha::haproxy_service { 'murano':
|
||||||
order => '180',
|
order => '180',
|
||||||
listen_port => 8082,
|
listen_port => 8082,
|
||||||
public => true,
|
public => true,
|
||||||
require_service => 'murano_api',
|
require_service => 'murano_api',
|
||||||
|
server_names => $server_names,
|
||||||
|
ipaddresses => $ipaddresses,
|
||||||
}
|
}
|
||||||
|
|
||||||
openstack::ha::haproxy_service { 'murano_rabbitmq':
|
openstack::ha::haproxy_service { 'murano_rabbitmq':
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
# HA configuration for MySQL/Galera for OpenStack
|
# HA configuration for MySQL/Galera for OpenStack
|
||||||
class openstack::ha::mysqld (
|
class openstack::ha::mysqld (
|
||||||
$is_primary_controller = false,
|
$is_primary_controller = false,
|
||||||
$before_start = false
|
$before_start = false,
|
||||||
){
|
$server_names,
|
||||||
|
$ipaddresses,
|
||||||
|
) {
|
||||||
|
|
||||||
openstack::ha::haproxy_service { 'mysqld':
|
openstack::ha::haproxy_service { 'mysqld':
|
||||||
order => '110',
|
order => '110',
|
||||||
@ -10,7 +12,8 @@ class openstack::ha::mysqld (
|
|||||||
balancermember_port => 3307,
|
balancermember_port => 3307,
|
||||||
define_backups => true,
|
define_backups => true,
|
||||||
before_start => $before_start,
|
before_start => $before_start,
|
||||||
|
server_names => $server_names,
|
||||||
|
ipaddresses => $ipaddresses,
|
||||||
haproxy_config_options => {
|
haproxy_config_options => {
|
||||||
'option' => ['httpchk', 'tcplog','clitcpka','srvtcpka'],
|
'option' => ['httpchk', 'tcplog','clitcpka','srvtcpka'],
|
||||||
'balance' => 'leastconn',
|
'balance' => 'leastconn',
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
# HA configuration for OpenStack Neutron
|
# HA configuration for OpenStack Neutron
|
||||||
class openstack::ha::neutron {
|
class openstack::ha::neutron (
|
||||||
|
$server_names,
|
||||||
|
$ipaddresses,
|
||||||
|
) {
|
||||||
|
|
||||||
openstack::ha::haproxy_service { 'neutron':
|
openstack::ha::haproxy_service { 'neutron':
|
||||||
order => '085',
|
order => '085',
|
||||||
listen_port => 9696,
|
listen_port => 9696,
|
||||||
public => true,
|
public => true,
|
||||||
define_backups => false,
|
define_backups => false,
|
||||||
|
server_names => $server_names,
|
||||||
|
ipaddresses => $ipaddresses,
|
||||||
#NOTE(bogdando) do not add require_service => 'neutron-server', will cause a loop
|
#NOTE(bogdando) do not add require_service => 'neutron-server', will cause a loop
|
||||||
haproxy_config_options => {
|
haproxy_config_options => {
|
||||||
option => ['httpchk', 'httplog','httpclose'],
|
option => ['httpchk', 'httplog','httpclose'],
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
# HA configuration for OpenStack Nova
|
# HA configuration for OpenStack Nova
|
||||||
class openstack::ha::nova {
|
class openstack::ha::nova (
|
||||||
|
$server_names,
|
||||||
|
$ipaddresses,
|
||||||
|
) {
|
||||||
|
|
||||||
openstack::ha::haproxy_service { 'nova-api-1':
|
openstack::ha::haproxy_service { 'nova-api-1':
|
||||||
order => '040',
|
order => '040',
|
||||||
listen_port => 8773,
|
listen_port => 8773,
|
||||||
public => true,
|
public => true,
|
||||||
require_service => 'nova-api',
|
require_service => 'nova-api',
|
||||||
|
server_names => $server_names,
|
||||||
|
ipaddresses => $ipaddresses,
|
||||||
haproxy_config_options => {
|
haproxy_config_options => {
|
||||||
'timeout server' => '600s',
|
'timeout server' => '600s',
|
||||||
},
|
},
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
# HA configuration for Ceph RADOS Gateway
|
# HA configuration for Ceph RADOS Gateway
|
||||||
class openstack::ha::radosgw (
|
class openstack::ha::radosgw (
|
||||||
$servers,
|
$server_names,
|
||||||
|
$ipaddresses,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
openstack::ha::haproxy_service { 'radosgw':
|
openstack::ha::haproxy_service { 'radosgw':
|
||||||
order => '130',
|
order => '130',
|
||||||
listen_port => 8080,
|
listen_port => 8080,
|
||||||
balancermember_port => 6780,
|
balancermember_port => 6780,
|
||||||
server_names => filter_hash($servers, 'name'),
|
server_names => $server_names,
|
||||||
ipaddresses => filter_hash($servers, 'internal_address'),
|
ipaddresses => $ipaddresses,
|
||||||
public => true,
|
public => true,
|
||||||
|
|
||||||
haproxy_config_options => {
|
haproxy_config_options => {
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
# HA configuration for OpenStack Sahara
|
# HA configuration for OpenStack Sahara
|
||||||
class openstack::ha::sahara {
|
class openstack::ha::sahara (
|
||||||
|
$server_names,
|
||||||
|
$ipaddresses,
|
||||||
|
) {
|
||||||
|
|
||||||
openstack::ha::haproxy_service { 'sahara':
|
openstack::ha::haproxy_service { 'sahara':
|
||||||
order => '150',
|
order => '150',
|
||||||
listen_port => 8386,
|
listen_port => 8386,
|
||||||
public => true,
|
public => true,
|
||||||
require_service => 'sahara-api',
|
require_service => 'sahara-api',
|
||||||
|
server_names => $server_names,
|
||||||
|
ipaddresses => $ipaddresses,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
# HA configuration for OpenStack Swift
|
# HA configuration for OpenStack Swift
|
||||||
class openstack::ha::swift (
|
class openstack::ha::swift (
|
||||||
$servers,
|
$server_names,
|
||||||
|
$ipaddresses,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
openstack::ha::haproxy_service { 'swift':
|
openstack::ha::haproxy_service { 'swift':
|
||||||
order => '120',
|
order => '120',
|
||||||
listen_port => 8080,
|
listen_port => 8080,
|
||||||
server_names => filter_hash($servers, 'name'),
|
server_names => $server_names,
|
||||||
ipaddresses => filter_hash($servers, 'storage_address'),
|
ipaddresses => $ipaddresses,
|
||||||
public => true,
|
public => true,
|
||||||
haproxy_config_options => {
|
haproxy_config_options => {
|
||||||
'option' => ['httpchk', 'httplog', 'httpclose'],
|
'option' => ['httpchk', 'httplog', 'httpclose'],
|
||||||
|
Loading…
Reference in New Issue
Block a user