Update cluster resource, add driver type selection
Change-Id: Ic4423c853224f44e13480b2cd0a7502649ffa058 Signed-off-by: Illia Polliul <ipolliul@mirantis.com>
This commit is contained in:
parent
11fc301005
commit
a0f5fe632d
|
@ -13,5 +13,5 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
include plugin_emc_vnx::compute
|
|
||||||
notice('MODULAR: emc/compute.pp')
|
notice('MODULAR: emc/compute.pp')
|
||||||
|
include plugin_emc_vnx::compute
|
||||||
|
|
|
@ -13,5 +13,5 @@
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
#
|
#
|
||||||
include plugin_emc_vnx::controller
|
|
||||||
notice('MODULAR: emc/controller.pp')
|
notice('MODULAR: emc/controller.pp')
|
||||||
|
include plugin_emc_vnx::controller
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright 2015 Mirantis, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
include plugin_emc_vnx::primary_controller
|
|
||||||
notice('MODULAR: emc/primary_controller.pp')
|
|
|
@ -19,9 +19,32 @@ class plugin_emc_vnx::controller {
|
||||||
include ::cinder::params
|
include ::cinder::params
|
||||||
|
|
||||||
$plugin_settings = hiera('emc_vnx')
|
$plugin_settings = hiera('emc_vnx')
|
||||||
|
$service_name = $::cinder::params::volume_service
|
||||||
|
|
||||||
package {$::plugin_emc_vnx::params::navicli_package_name:
|
$metadata = {
|
||||||
ensure => present,
|
'resource-stickiness' => '100',
|
||||||
|
}
|
||||||
|
|
||||||
|
$operations = {
|
||||||
|
'monitor' => {
|
||||||
|
'interval' => '20',
|
||||||
|
'timeout' => '10',
|
||||||
|
},
|
||||||
|
'start' => {
|
||||||
|
'interval' => '0',
|
||||||
|
'timeout' => '60',
|
||||||
|
},
|
||||||
|
'stop' => {
|
||||||
|
'interval' => '0',
|
||||||
|
'timeout' => '60',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$primitive_type = 'cinder-volume'
|
||||||
|
|
||||||
|
$parameters = {
|
||||||
|
'amqp_server_port' => hiera('amqp_port'),
|
||||||
|
'multibackend' => true,
|
||||||
}
|
}
|
||||||
|
|
||||||
if $::cinder::params::volume_package {
|
if $::cinder::params::volume_package {
|
||||||
|
@ -31,8 +54,22 @@ class plugin_emc_vnx::controller {
|
||||||
Package[$::cinder::params::volume_package] -> Cinder_config<||>
|
Package[$::cinder::params::volume_package] -> Cinder_config<||>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case $plugin_settings['emc_driver'] {
|
||||||
|
FC: { cinder_config {
|
||||||
|
'DEFAULT/volume_driver': value => 'cinder.volume.drivers.emc.emc_cli_fc.EMCCLIFCDriver';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ISCSI: { cinder_config {
|
||||||
|
'DEFAULT/volume_driver': value => 'cinder.volume.drivers.emc.emc_cli_iscsi.EMCCLIISCSIDriver';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default: { cinder_config {
|
||||||
|
'DEFAULT/volume_driver': value => 'cinder.volume.drivers.emc.emc_cli_iscsi.EMCCLIISCSIDriver';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cinder_config {
|
cinder_config {
|
||||||
'DEFAULT/volume_driver': value => 'cinder.volume.drivers.emc.emc_cli_iscsi.EMCCLIISCSIDriver';
|
|
||||||
'DEFAULT/san_ip': value => $plugin_settings['emc_sp_a_ip'];
|
'DEFAULT/san_ip': value => $plugin_settings['emc_sp_a_ip'];
|
||||||
'DEFAULT/san_secondary_ip': value => $plugin_settings['emc_sp_b_ip'];
|
'DEFAULT/san_secondary_ip': value => $plugin_settings['emc_sp_b_ip'];
|
||||||
'DEFAULT/san_login': value => $plugin_settings['emc_username'];
|
'DEFAULT/san_login': value => $plugin_settings['emc_username'];
|
||||||
|
@ -53,7 +90,11 @@ class plugin_emc_vnx::controller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cinder_config<||> ~> Service['cinder_volume']
|
Cinder_config<||> ~> Service[$service_name]
|
||||||
|
|
||||||
|
package {$::plugin_emc_vnx::params::navicli_package_name:
|
||||||
|
ensure => present,
|
||||||
|
}
|
||||||
|
|
||||||
file {'cinder-volume-agent-ocf':
|
file {'cinder-volume-agent-ocf':
|
||||||
path =>'/usr/lib/ocf/resource.d/fuel/cinder-volume',
|
path =>'/usr/lib/ocf/resource.d/fuel/cinder-volume',
|
||||||
|
@ -61,26 +102,26 @@ class plugin_emc_vnx::controller {
|
||||||
owner => root,
|
owner => root,
|
||||||
group => root,
|
group => root,
|
||||||
source => 'puppet:///modules/plugin_emc_vnx/ocf/cinder-volume',
|
source => 'puppet:///modules/plugin_emc_vnx/ocf/cinder-volume',
|
||||||
before => Service['cinder_volume'],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
service { 'cinder_volume-init_stopped':
|
pacemaker::service { $service_name :
|
||||||
ensure => stopped,
|
primitive_type => $primitive_type,
|
||||||
name => $::cinder::params::volume_service,
|
metadata => $metadata,
|
||||||
enable => false,
|
parameters => $parameters,
|
||||||
hasstatus => true,
|
operations => $operations,
|
||||||
hasrestart => true,
|
require => File['cinder-volume-agent-ocf'],
|
||||||
before => Service['cinder_volume'],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
service { 'cinder_volume':
|
service { 'cinder-volume':
|
||||||
ensure => running,
|
ensure => running,
|
||||||
name => "p_${::cinder::params::volume_service}",
|
name => $service_name,
|
||||||
enable => true,
|
enable => true,
|
||||||
hasstatus => true,
|
hasstatus => true,
|
||||||
hasrestart => true,
|
hasrestart => true,
|
||||||
provider => 'pacemaker',
|
|
||||||
require => Package[$::plugin_emc_vnx::params::navicli_package_name],
|
require => Package[$::plugin_emc_vnx::params::navicli_package_name],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Pcmk_resource["p_${service_name}"] ->
|
||||||
|
Service[$service_name]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright 2015 Mirantis, Inc.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
class plugin_emc_vnx::primary_controller {
|
|
||||||
|
|
||||||
include plugin_emc_vnx::controller
|
|
||||||
|
|
||||||
cs_resource { "p_${::cinder::params::volume_service}":
|
|
||||||
ensure => present,
|
|
||||||
require => File['cinder-volume-agent-ocf'],
|
|
||||||
primitive_class => 'ocf',
|
|
||||||
provided_by => 'fuel',
|
|
||||||
primitive_type => 'cinder-volume',
|
|
||||||
metadata => { 'resource-stickiness' => '100' },
|
|
||||||
parameters => {
|
|
||||||
'amqp_server_port' => hiera('amqp_port'),
|
|
||||||
'multibackend' => true,
|
|
||||||
},
|
|
||||||
operations => {
|
|
||||||
'monitor' => {
|
|
||||||
'interval' => '20',
|
|
||||||
'timeout' => '10'
|
|
||||||
}
|
|
||||||
,
|
|
||||||
'start' => {
|
|
||||||
'timeout' => '60'
|
|
||||||
}
|
|
||||||
,
|
|
||||||
'stop' => {
|
|
||||||
'timeout' => '60'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
Service['cinder_volume-init_stopped'] ->
|
|
||||||
Cs_resource["p_${::cinder::params::volume_service}"] ->
|
|
||||||
Service['cinder_volume']
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,27 +1,27 @@
|
||||||
- id: emc-primary-controller
|
|
||||||
groups: ['primary-controller']
|
|
||||||
type: puppet
|
|
||||||
parameters:
|
|
||||||
puppet_manifest: puppet/manifests/primary_controller.pp
|
|
||||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
|
||||||
timeout: 360
|
|
||||||
required_for: [deploy_end]
|
|
||||||
requires: [controller_remaining_tasks]
|
|
||||||
- id: emc-controller
|
- id: emc-controller
|
||||||
role: ['controller']
|
groups: ['primary-controller','controller']
|
||||||
type: puppet
|
type: puppet
|
||||||
|
version: 2.0.0
|
||||||
parameters:
|
parameters:
|
||||||
puppet_manifest: puppet/manifests/controller.pp
|
puppet_manifest: puppet/manifests/controller.pp
|
||||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||||
timeout: 360
|
timeout: 360
|
||||||
requires: [post_deployment_start]
|
strategy:
|
||||||
required_for: [post_deployment_end]
|
type: parallel
|
||||||
|
amount: 1
|
||||||
|
required_for: [deploy_end]
|
||||||
|
requires: [controller_remaining_tasks]
|
||||||
|
|
||||||
- id: emc-compute
|
- id: emc-compute
|
||||||
role: ['compute']
|
role: ['compute']
|
||||||
type: puppet
|
type: puppet
|
||||||
|
version: 2.0.0
|
||||||
parameters:
|
parameters:
|
||||||
puppet_manifest: puppet/manifests/compute.pp
|
puppet_manifest: puppet/manifests/compute.pp
|
||||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||||
timeout: 360
|
timeout: 360
|
||||||
requires: [post_deployment_start]
|
strategy:
|
||||||
required_for: [post_deployment_end]
|
type: parallel
|
||||||
|
amount: 10
|
||||||
|
requires: [top-role-compute, enable_nova_compute_service]
|
||||||
|
required_for: [deploy_end]
|
||||||
|
|
|
@ -1,4 +1,15 @@
|
||||||
attributes:
|
attributes:
|
||||||
|
emc_driver:
|
||||||
|
type: "select"
|
||||||
|
weight: 65
|
||||||
|
value: "ISCSI"
|
||||||
|
label: "Cinder Volume Driver"
|
||||||
|
description: "Driver type"
|
||||||
|
values:
|
||||||
|
- data: "FC"
|
||||||
|
label: "Fiber Channel"
|
||||||
|
- data: "ISCSI"
|
||||||
|
label: "ISCSI"
|
||||||
emc_username:
|
emc_username:
|
||||||
value: "username"
|
value: "username"
|
||||||
label: "EMC VNX username"
|
label: "EMC VNX username"
|
||||||
|
|
Loading…
Reference in New Issue