Enabled HA on ScaleIO Gateway
Change-Id: I08d609d00405abfdd54332cc6fe2bbf5dff8d982
This commit is contained in:
parent
a8b423ab97
commit
3d7689eb27
|
@ -0,0 +1,2 @@
|
|||
$fuel_settings = parseyaml(file('/etc/astute.yaml'))
|
||||
class {'scaleio_fuel::enable_ha': }
|
|
@ -31,7 +31,8 @@ inherits scaleio_fuel::params {
|
|||
|
||||
# 3. Create config for ScaleIO
|
||||
$cinder_scaleio_config = "[scaleio]
|
||||
rest_server_ip=${mdm_ip[0]}
|
||||
rest_server_ip=${::fuel_settings['management_vip']}
|
||||
rest_server_port=4443
|
||||
rest_server_username=admin
|
||||
rest_server_password=${gw_password}
|
||||
protection_domain_name=${protection_domain}
|
||||
|
|
|
@ -1,27 +1,34 @@
|
|||
class scaleio_fuel::ha (
|
||||
$controllers = $scaleio_fuel::params::controller_nodes,
|
||||
) {
|
||||
class scaleio_fuel::enable_ha
|
||||
inherits scaleio_fuel::params {
|
||||
|
||||
$primary_controller = filter_nodes($controllers,'role','primary-controller')
|
||||
$gw1_ip = $scaleio_fuel::params::mdm_ip[0]
|
||||
$gw2_ip = $scaleio_fuel::params::mdm_ip[1]
|
||||
$gw3_ip = $scaleio_fuel::params::tb_ip
|
||||
$nodes_hash = $::fuel_settings['nodes']
|
||||
|
||||
class { 'cluster::haproxy_ocf':
|
||||
primary_controller => $primary_controller
|
||||
}
|
||||
$gw1 = filter_nodes($nodes_hash, 'internal_address', $gw1_ip)
|
||||
$gw2 = filter_nodes($nodes_hash, 'internal_address', $gw2_ip)
|
||||
$gw3 = filter_nodes($nodes_hash, 'internal_address', $gw3_ip)
|
||||
$gw_nodes = concat(concat($gw1, $gw2), $gw3)
|
||||
|
||||
notify { "gw_nodes: ${gw_nodes}": }
|
||||
notify { "server_names: ${server_names}": }
|
||||
notify { "ipaddresses: ${ipaddresses}": }
|
||||
|
||||
Haproxy::Service { use_include => true }
|
||||
Haproxy::Balancermember { use_include => true }
|
||||
|
||||
Openstack::Ha::Haproxy_service {
|
||||
server_names => filter_hash($controllers, 'name'),
|
||||
ipaddresses => filter_hash($controllers, 'internal_address'),
|
||||
server_names => filter_hash($gw_nodes, 'name'),
|
||||
ipaddresses => filter_hash($gw_nodes, 'internal_address'),
|
||||
public_virtual_ip => $::fuel_settings['public_vip'],
|
||||
internal_virtual_ip => $::fuel_settings['management_vip'],
|
||||
}
|
||||
|
||||
openstack::ha::haproxy_service { 'scaleio-gateway':
|
||||
order => 201,
|
||||
listen_port => 443,
|
||||
balancermember_port => 443,
|
||||
listen_port => 4443,
|
||||
balancermember_port => 4443,
|
||||
define_backups => true,
|
||||
before_start => true,
|
||||
public => true,
|
||||
|
@ -32,4 +39,16 @@ class scaleio_fuel::ha (
|
|||
balancermember_options => 'check',
|
||||
}
|
||||
|
||||
exec { 'haproxy reload':
|
||||
command => 'export OCF_ROOT="/usr/lib/ocf"; (ip netns list | grep haproxy) && ip netns exec haproxy /usr/lib/ocf/resource.d/fuel/ns_haproxy reload',
|
||||
path => '/usr/bin:/usr/sbin:/bin:/sbin',
|
||||
logoutput => true,
|
||||
provider => 'shell',
|
||||
tries => 10,
|
||||
try_sleep => 10,
|
||||
returns => [0, ''],
|
||||
}
|
||||
|
||||
Haproxy::Listen <||> -> Exec['haproxy reload']
|
||||
Haproxy::Balancermember <||> -> Exec['haproxy reload']
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ name: scaleio
|
|||
# Human-readable name for your plugin
|
||||
title: Fuel plugin for ScaleIO
|
||||
# Plugin version
|
||||
version: '0.2.6'
|
||||
version: '0.2.7'
|
||||
# Description
|
||||
description: Enable ScaleIO as a storage backend
|
||||
# Required fuel version
|
||||
|
|
20
tasks.yaml
20
tasks.yaml
|
@ -22,30 +22,30 @@
|
|||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 600
|
||||
|
||||
- role: ['compute']
|
||||
- role: ['primary-controller', 'controller']
|
||||
stage: post_deployment/2150
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/enable_ha.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 600
|
||||
|
||||
- role: ['compute']
|
||||
stage: post_deployment/2200
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/compute.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 600
|
||||
|
||||
- role: ['primary-controller', 'controller']
|
||||
stage: post_deployment/2200
|
||||
stage: post_deployment/2250
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/controller.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 600
|
||||
|
||||
# - role: ['primary-controller']
|
||||
# stage: post_deployment/2250
|
||||
# type: puppet
|
||||
# parameters:
|
||||
# puppet_manifest: puppet/manifests/enable_ha.pp
|
||||
# puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
# timeout: 600
|
||||
|
||||
- role: ['primary-controller']
|
||||
stage: post_deployment/2300
|
||||
type: puppet
|
||||
|
|
Loading…
Reference in New Issue