Drop old deprecations
This module has been used for a while, it's time to drop deprecations. * drop cloud::compute::controller, replaced by cloud::compute::{api,scheduler,...} * drop cloud::image, replaced by cloud::image::{api,registry} * drop cloud::telemetry::server, replaced by cloud::telemetry::{api,alarm,...} * hypervisor: delete has_ceph parameter * hypervisor: drop backward compatibility for spice params * loadbalancer: drop two old parameters for keepalived * loadbalancer: drop useless comments * volume: delete cloud::volume::controller (replaced by api,scheduler) * volume: only keep multi-backend support Change-Id: I7376fe0f3bfa3eb00589eb3b7a4532236765e560
This commit is contained in:
parent
3846a044a3
commit
8e523680c9
@ -1,53 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Compute controller node
|
||||
#
|
||||
class cloud::compute::controller(
|
||||
$ks_keystone_internal_host = '127.0.0.1',
|
||||
$ks_nova_password = 'novapassword',
|
||||
$neutron_metadata_proxy_shared_secret = 'asecreteaboutneutron',
|
||||
$api_eth = '127.0.0.1',
|
||||
$spice_port = 6082,
|
||||
$ks_nova_public_port = 8774,
|
||||
$ks_ec2_public_port = 8773,
|
||||
$ks_metadata_public_port = 8775
|
||||
){
|
||||
|
||||
warning('This class is deprecated. You should use cloud::compute::api,scheduler,conductor,consoleauth,consoleproxy,cert classes')
|
||||
|
||||
include 'cloud::compute'
|
||||
|
||||
class { 'cloud::compute::cert': }
|
||||
class { 'cloud::compute::conductor': }
|
||||
class { 'cloud::compute::consoleauth': }
|
||||
class { 'cloud::compute::scheduler': }
|
||||
|
||||
class { 'cloud::compute::api':
|
||||
ks_keystone_internal_host => $ks_keystone_internal_host,
|
||||
ks_nova_password => $ks_nova_password,
|
||||
api_eth => $api_eth,
|
||||
neutron_metadata_proxy_shared_secret => $neutron_metadata_proxy_shared_secret,
|
||||
ks_nova_public_port => $ks_nova_public_port,
|
||||
ks_ec2_public_port => $ks_ec2_public_port,
|
||||
ks_metadata_public_port => $ks_metadata_public_port,
|
||||
}
|
||||
|
||||
class { 'cloud::compute::consoleproxy':
|
||||
api_eth => $api_eth,
|
||||
spice_port => $spice_port,
|
||||
}
|
||||
|
||||
}
|
@ -87,11 +87,8 @@ class cloud::compute::hypervisor(
|
||||
$nfs_device = false,
|
||||
$nfs_options = 'defaults',
|
||||
$filesystem_store_datadir = '/var/lib/nova/instances',
|
||||
# set to false to keep backward compatibility
|
||||
$ks_spice_public_proto = false,
|
||||
$ks_spice_public_host = false,
|
||||
# DEPRECATED
|
||||
$has_ceph = false
|
||||
$ks_spice_public_proto = 'http',
|
||||
$ks_spice_public_host = '127.0.0.1',
|
||||
) inherits cloud::params {
|
||||
|
||||
include 'cloud::compute'
|
||||
@ -104,27 +101,6 @@ class cloud::compute::hypervisor(
|
||||
fail('libvirt_type is set to KVM and VTX seems to be disabled on this node.')
|
||||
}
|
||||
|
||||
# Backward compatibility
|
||||
# if has_ceph was enabled, we consider deployments run Ceph for Nova & Cinder
|
||||
if $has_ceph {
|
||||
warning('has_ceph parameter is deprecated. Please use vm_rbd and volume_rbd parameters.')
|
||||
$vm_rbd_real = true
|
||||
$volume_rbd_real = true
|
||||
} else {
|
||||
$vm_rbd_real = $vm_rbd
|
||||
$volume_rbd_real = $volume_rbd
|
||||
}
|
||||
if $ks_spice_public_proto {
|
||||
$ks_spice_public_proto_real = $ks_spice_public_proto
|
||||
} else {
|
||||
$ks_spice_public_proto_real = $ks_nova_public_proto
|
||||
}
|
||||
if $ks_spice_public_host {
|
||||
$ks_spice_public_host_real = $ks_spice_public_host
|
||||
} else {
|
||||
$ks_spice_public_host_real = $ks_nova_public_host
|
||||
}
|
||||
|
||||
if $nfs_enabled {
|
||||
if ! $vm_rbd {
|
||||
# There is no NFS backend in Nova.
|
||||
@ -208,8 +184,8 @@ Host *
|
||||
class { 'nova::compute::spice':
|
||||
server_listen => '0.0.0.0',
|
||||
server_proxyclient_address => $server_proxyclient_address,
|
||||
proxy_host => $ks_spice_public_host_real,
|
||||
proxy_protocol => $ks_spice_public_proto_real,
|
||||
proxy_host => $ks_spice_public_host,
|
||||
proxy_protocol => $ks_spice_public_proto,
|
||||
proxy_port => $spice_port
|
||||
|
||||
}
|
||||
@ -223,8 +199,7 @@ Host *
|
||||
mode => '0644',
|
||||
notify => Service['libvirtd']
|
||||
}
|
||||
# Nova support for RBD backend is not supported before RHEL 7 (OSP5).
|
||||
if ($has_ceph or $vm_rbd) and ($::operatingsystemmajrelease < 7) {
|
||||
if $vm_rbd and ($::operatingsystemmajrelease < 7) {
|
||||
fail("RBD image backend in Nova is not supported in RHEL ${::operatingsystemmajrelease}.")
|
||||
}
|
||||
}
|
||||
@ -265,14 +240,14 @@ Host *
|
||||
|
||||
class { 'nova::compute::neutron': }
|
||||
|
||||
if $vm_rbd_real or $volume_rbd_real {
|
||||
if $vm_rbd or $volume_rbd {
|
||||
|
||||
include 'cloud::storage::rbd'
|
||||
|
||||
$libvirt_disk_cachemodes_real = ['network=writeback']
|
||||
|
||||
# when nova uses ceph for instances storage
|
||||
if $vm_rbd_real {
|
||||
if $vm_rbd {
|
||||
class { 'nova::compute::rbd':
|
||||
libvirt_rbd_user => $cinder_rbd_user,
|
||||
libvirt_images_rbd_pool => $nova_rbd_pool
|
||||
|
@ -1,126 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
|
||||
#
|
||||
# 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: cloud::image
|
||||
#
|
||||
# Install Image Server (Glance)
|
||||
# This class is deprecated for cloud::image::api and cloud::image::registry
|
||||
#
|
||||
# === Parameters:
|
||||
#
|
||||
# [*glance_db_host*]
|
||||
# (optional) Hostname or IP address to connect to glance database
|
||||
# Defaults to '127.0.0.1'
|
||||
#
|
||||
# [*glance_db_user*]
|
||||
# (optional) Username to connect to glance database
|
||||
# Defaults to 'glance'
|
||||
#
|
||||
# [*glance_db_password*]
|
||||
# (optional) Password to connect to glance database
|
||||
# Defaults to 'glancepassword'
|
||||
#
|
||||
# [*ks_keystone_internal_host*]
|
||||
# (optional) Internal Hostname or IP to connect to Keystone API
|
||||
# Defaults to '127.0.0.1'
|
||||
#
|
||||
# [*ks_glance_api_internal_port*]
|
||||
# (optional) TCP port to connect to Glance API from internal network
|
||||
# Defaults to '9292'
|
||||
#
|
||||
# [*ks_glance_registry_internal_port*]
|
||||
# (optional) TCP port to connect to Glance Registry from internal network
|
||||
# Defaults to '9191'
|
||||
#
|
||||
# [*ks_glance_password*]
|
||||
# (optional) Password used by Glance to connect to Keystone API
|
||||
# Defaults to 'glancepassword'
|
||||
#
|
||||
# [*rabbit_hosts*]
|
||||
# (optional) List of RabbitMQ servers. Should be an array.
|
||||
# Defaults to '127.0.0.1'
|
||||
#
|
||||
# [*rabbit_password*]
|
||||
# (optional) Password to connect to nova queues.
|
||||
# Defaults to 'rabbitpassword'
|
||||
#
|
||||
# [*api_eth*]
|
||||
# (optional) Which interface we bind the Glance API server.
|
||||
# Defaults to '127.0.0.1'
|
||||
#
|
||||
# [*use_syslog*]
|
||||
# (optional) Use syslog for logging
|
||||
# Defaults to true
|
||||
#
|
||||
# [*log_facility*]
|
||||
# (optional) Syslog facility to receive log lines
|
||||
# Defaults to 'LOG_LOCAL0'
|
||||
#
|
||||
class cloud::image(
|
||||
$glance_db_host = '127.0.0.1',
|
||||
$glance_db_user = 'glance',
|
||||
$glance_db_password = 'glancepassword',
|
||||
$ks_keystone_internal_host = '127.0.0.1',
|
||||
$ks_glance_internal_host = '127.0.0.1',
|
||||
$ks_glance_api_internal_port = 9292,
|
||||
$ks_glance_registry_internal_port = 9191,
|
||||
$ks_glance_password = 'glancepassword',
|
||||
$rabbit_password = 'rabbitpassword',
|
||||
$rabbit_host = '127.0.0.1',
|
||||
$api_eth = '127.0.0.1',
|
||||
$openstack_vip = undef,
|
||||
$glance_rbd_pool = 'images',
|
||||
$glance_rbd_user = 'glance',
|
||||
$verbose = true,
|
||||
$debug = true,
|
||||
$log_facility = 'LOG_LOCAL0',
|
||||
$use_syslog = true
|
||||
) {
|
||||
|
||||
warning('This class is deprecated. You should use cloud::image::api and cloud::image::registry.')
|
||||
|
||||
# Maintain backward compatibility with H.1.2.0
|
||||
class { 'cloud::image::api':
|
||||
glance_db_host => $glance_db_host,
|
||||
glance_db_user => $glance_db_user,
|
||||
glance_db_password => $glance_db_password,
|
||||
openstack_vip => $openstack_vip,
|
||||
ks_glance_registry_internal_port => $ks_glance_registry_internal_port,
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
ks_keystone_internal_host => $ks_keystone_internal_host,
|
||||
ks_glance_password => $ks_glance_password,
|
||||
log_facility => $log_facility,
|
||||
api_eth => $api_eth,
|
||||
ks_glance_api_internal_port => $ks_glance_api_internal_port,
|
||||
use_syslog => $use_syslog,
|
||||
glance_rbd_pool => $glance_rbd_pool,
|
||||
glance_rbd_user => $glance_rbd_user,
|
||||
}
|
||||
class { 'cloud::image::registry':
|
||||
glance_db_host => $glance_db_host,
|
||||
glance_db_user => $glance_db_user,
|
||||
glance_db_password => $glance_db_password,
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
ks_keystone_internal_host => $ks_keystone_internal_host,
|
||||
ks_glance_password => $ks_glance_password,
|
||||
api_eth => $api_eth,
|
||||
ks_glance_registry_internal_port => $ks_glance_registry_internal_port,
|
||||
use_syslog => $use_syslog,
|
||||
log_facility => $log_facility,
|
||||
}
|
||||
|
||||
}
|
@ -70,7 +70,7 @@
|
||||
# [*backend*]
|
||||
# (optionnal) Backend to use to store images
|
||||
# Can be 'rbd', 'file', 'nfs' or 'swift'
|
||||
# Defaults to 'rbd' to maintain backward compatibility
|
||||
# Defaults to 'rbd'
|
||||
#
|
||||
# [*filesystem_store_datadir*]
|
||||
# (optional) Full path of data directory to store the images.
|
||||
|
@ -41,17 +41,6 @@
|
||||
# Should be an array.
|
||||
# Defaults to false (disabled)
|
||||
#
|
||||
# [*keepalived_interface*]
|
||||
# (optional) Networking interface to bind the VIP connected to internal network.
|
||||
# DEPRECATED: use keepalived_public_interface instead.
|
||||
# Defaults to false (disabled)
|
||||
#
|
||||
# [*keepalived_ipvs*]
|
||||
# (optional) IP address of the VIP connected to public network.
|
||||
# DEPRECATED: use keepalived_public_ipvs instead.
|
||||
# Should be an array.
|
||||
# Defaults to false (disabled)
|
||||
#
|
||||
# [*keepalived_auth_type*]
|
||||
# (optional) Authentication method.
|
||||
# Supported methods are simple Passwd (PASS) or IPSEC AH (AH).
|
||||
@ -64,112 +53,112 @@
|
||||
#
|
||||
# [*swift_api*]
|
||||
# (optional) Enable or not Swift public binding.
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false (backward compatibility).
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false.
|
||||
# If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options.
|
||||
# If set to false, no binding will be configure
|
||||
# Defaults to true
|
||||
#
|
||||
# [*ceilometer_api*]
|
||||
# (optional) Enable or not Ceilometer public binding.
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false (backward compatibility).
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false.
|
||||
# If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options.
|
||||
# If set to false, no binding will be configure
|
||||
# Defaults to true
|
||||
#
|
||||
# [*cinder_api*]
|
||||
# (optional) Enable or not Cinder public binding.
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false (backward compatibility).
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false.
|
||||
# If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options.
|
||||
# If set to false, no binding will be configure
|
||||
# Defaults to true
|
||||
#
|
||||
# [*glance_api*]
|
||||
# (optional) Enable or not Glance API public binding.
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false (backward compatibility).
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false.
|
||||
# If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options.
|
||||
# If set to false, no binding will be configure
|
||||
# Defaults to true
|
||||
#
|
||||
# [*glance_registry*]
|
||||
# (optional) Enable or not Glance Registry public binding.
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false (backward compatibility).
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false.
|
||||
# If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options.
|
||||
# If set to false, no binding will be configure
|
||||
# Defaults to true
|
||||
#
|
||||
# [*neutron_api*]
|
||||
# (optional) Enable or not Neutron public binding.
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false (backward compatibility).
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false.
|
||||
# If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options.
|
||||
# If set to false, no binding will be configure
|
||||
# Defaults to true
|
||||
#
|
||||
# [*heat_api*]
|
||||
# (optional) Enable or not Heat public binding.
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false (backward compatibility).
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false.
|
||||
# If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options.
|
||||
# If set to false, no binding will be configure
|
||||
# Defaults to true
|
||||
#
|
||||
# [*heat_cfn_api*]
|
||||
# (optional) Enable or not Heat CFN public binding.
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false (backward compatibility).
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false.
|
||||
# If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options.
|
||||
# If set to false, no binding will be configure
|
||||
# Defaults to true
|
||||
#
|
||||
# [*heat_cloudwatch_api*]
|
||||
# (optional) Enable or not Heat Cloudwatch public binding.
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false (backward compatibility).
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false.
|
||||
# If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options.
|
||||
# If set to false, no binding will be configure
|
||||
# Defaults to true
|
||||
#
|
||||
# [*nova_api*]
|
||||
# (optional) Enable or not Nova public binding.
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false (backward compatibility).
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false.
|
||||
# If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options.
|
||||
# If set to false, no binding will be configure
|
||||
# Defaults to true
|
||||
#
|
||||
# [*trove_api*]
|
||||
# (optional) Enable or not Trove public binding.
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false (backward compatibility).
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false.
|
||||
# If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options.
|
||||
# If set to false, no binding will be configure
|
||||
# Defaults to true
|
||||
#
|
||||
# [*ec2_api*]
|
||||
# (optional) Enable or not EC2 public binding.
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false (backward compatibility).
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false.
|
||||
# If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options.
|
||||
# If set to false, no binding will be configure
|
||||
# Defaults to true
|
||||
#
|
||||
# [*metadata_api*]
|
||||
# (optional) Enable or not Metadata public binding.
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false (backward compatibility).
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false.
|
||||
# If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options.
|
||||
# If set to false, no binding will be configure
|
||||
# Defaults to true
|
||||
#
|
||||
# [*keystone_api*]
|
||||
# (optional) Enable or not Keystone public binding.
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false (backward compatibility).
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false.
|
||||
# If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options.
|
||||
# If set to false, no binding will be configure
|
||||
# Defaults to true
|
||||
#
|
||||
# [*rabbitmq*]
|
||||
# (optional) Enable or not RabbitMQ binding.
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false (backward compatibility).
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false.
|
||||
# If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options.
|
||||
# If set to false, no binding will be configure (default for backward compatibility)
|
||||
# If set to false, no binding will be configure.
|
||||
# Defaults to false
|
||||
#
|
||||
# [*keystone_api_admin*]
|
||||
# (optional) Enable or not Keystone admin binding.
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false (backward compatibility).
|
||||
# If true, both public and internal will attempt to be created except if vip_internal_ip is set to false.
|
||||
# If set to ['10.0.0.1'], only IP in the array (or in the string) will be configured in the pool. They must be part of keepalived_ip options.
|
||||
# If set to false, no binding will be configure
|
||||
# Defaults to true
|
||||
@ -182,7 +171,7 @@
|
||||
# [*vip_internal_ip*]
|
||||
# (optional) Array or string for internal VIP
|
||||
# Should be part of keepalived_internal_ips
|
||||
# Defaults to false (backward compatibility)
|
||||
# Defaults to false
|
||||
#
|
||||
# [*vip_monitor_ip*]
|
||||
# (optional) Array or string for monitor VIP
|
||||
@ -268,41 +257,24 @@ class cloud::loadbalancer(
|
||||
$galera_ip = ['127.0.0.1'],
|
||||
$galera_slave = false,
|
||||
$firewall_settings = {},
|
||||
# Deprecated parameters
|
||||
$keepalived_interface = false,
|
||||
$keepalived_ipvs = false,
|
||||
){
|
||||
|
||||
include cloud::params
|
||||
|
||||
# Manage deprecation when using old parameters
|
||||
if $keepalived_interface {
|
||||
warning('keepalived_interface parameter is deprecated. Use internal/external parameters instead.')
|
||||
$keepalived_public_interface_real = $keepalived_interface
|
||||
} else {
|
||||
$keepalived_public_interface_real = $keepalived_public_interface
|
||||
}
|
||||
if $keepalived_ipvs {
|
||||
warning('keepalived_ipvs parameter is deprecated. Use internal/external parameters instead.')
|
||||
$keepalived_public_ipvs_real = $keepalived_ipvs
|
||||
} else {
|
||||
$keepalived_public_ipvs_real = $keepalived_public_ipvs
|
||||
}
|
||||
if $keepalived_vrrp_interface {
|
||||
$keepalived_vrrp_interface_real = $keepalived_vrrp_interface
|
||||
} else {
|
||||
$keepalived_vrrp_interface_real = $keepalived_public_interface_real
|
||||
$keepalived_vrrp_interface_real = $keepalived_public_interface
|
||||
}
|
||||
# end of deprecation support
|
||||
|
||||
# Fail if OpenStack and Galera VIP are not in the VIP list
|
||||
if $vip_public_ip and !(member(any2array($keepalived_public_ipvs_real), $vip_public_ip)) {
|
||||
if $vip_public_ip and !(member(any2array($keepalived_public_ipvs), $vip_public_ip)) {
|
||||
fail('vip_public_ip should be part of keepalived_public_ipvs.')
|
||||
}
|
||||
if $vip_internal_ip and !(member(any2array($keepalived_internal_ipvs),$vip_internal_ip)) {
|
||||
fail('vip_internal_ip should be part of keepalived_internal_ipvs.')
|
||||
}
|
||||
if $galera_ip and !((member(any2array($keepalived_public_ipvs_real),$galera_ip)) or (member(any2array($keepalived_internal_ipvs),$galera_ip))) {
|
||||
if $galera_ip and !((member(any2array($keepalived_public_ipvs),$galera_ip)) or (member(any2array($keepalived_internal_ipvs),$galera_ip))) {
|
||||
fail('galera_ip should be part of keepalived_public_ipvs or keepalived_internal_ipvs.')
|
||||
}
|
||||
|
||||
@ -319,7 +291,7 @@ class cloud::loadbalancer(
|
||||
|
||||
keepalived::instance { '1':
|
||||
interface => $keepalived_vrrp_interface_real,
|
||||
virtual_ips => unique(split(join(flatten([$keepalived_public_ipvs_real, ['']]), " dev ${keepalived_public_interface_real},"), ',')),
|
||||
virtual_ips => unique(split(join(flatten([$keepalived_public_ipvs, ['']]), " dev ${keepalived_public_interface},"), ',')),
|
||||
state => $keepalived_state,
|
||||
track_script => ['haproxy'],
|
||||
priority => $keepalived_priority,
|
||||
@ -330,6 +302,7 @@ class cloud::loadbalancer(
|
||||
}
|
||||
|
||||
|
||||
# If using an internal VIP, allow to use a dedicated interface for VRRP traffic.
|
||||
# First we check if internal binding is enabled
|
||||
if $keepalived_internal_ipvs {
|
||||
# Then we validate this is not the same as public binding
|
||||
@ -337,7 +310,6 @@ class cloud::loadbalancer(
|
||||
if ! $keepalived_vrrp_interface {
|
||||
$keepalived_vrrp_interface_internal = $keepalived_internal_interface
|
||||
} else {
|
||||
# Backward compatibility
|
||||
$keepalived_vrrp_interface_internal = $keepalived_vrrp_interface
|
||||
}
|
||||
keepalived::instance { '2':
|
||||
@ -561,7 +533,7 @@ class cloud::loadbalancer(
|
||||
firewall_settings => $firewall_settings,
|
||||
}
|
||||
|
||||
if (member(any2array($keepalived_public_ipvs_real), $galera_ip)) {
|
||||
if (member(any2array($keepalived_public_ipvs), $galera_ip)) {
|
||||
warning('Exposing Galera cluster to public network is a security issue.')
|
||||
}
|
||||
haproxy::listen { 'galera_cluster':
|
||||
|
@ -1,43 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Telemetry server nodes
|
||||
#
|
||||
class cloud::telemetry::server(
|
||||
$ks_keystone_internal_host = '127.0.0.1',
|
||||
$ks_keystone_internal_proto = 'http',
|
||||
$ks_ceilometer_internal_port = '8777',
|
||||
$ks_ceilometer_password = 'ceilometerpassword',
|
||||
$api_eth = '127.0.0.1',
|
||||
$mongo_nodes = ['127.0.0.1:27017'],
|
||||
){
|
||||
|
||||
warning('This class is deprecated. You should use cloud::telemetry::api,collector,alarmnotifier,alarmevaluator.')
|
||||
|
||||
class { 'cloud::telemetry::api':
|
||||
ks_keystone_internal_host => $ks_keystone_internal_host,
|
||||
ks_keystone_internal_proto => $ks_keystone_internal_proto,
|
||||
ks_ceilometer_internal_port => $ks_ceilometer_internal_port,
|
||||
ks_ceilometer_password => $ks_ceilometer_password,
|
||||
api_eth => $api_eth,
|
||||
}
|
||||
class { 'cloud::telemetry::alarmevaluator': }
|
||||
class { 'cloud::telemetry::alarmnotifier': }
|
||||
class { 'cloud::telemetry::collector':
|
||||
mongo_nodes => $mongo_nodes,
|
||||
}
|
||||
class { 'cloud::telemetry::notification': }
|
||||
|
||||
}
|
@ -25,6 +25,7 @@
|
||||
# Default to {}
|
||||
#
|
||||
class cloud::volume::api(
|
||||
$default_volume_type,
|
||||
$ks_cinder_internal_port = 8776,
|
||||
$ks_cinder_password = 'cinderpassword',
|
||||
$ks_keystone_internal_host = '127.0.0.1',
|
||||
@ -33,22 +34,13 @@ class cloud::volume::api(
|
||||
$ks_glance_api_internal_port = 9292,
|
||||
$api_eth = '127.0.0.1',
|
||||
$ks_glance_internal_proto = 'http',
|
||||
$default_volume_type = undef,
|
||||
$firewall_settings = {},
|
||||
# Maintain backward compatibility for multi-backend
|
||||
$volume_multi_backend = false
|
||||
) {
|
||||
|
||||
include 'cloud::volume'
|
||||
|
||||
if ! $volume_multi_backend {
|
||||
$default_volume_type_real = undef
|
||||
} else {
|
||||
if ! $default_volume_type {
|
||||
fail('when using multi-backend, you should define a default_volume_type value in cloud::volume::controller')
|
||||
} else {
|
||||
$default_volume_type_real = $default_volume_type
|
||||
}
|
||||
if ! $default_volume_type {
|
||||
fail('default_volume_type should be defined when running Cinder Multi-Backend.')
|
||||
}
|
||||
|
||||
class { 'cinder::api':
|
||||
@ -56,7 +48,7 @@ class cloud::volume::api(
|
||||
keystone_auth_host => $ks_keystone_internal_host,
|
||||
keystone_auth_protocol => $ks_keystone_internal_proto,
|
||||
bind_host => $api_eth,
|
||||
default_volume_type => $default_volume_type_real
|
||||
default_volume_type => $default_volume_type
|
||||
}
|
||||
|
||||
class { 'cinder::glance':
|
||||
|
@ -1,56 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Volume controller
|
||||
#
|
||||
class cloud::volume::controller(
|
||||
$ks_cinder_internal_port = 8776,
|
||||
$ks_cinder_password = 'cinderpassword',
|
||||
$ks_keystone_internal_host = '127.0.0.1',
|
||||
$ks_keystone_internal_proto = 'http',
|
||||
$ks_glance_internal_host = '127.0.0.1',
|
||||
$ks_glance_api_internal_port = 9292,
|
||||
$api_eth = '127.0.0.1',
|
||||
$default_volume_type = undef,
|
||||
$firewall_settings = {},
|
||||
# Maintain backward compatibility for multi-backend
|
||||
$volume_multi_backend = false
|
||||
) {
|
||||
|
||||
warning('This class is deprecated. You should use cloud::volume::api,backup,scheduler.')
|
||||
|
||||
include 'cloud::volume'
|
||||
|
||||
# Maintain backward compatibility
|
||||
class { 'cloud::volume::api':
|
||||
ks_cinder_internal_port => $ks_cinder_internal_port,
|
||||
ks_cinder_password => $ks_cinder_password,
|
||||
ks_keystone_internal_host => $ks_keystone_internal_host,
|
||||
ks_keystone_internal_proto => $ks_keystone_internal_proto,
|
||||
ks_glance_internal_host => $ks_glance_internal_host,
|
||||
ks_glance_api_internal_port => $ks_glance_api_internal_port,
|
||||
api_eth => $api_eth,
|
||||
default_volume_type => $default_volume_type,
|
||||
# Maintain backward compatibility for multi-backend
|
||||
volume_multi_backend => $volume_multi_backend,
|
||||
firewall_settings => $firewall_settings,
|
||||
}
|
||||
class { 'cloud::volume::scheduler':
|
||||
volume_multi_backend => $volume_multi_backend
|
||||
}
|
||||
|
||||
class { 'cloud::volume::backup': }
|
||||
|
||||
}
|
@ -15,21 +15,12 @@
|
||||
#
|
||||
# Volume Scheduler node
|
||||
#
|
||||
class cloud::volume::scheduler(
|
||||
# Maintain backward compatibility for multi-backend
|
||||
$volume_multi_backend = false
|
||||
) {
|
||||
class cloud::volume::scheduler{
|
||||
|
||||
include 'cloud::volume'
|
||||
|
||||
if ! $volume_multi_backend {
|
||||
$scheduler_driver_real = false
|
||||
} else {
|
||||
$scheduler_driver_real = 'cinder.scheduler.filter_scheduler.FilterScheduler'
|
||||
}
|
||||
|
||||
class { 'cinder::scheduler':
|
||||
scheduler_driver => $scheduler_driver_real
|
||||
scheduler_driver => 'cinder.scheduler.filter_scheduler.FilterScheduler'
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -45,7 +45,7 @@
|
||||
# 'premium' => { 'netapp_server_hostname' => 'netapp.host', 'netapp_login' => 'joe', 'netapp_password' => 'secret' }
|
||||
# }
|
||||
# }
|
||||
# Defaults to undef to maintain backward compatibility.
|
||||
# Defaults to undef
|
||||
#
|
||||
class cloud::volume::storage(
|
||||
$cinder_backends = undef,
|
||||
@ -59,8 +59,6 @@ class cloud::volume::storage(
|
||||
$cinder_rbd_conf = '/etc/ceph/ceph.conf',
|
||||
$cinder_rbd_flatten_volume_from_snapshot = false,
|
||||
$cinder_rbd_max_clone_depth = '5',
|
||||
# Deprecated parameters
|
||||
$glance_api_version = '2',
|
||||
) {
|
||||
|
||||
include 'cloud::volume'
|
||||
@ -68,9 +66,13 @@ class cloud::volume::storage(
|
||||
include 'cinder::volume'
|
||||
|
||||
if $cinder_backends {
|
||||
$rbd_backends = has_key($cinder_backends, 'rbd') ? {
|
||||
false => merge({}, {}),
|
||||
default => $cinder_backends['rbd']
|
||||
|
||||
if has_key($cinder_backends, 'rbd') {
|
||||
$rbd_backends = $cinder_backends['rbd']
|
||||
create_resources('cloud::volume::backend::rbd', $rbd_backends)
|
||||
}
|
||||
else {
|
||||
$rbd_backends = { }
|
||||
}
|
||||
|
||||
if has_key($cinder_backends, 'netapp') {
|
||||
@ -127,18 +129,5 @@ class cloud::volume::storage(
|
||||
os_auth_url => "${ks_keystone_internal_proto}://${ks_keystone_internal_host}:${ks_keystone_internal_port}/v2.0"
|
||||
}
|
||||
}
|
||||
# For backward compatibility when not using multi-backend
|
||||
else {
|
||||
$rbd_backends = { 'DEFAULT' => { } }
|
||||
}
|
||||
|
||||
if ! empty($rbd_backends) {
|
||||
create_resources('cloud::volume::backend::rbd', $rbd_backends,
|
||||
{ rbd_pool => $cinder_rbd_pool,
|
||||
rbd_user => $cinder_rbd_user,
|
||||
rbd_secret_uuid => $cinder_rbd_secret_uuid,
|
||||
rbd_ceph_conf => $cinder_rbd_conf,
|
||||
rbd_flatten_volume_from_snapshot => $cinder_rbd_flatten_volume_from_snapshot,
|
||||
rbd_max_clone_depth => $cinder_rbd_max_clone_depth })
|
||||
}
|
||||
}
|
||||
|
@ -1,150 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Unit tests for cloud::compute::controller class
|
||||
#
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'cloud::compute::controller' do
|
||||
|
||||
shared_examples_for 'openstack compute controller' do
|
||||
|
||||
let :pre_condition do
|
||||
"class { 'cloud::compute':
|
||||
availability_zone => 'MyZone',
|
||||
nova_db_host => '10.0.0.1',
|
||||
nova_db_user => 'nova',
|
||||
nova_db_password => 'secrete',
|
||||
rabbit_hosts => ['10.0.0.1'],
|
||||
rabbit_password => 'secrete',
|
||||
ks_glance_internal_host => '10.0.0.1',
|
||||
glance_api_port => '9292',
|
||||
verbose => true,
|
||||
debug => true,
|
||||
use_syslog => true,
|
||||
neutron_protocol => 'http',
|
||||
neutron_endpoint => '10.0.0.1',
|
||||
neutron_region_name => 'MyRegion',
|
||||
neutron_password => 'secrete',
|
||||
memcache_servers => ['10.0.0.1','10.0.0.2'],
|
||||
log_facility => 'LOG_LOCAL0',
|
||||
cinder_endpoint_type => 'adminURL' }"
|
||||
end
|
||||
|
||||
let :params do
|
||||
{ :ks_keystone_internal_host => '10.0.0.1',
|
||||
:ks_nova_password => 'secrete',
|
||||
:api_eth => '10.0.0.1',
|
||||
:spice_port => '6082',
|
||||
:ks_ec2_public_port => '8773',
|
||||
:ks_nova_public_port => '8774',
|
||||
:ks_metadata_public_port => '8775',
|
||||
:neutron_metadata_proxy_shared_secret => 'secrete' }
|
||||
end
|
||||
|
||||
it 'configure nova common' do
|
||||
is_expected.to contain_class('nova').with(
|
||||
:verbose => true,
|
||||
:debug => true,
|
||||
:use_syslog => true,
|
||||
:log_facility => 'LOG_LOCAL0',
|
||||
:rabbit_userid => 'nova',
|
||||
:rabbit_hosts => ['10.0.0.1'],
|
||||
:rabbit_password => 'secrete',
|
||||
:rabbit_virtual_host => '/',
|
||||
:memcached_servers => ['10.0.0.1','10.0.0.2'],
|
||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||
:glance_api_servers => 'http://10.0.0.1:9292',
|
||||
:log_dir => false
|
||||
)
|
||||
is_expected.to contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with('value' => true)
|
||||
is_expected.to contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone')
|
||||
is_expected.to contain_nova_config('DEFAULT/servicegroup_driver').with_value('mc')
|
||||
is_expected.to contain_nova_config('DEFAULT/glance_num_retries').with_value('10')
|
||||
is_expected.to contain_nova_config('DEFAULT/cinder_catalog_info').with_value('volume:cinder:adminURL')
|
||||
end
|
||||
|
||||
it 'configure neutron on compute node' do
|
||||
is_expected.to contain_class('nova::network::neutron').with(
|
||||
:neutron_admin_password => 'secrete',
|
||||
:neutron_admin_auth_url => 'http://10.0.0.1:35357/v2.0',
|
||||
:neutron_region_name => 'MyRegion',
|
||||
:neutron_url => 'http://10.0.0.1:9696'
|
||||
)
|
||||
end
|
||||
|
||||
it 'checks if Nova DB is populated' do
|
||||
is_expected.to contain_exec('nova_db_sync').with(
|
||||
:command => 'nova-manage db sync',
|
||||
:user => 'nova',
|
||||
:path => '/usr/bin',
|
||||
:unless => '/usr/bin/mysql nova -h 10.0.0.1 -u nova -psecrete -e "show tables" | /bin/grep Tables'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configure nova-scheduler' do
|
||||
is_expected.to contain_class('nova::scheduler').with(:enabled => true)
|
||||
end
|
||||
|
||||
it 'configure nova-spicehtml5proxy' do
|
||||
is_expected.to contain_class('nova::spicehtml5proxy').with(
|
||||
:enabled => true,
|
||||
:host => '10.0.0.1'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configure nova-cert' do
|
||||
is_expected.to contain_class('nova::cert').with(:enabled => true)
|
||||
end
|
||||
|
||||
it 'configure nova-consoleauth' do
|
||||
is_expected.to contain_class('nova::consoleauth').with(:enabled => true)
|
||||
end
|
||||
|
||||
it 'configure nova-conductor' do
|
||||
is_expected.to contain_class('nova::conductor').with(:enabled => true)
|
||||
end
|
||||
|
||||
it 'configure nova-api' do
|
||||
is_expected.to contain_class('nova::api').with(
|
||||
:enabled => true,
|
||||
:auth_host => '10.0.0.1',
|
||||
:admin_password => 'secrete',
|
||||
:api_bind_address => '10.0.0.1',
|
||||
:metadata_listen => '10.0.0.1',
|
||||
:neutron_metadata_proxy_shared_secret => 'secrete',
|
||||
:osapi_v3 => true
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'Debian' }
|
||||
end
|
||||
|
||||
it_configures 'openstack compute controller'
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'RedHat' }
|
||||
end
|
||||
it_configures 'openstack compute controller'
|
||||
end
|
||||
|
||||
end
|
@ -68,7 +68,6 @@ describe 'cloud::compute::hypervisor' do
|
||||
{ :libvirt_type => 'kvm',
|
||||
:server_proxyclient_address => '7.0.0.1',
|
||||
:spice_port => '6082',
|
||||
:has_ceph => false,
|
||||
:nova_ssh_private_key => 'secrete',
|
||||
:nova_ssh_public_key => 'public',
|
||||
:ks_nova_public_proto => 'http',
|
||||
@ -388,39 +387,6 @@ describe 'cloud::compute::hypervisor' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with RBD backend plaforms using deprecated parameter' do
|
||||
before :each do
|
||||
facts.merge!( :vtx => true )
|
||||
params.merge!(
|
||||
:has_ceph => true,
|
||||
:cinder_rbd_user => 'cinder',
|
||||
:nova_rbd_pool => 'nova',
|
||||
:nova_rbd_secret_uuid => 'secrete' )
|
||||
end
|
||||
|
||||
it 'configure nova-compute to support RBD backend' do
|
||||
is_expected.to contain_nova_config('libvirt/images_type').with('value' => 'rbd')
|
||||
is_expected.to contain_nova_config('libvirt/images_rbd_pool').with('value' => 'nova')
|
||||
is_expected.to contain_nova_config('libvirt/images_rbd_ceph_conf').with('value' => '/etc/ceph/ceph.conf')
|
||||
is_expected.to contain_nova_config('libvirt/rbd_user').with('value' => 'cinder')
|
||||
is_expected.to contain_nova_config('libvirt/rbd_secret_uuid').with('value' => 'secrete')
|
||||
is_expected.to contain_group('cephkeyring').with(:ensure => 'present')
|
||||
is_expected.to contain_exec('add-nova-to-group').with(
|
||||
:command => 'usermod -a -G cephkeyring nova',
|
||||
:unless => 'groups nova | grep cephkeyring'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configure libvirt driver' do
|
||||
is_expected.to contain_class('nova::compute::libvirt').with(
|
||||
:libvirt_type => 'kvm',
|
||||
:vncserver_listen => '0.0.0.0',
|
||||
:migration_support => true,
|
||||
:libvirt_disk_cachemodes => ['network=writeback']
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when trying to enable RBD backend on RedHat OSP < 7 plaforms' do
|
||||
before :each do
|
||||
facts.merge!( :osfamily => 'RedHat',
|
||||
@ -441,36 +407,6 @@ describe 'cloud::compute::hypervisor' do
|
||||
it_raises 'a Puppet::Error', /libvirt_type is set to KVM and VTX seems to be disabled on this node./
|
||||
end
|
||||
|
||||
context 'when trying to enable RBD backend with deprecated parameter on RedHat plaforms' do
|
||||
before :each do
|
||||
facts.merge!( :osfamily => 'RedHat',
|
||||
:operatingsystemmajrelease => '6' )
|
||||
params.merge!(
|
||||
:has_ceph => true,
|
||||
:cinder_rbd_user => 'cinder',
|
||||
:nova_rbd_pool => 'nova',
|
||||
:nova_rbd_secret_uuid => 'secrete' )
|
||||
end
|
||||
it_raises 'a Puppet::Error', /RBD image backend in Nova is not supported in RHEL 6./
|
||||
end
|
||||
|
||||
context 'when configuring spice with backward compatibility' do
|
||||
before :each do
|
||||
params.merge!(
|
||||
:ks_spice_public_proto => false,
|
||||
:ks_spice_public_host => false )
|
||||
end
|
||||
it 'configure spice console with nova parameters' do
|
||||
is_expected.to contain_class('nova::compute::spice').with(
|
||||
:server_listen => '0.0.0.0',
|
||||
:server_proxyclient_address => '7.0.0.1',
|
||||
:proxy_host => '10.0.0.1',
|
||||
:proxy_protocol => 'http',
|
||||
:proxy_port => '6082'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when storing instances on a NFS share' do
|
||||
before :each do
|
||||
params.merge!(
|
||||
|
@ -1,135 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Unit tests for cloud::image class
|
||||
#
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'cloud::image' do
|
||||
|
||||
let :params do
|
||||
{ :glance_db_host => '10.0.0.1',
|
||||
:glance_db_user => 'glance',
|
||||
:glance_db_password => 'secrete',
|
||||
:ks_keystone_internal_host => '10.0.0.1',
|
||||
:ks_glance_internal_host => '10.0.0.1',
|
||||
:openstack_vip => '10.0.0.42',
|
||||
:ks_glance_api_internal_port => '9292',
|
||||
:ks_glance_registry_internal_port => '9191',
|
||||
:ks_glance_password => 'secrete',
|
||||
:rabbit_host => '10.0.0.1',
|
||||
:rabbit_password => 'secrete',
|
||||
:glance_rbd_user => 'glance',
|
||||
:glance_rbd_pool => 'images',
|
||||
:debug => true,
|
||||
:verbose => true,
|
||||
:use_syslog => true,
|
||||
:log_facility => 'LOG_LOCAL0',
|
||||
:api_eth => '10.0.0.1'
|
||||
}
|
||||
end
|
||||
|
||||
shared_examples_for 'openstack image' do
|
||||
|
||||
it 'configure glance-api' do
|
||||
is_expected.to contain_class('glance::api').with(
|
||||
:database_connection => 'mysql://glance:secrete@10.0.0.1/glance?charset=utf8',
|
||||
:keystone_password => 'secrete',
|
||||
:registry_host => '10.0.0.42',
|
||||
:registry_port => '9191',
|
||||
:keystone_tenant => 'services',
|
||||
:keystone_user => 'glance',
|
||||
:show_image_direct_url => true,
|
||||
:verbose => true,
|
||||
:debug => true,
|
||||
:auth_host => '10.0.0.1',
|
||||
:log_facility => 'LOG_LOCAL0',
|
||||
:bind_host => '10.0.0.1',
|
||||
:bind_port => '9292',
|
||||
:use_syslog => true,
|
||||
:log_dir => false,
|
||||
:log_file => false
|
||||
)
|
||||
end
|
||||
|
||||
it 'configure glance-registry' do
|
||||
is_expected.to contain_class('glance::registry').with(
|
||||
:database_connection => 'mysql://glance:secrete@10.0.0.1/glance?charset=utf8',
|
||||
:keystone_password => 'secrete',
|
||||
:keystone_tenant => 'services',
|
||||
:keystone_user => 'glance',
|
||||
:verbose => true,
|
||||
:debug => true,
|
||||
:auth_host => '10.0.0.1',
|
||||
:log_facility => 'LOG_LOCAL0',
|
||||
:bind_host => '10.0.0.1',
|
||||
:bind_port => '9191',
|
||||
:use_syslog => true,
|
||||
:log_dir => false,
|
||||
:log_file => false
|
||||
)
|
||||
end
|
||||
|
||||
# TODO(EmilienM) Disabled for now
|
||||
# Follow-up https://github.com/enovance/puppet-openstack-cloud/issues/160
|
||||
#
|
||||
# it 'configure glance notifications with rabbitmq backend' do
|
||||
# should contain_class('glance::notify::rabbitmq').with(
|
||||
# :rabbit_password => 'secrete',
|
||||
# :rabbit_userid => 'glance',
|
||||
# :rabbit_host => '10.0.0.1'
|
||||
# )
|
||||
# end
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/notifier_driver').with_value('noop') }
|
||||
|
||||
it 'configure glance rbd backend' do
|
||||
is_expected.to contain_class('glance::backend::rbd').with(
|
||||
:rbd_store_pool => 'images',
|
||||
:rbd_store_user => 'glance'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configure crontab to clean glance cache' do
|
||||
is_expected.to contain_class('glance::cache::cleaner')
|
||||
is_expected.to contain_class('glance::cache::pruner')
|
||||
end
|
||||
|
||||
it 'checks if Glance DB is populated' do
|
||||
is_expected.to contain_exec('glance_db_sync').with(
|
||||
:command => 'glance-manage db_sync',
|
||||
:user => 'glance',
|
||||
:path => '/usr/bin',
|
||||
:unless => '/usr/bin/mysql glance -h 10.0.0.1 -u glance -psecrete -e "show tables" | /bin/grep Tables'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'Debian' }
|
||||
end
|
||||
|
||||
it_configures 'openstack image'
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'RedHat' }
|
||||
end
|
||||
|
||||
it_configures 'openstack image'
|
||||
end
|
||||
|
||||
end
|
@ -135,31 +135,6 @@ describe 'cloud::loadbalancer' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'configure keepalived with deprecated parameters' do
|
||||
before do
|
||||
params.merge!(
|
||||
:keepalived_ipvs => ['192.168.0.2'],
|
||||
:vip_public_ip => '192.168.0.2',
|
||||
:galera_ip => '192.168.0.2',
|
||||
:keepalived_interface => 'eth3'
|
||||
)
|
||||
end
|
||||
it 'configure a public VRRP instance with deprecated parameters' do
|
||||
is_expected.to contain_keepalived__instance('1').with({
|
||||
'interface' => 'eth3',
|
||||
'virtual_ips' => ['192.168.0.2 dev eth3'],
|
||||
'track_script' => ['haproxy'],
|
||||
'state' => 'BACKUP',
|
||||
'priority' => params[:keepalived_priority],
|
||||
'auth_type' => 'PASS',
|
||||
'auth_pass' => 'secret',
|
||||
'notify_master' => "#{platform_params[:start_haproxy_service]}",
|
||||
'notify_backup' => "#{platform_params[:stop_haproxy_service]}",
|
||||
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
context 'configure keepalived vrrp on dedicated interface' do
|
||||
before do
|
||||
params.merge!(:keepalived_vrrp_interface => 'eth2')
|
||||
|
@ -1,128 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Unit tests for cloud::telemetry::server class
|
||||
#
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'cloud::telemetry::server' do
|
||||
|
||||
shared_examples_for 'openstack telemetry server' do
|
||||
|
||||
let :pre_condition do
|
||||
"class { 'cloud::telemetry':
|
||||
ceilometer_secret => 'secrete',
|
||||
rabbit_hosts => ['10.0.0.1'],
|
||||
rabbit_password => 'secrete',
|
||||
ks_keystone_internal_host => '10.0.0.1',
|
||||
ks_keystone_internal_port => '5000',
|
||||
ks_keystone_internal_proto => 'http',
|
||||
ks_ceilometer_password => 'secrete',
|
||||
region => 'MyRegion',
|
||||
log_facility => 'LOG_LOCAL0',
|
||||
use_syslog => true,
|
||||
verbose => true,
|
||||
debug => true }"
|
||||
end
|
||||
|
||||
let :params do
|
||||
{ :ks_keystone_internal_host => '10.0.0.1',
|
||||
:ks_keystone_internal_proto => 'http',
|
||||
:ks_ceilometer_internal_port => '8777',
|
||||
:ks_ceilometer_password => 'secrete',
|
||||
:api_eth => '10.0.0.1',
|
||||
:mongo_nodes => ['node1', 'node2', 'node3'] }
|
||||
end
|
||||
|
||||
it 'configure ceilometer common' do
|
||||
is_expected.to contain_class('ceilometer').with(
|
||||
:verbose => true,
|
||||
:debug => true,
|
||||
:rabbit_userid => 'ceilometer',
|
||||
:rabbit_hosts => ['10.0.0.1'],
|
||||
:rabbit_password => 'secrete',
|
||||
:metering_secret => 'secrete',
|
||||
:use_syslog => true,
|
||||
:log_facility => 'LOG_LOCAL0',
|
||||
:log_dir => false
|
||||
)
|
||||
is_expected.to contain_class('ceilometer::agent::auth').with(
|
||||
:auth_password => 'secrete',
|
||||
:auth_url => 'http://10.0.0.1:5000/v2.0',
|
||||
:auth_region => 'MyRegion'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configure ceilometer collector' do
|
||||
is_expected.to contain_class('ceilometer::collector')
|
||||
end
|
||||
|
||||
it 'configure ceilometer notification agent' do
|
||||
is_expected.to contain_class('ceilometer::agent::notification')
|
||||
end
|
||||
|
||||
it 'configure ceilometer alarm evaluator' do
|
||||
is_expected.to contain_class('ceilometer::alarm::evaluator')
|
||||
end
|
||||
|
||||
it 'configure ceilometer alarm notifier' do
|
||||
is_expected.to contain_class('ceilometer::alarm::notifier')
|
||||
end
|
||||
|
||||
it 'configure ceilometer-api' do
|
||||
is_expected.to contain_class('ceilometer::api').with(
|
||||
:keystone_password => 'secrete',
|
||||
:keystone_host => '10.0.0.1',
|
||||
:keystone_protocol => 'http',
|
||||
:host => '10.0.0.1'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configure ceilometer-expirer' do
|
||||
is_expected.to contain_class('ceilometer::expirer').with(
|
||||
:time_to_live => '2592000',
|
||||
:minute => '0',
|
||||
:hour => '0'
|
||||
)
|
||||
end
|
||||
|
||||
it 'synchronize ceilometer db indexes' do
|
||||
is_expected.to contain_class('ceilometer::db').with(
|
||||
:sync_db => true,
|
||||
:database_connection => 'mongodb://node1,node2,node3/ceilometer?replicaSet=ceilometer'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'Debian',
|
||||
:hostname => 'node1' }
|
||||
end
|
||||
|
||||
it_configures 'openstack telemetry server'
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'RedHat',
|
||||
:hostname => 'node1' }
|
||||
end
|
||||
|
||||
it_configures 'openstack telemetry server'
|
||||
end
|
||||
|
||||
end
|
@ -1,131 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Unit tests for cloud::telemetry::server class
|
||||
#
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'cloud::telemetry::server' do
|
||||
|
||||
shared_examples_for 'openstack telemetry server' do
|
||||
|
||||
let :pre_condition do
|
||||
"class { 'cloud::telemetry':
|
||||
ceilometer_secret => 'secrete',
|
||||
rabbit_hosts => ['10.0.0.1'],
|
||||
rabbit_password => 'secrete',
|
||||
ks_keystone_internal_host => '10.0.0.1',
|
||||
ks_keystone_internal_port => '5000',
|
||||
ks_keystone_internal_proto => 'http',
|
||||
ks_ceilometer_password => 'secrete',
|
||||
region => 'MyRegion',
|
||||
log_facility => 'LOG_LOCAL0',
|
||||
use_syslog => true,
|
||||
verbose => true,
|
||||
debug => true,
|
||||
os_endpoint_type => 'internalURL' }"
|
||||
end
|
||||
|
||||
let :params do
|
||||
{ :ks_keystone_internal_host => '10.0.0.1',
|
||||
:ks_keystone_internal_proto => 'http',
|
||||
:ks_ceilometer_internal_port => '8777',
|
||||
:ks_ceilometer_password => 'secrete',
|
||||
:api_eth => '10.0.0.1',
|
||||
:mongo_nodes => ['node1', 'node2', 'node3'] }
|
||||
end
|
||||
|
||||
it 'configure ceilometer common' do
|
||||
is_expected.to contain_class('ceilometer').with(
|
||||
:verbose => true,
|
||||
:debug => true,
|
||||
:rabbit_userid => 'ceilometer',
|
||||
:rabbit_hosts => ['10.0.0.1'],
|
||||
:rabbit_password => 'secrete',
|
||||
:metering_secret => 'secrete',
|
||||
:use_syslog => true,
|
||||
:log_facility => 'LOG_LOCAL0',
|
||||
:log_dir => false
|
||||
)
|
||||
is_expected.to contain_class('ceilometer::agent::auth').with(
|
||||
:auth_password => 'secrete',
|
||||
:auth_url => 'http://10.0.0.1:5000/v2.0',
|
||||
:auth_region => 'MyRegion'
|
||||
)
|
||||
|
||||
is_expected.to contain_ceilometer_config('service_credentials/os_endpoint_type').with('value' => 'internalURL')
|
||||
end
|
||||
|
||||
it 'configure ceilometer collector' do
|
||||
is_expected.to contain_class('ceilometer::collector')
|
||||
end
|
||||
|
||||
it 'configure ceilometer notification agent' do
|
||||
is_expected.to contain_class('ceilometer::agent::notification')
|
||||
end
|
||||
|
||||
it 'configure ceilometer alarm evaluator' do
|
||||
is_expected.to contain_class('ceilometer::alarm::evaluator')
|
||||
end
|
||||
|
||||
it 'configure ceilometer alarm notifier' do
|
||||
is_expected.to contain_class('ceilometer::alarm::notifier')
|
||||
end
|
||||
|
||||
it 'configure ceilometer-api' do
|
||||
is_expected.to contain_class('ceilometer::api').with(
|
||||
:keystone_password => 'secrete',
|
||||
:keystone_host => '10.0.0.1',
|
||||
:keystone_protocol => 'http',
|
||||
:host => '10.0.0.1'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configure ceilometer-expirer' do
|
||||
is_expected.to contain_class('ceilometer::expirer').with(
|
||||
:time_to_live => '2592000',
|
||||
:minute => '0',
|
||||
:hour => '0'
|
||||
)
|
||||
end
|
||||
|
||||
it 'synchronize ceilometer db indexes' do
|
||||
is_expected.to contain_class('ceilometer::db').with(
|
||||
:sync_db => true,
|
||||
:database_connection => 'mongodb://node1,node2,node3/ceilometer?replicaSet=ceilometer'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'Debian',
|
||||
:hostname => 'node1' }
|
||||
end
|
||||
|
||||
it_configures 'openstack telemetry server'
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'RedHat',
|
||||
:hostname => 'node1' }
|
||||
end
|
||||
|
||||
it_configures 'openstack telemetry server'
|
||||
end
|
||||
|
||||
end
|
@ -13,14 +13,14 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
# Unit tests for cloud::volume::controller class
|
||||
# Unit tests for cloud::volume::api class
|
||||
#
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'cloud::volume::controller' do
|
||||
describe 'cloud::volume::api' do
|
||||
|
||||
shared_examples_for 'openstack volume controller' do
|
||||
shared_examples_for 'openstack volume api' do
|
||||
|
||||
let :pre_condition do
|
||||
"class { 'cloud::volume':
|
||||
@ -44,7 +44,7 @@ describe 'cloud::volume::controller' do
|
||||
:ks_keystone_internal_proto => 'https',
|
||||
:ks_glance_internal_host => '10.0.0.2',
|
||||
:ks_glance_api_internal_port => '9292',
|
||||
:volume_multi_backend => false,
|
||||
:default_volume_type => 'ceph',
|
||||
# TODO(EmilienM) Disabled for now: http://git.io/kfTmcA
|
||||
#:backup_ceph_user => 'cinder',
|
||||
#:backup_ceph_pool => 'ceph_backup_cinder',
|
||||
@ -77,39 +77,6 @@ describe 'cloud::volume::controller' do
|
||||
)
|
||||
end
|
||||
|
||||
it 'configure cinder scheduler without multi-backend' do
|
||||
is_expected.to contain_class('cinder::scheduler').with(
|
||||
:scheduler_driver => false
|
||||
)
|
||||
end
|
||||
|
||||
context 'with multi-backend' do
|
||||
before :each do
|
||||
params.merge!(
|
||||
:volume_multi_backend => true,
|
||||
:default_volume_type => 'ceph'
|
||||
)
|
||||
end
|
||||
it 'configure cinder scheduler with multi-backend' do
|
||||
is_expected.to contain_class('cinder::scheduler').with(
|
||||
:scheduler_driver => 'cinder.scheduler.filter_scheduler.FilterScheduler'
|
||||
)
|
||||
is_expected.to contain_class('cinder::api').with(:default_volume_type => 'ceph')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with multi-backend without default volume type' do
|
||||
before :each do
|
||||
params.merge!(
|
||||
:volume_multi_backend => true,
|
||||
:default_volume_type => nil
|
||||
)
|
||||
end
|
||||
it 'should raise an error and fail' do
|
||||
is_expected.not_to compile
|
||||
end
|
||||
end
|
||||
|
||||
it 'configure cinder glance backend' do
|
||||
is_expected.to contain_class('cinder::glance').with(
|
||||
:glance_api_servers => 'http://10.0.0.2:9292',
|
||||
@ -123,9 +90,18 @@ describe 'cloud::volume::controller' do
|
||||
:keystone_password => 'secrete',
|
||||
:keystone_auth_host => '10.0.0.1',
|
||||
:keystone_auth_protocol => 'https',
|
||||
:bind_host => '10.0.0.1'
|
||||
:bind_host => '10.0.0.1',
|
||||
:default_volume_type => 'ceph',
|
||||
)
|
||||
is_expected.to contain_cinder_config('DEFAULT/default_volume_type').with(:ensure => 'absent')
|
||||
end
|
||||
|
||||
context 'without default volume type' do
|
||||
before :each do
|
||||
params.delete(:default_volume_type)
|
||||
end
|
||||
it 'should raise an error and fail' do
|
||||
is_expected.not_to compile
|
||||
end
|
||||
end
|
||||
|
||||
# TODO(EmilienM) Disabled for now: http://git.io/kfTmcA
|
||||
@ -174,7 +150,7 @@ describe 'cloud::volume::controller' do
|
||||
{ :osfamily => 'Debian' }
|
||||
end
|
||||
|
||||
it_configures 'openstack volume controller'
|
||||
it_configures 'openstack volume api'
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
@ -182,7 +158,7 @@ describe 'cloud::volume::controller' do
|
||||
{ :osfamily => 'RedHat' }
|
||||
end
|
||||
|
||||
it_configures 'openstack volume controller'
|
||||
it_configures 'openstack volume api'
|
||||
end
|
||||
|
||||
end
|
94
spec/classes/cloud_volume_scheduler_spec.rb
Normal file
94
spec/classes/cloud_volume_scheduler_spec.rb
Normal file
@ -0,0 +1,94 @@
|
||||
#
|
||||
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Unit tests for cloud::volume::controller class
|
||||
#
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'cloud::volume::scheduler' do
|
||||
|
||||
shared_examples_for 'openstack volume scheduler' do
|
||||
|
||||
let :pre_condition do
|
||||
"class { 'cloud::volume':
|
||||
cinder_db_host => '10.0.0.1',
|
||||
cinder_db_user => 'cinder',
|
||||
cinder_db_password => 'secrete',
|
||||
rabbit_hosts => ['10.0.0.1'],
|
||||
rabbit_password => 'secrete',
|
||||
verbose => true,
|
||||
debug => true,
|
||||
log_facility => 'LOG_LOCAL0',
|
||||
storage_availability_zone => 'nova',
|
||||
use_syslog => true,
|
||||
nova_endpoint_type => 'internalURL' }"
|
||||
end
|
||||
|
||||
let :params do
|
||||
{}
|
||||
end
|
||||
|
||||
it 'configure cinder common' do
|
||||
is_expected.to contain_class('cinder').with(
|
||||
:verbose => true,
|
||||
:debug => true,
|
||||
:rabbit_userid => 'cinder',
|
||||
:rabbit_hosts => ['10.0.0.1'],
|
||||
:rabbit_password => 'secrete',
|
||||
:rabbit_virtual_host => '/',
|
||||
:log_facility => 'LOG_LOCAL0',
|
||||
:use_syslog => true,
|
||||
:log_dir => false,
|
||||
:storage_availability_zone => 'nova'
|
||||
)
|
||||
is_expected.to contain_class('cinder::ceilometer')
|
||||
is_expected.to contain_cinder_config('DEFAULT/nova_catalog_info').with('value' => 'compute:nova:internalURL')
|
||||
end
|
||||
|
||||
it 'checks if Cinder DB is populated' do
|
||||
is_expected.to contain_exec('cinder_db_sync').with(
|
||||
:command => 'cinder-manage db sync',
|
||||
:user => 'cinder',
|
||||
:path => '/usr/bin',
|
||||
:unless => '/usr/bin/mysql cinder -h 10.0.0.1 -u cinder -psecrete -e "show tables" | /bin/grep Tables'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configure cinder scheduler' do
|
||||
is_expected.to contain_class('cinder::scheduler').with(
|
||||
:scheduler_driver => 'cinder.scheduler.filter_scheduler.FilterScheduler'
|
||||
)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'Debian' }
|
||||
end
|
||||
|
||||
it_configures 'openstack volume scheduler'
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'RedHat' }
|
||||
end
|
||||
|
||||
it_configures 'openstack volume scheduler'
|
||||
end
|
||||
|
||||
end
|
@ -284,21 +284,6 @@ describe 'cloud::volume::storage' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with backward compatiblity (without multi-backend)' do
|
||||
before :each do
|
||||
params.merge!(:cinder_backends => false)
|
||||
end
|
||||
it 'configure rbd volume driver without multi-backend' do
|
||||
is_expected.to contain_cinder__backend__rbd('DEFAULT').with(
|
||||
:rbd_pool => 'ceph_cinder',
|
||||
:rbd_user => 'cinder',
|
||||
:rbd_secret_uuid => 'secret',
|
||||
:rbd_ceph_conf => '/etc/ceph/ceph.conf',
|
||||
:rbd_flatten_volume_from_snapshot => false,
|
||||
:rbd_max_clone_depth => '10'
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
|
Loading…
x
Reference in New Issue
Block a user