154 lines
7.0 KiB
Ruby
154 lines
7.0 KiB
Ruby
# encoding: UTF-8
|
|
#
|
|
# Cookbook Name:: openstack-block-storage
|
|
# Attributes:: default
|
|
#
|
|
# Copyright 2012, DreamHost
|
|
# Copyright 2012, Rackspace US, Inc.
|
|
# Copyright 2012-2013, AT&T Services, Inc.
|
|
# Copyright 2013, Opscode, Inc.
|
|
# Copyright 2013-2014, IBM, Corp
|
|
#
|
|
# 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.
|
|
#
|
|
|
|
########################################################################
|
|
# Toggles - These can be overridden at the environment level
|
|
default['developer_mode'] = false # we want secure passwords by default
|
|
########################################################################
|
|
|
|
# Set to some text value if you want templated config files
|
|
# to contain a custom banner at the top of the written file
|
|
default['openstack']['block-storage']['custom_template_banner'] = '
|
|
# This file is automatically generated by Chef
|
|
# Any changes will be overwritten
|
|
'
|
|
|
|
# Specify policy.json remote file to import
|
|
default['openstack']['block-storage']['policyfile_url'] = nil
|
|
|
|
# Availability zone/region for the OpenStack Block-Storage service
|
|
default['openstack']['block-storage']['region'] = node['openstack']['region']
|
|
default['openstack']['block-storage']['scheduler_role'] = 'os-block-storage-scheduler'
|
|
|
|
# The name of the Chef role that knows about the message queue server
|
|
# that Cinder uses
|
|
default['openstack']['block-storage']['rabbit_server_chef_role'] = 'os-ops-messaging'
|
|
|
|
# This is the name of the Chef role that will install the Keystone Service API
|
|
default['openstack']['block-storage']['keystone_service_chef_role'] = 'keystone'
|
|
|
|
default['openstack']['block-storage']['service_user'] = 'cinder'
|
|
default['openstack']['block-storage']['project'] = 'service'
|
|
default['openstack']['block-storage']['service_role'] = 'service'
|
|
default['openstack']['block-storage']['service_name'] = 'cinderv2'
|
|
default['openstack']['block-storage']['service_type'] = 'volumev2'
|
|
|
|
# logging attribute
|
|
default['openstack']['block-storage']['syslog']['use'] = false
|
|
default['openstack']['block-storage']['syslog']['facility'] = 'LOG_LOCAL2'
|
|
default['openstack']['block-storage']['syslog']['config_facility'] = 'local2'
|
|
|
|
default['openstack']['block-storage']['volume']['volume_group_size'] = 40
|
|
# Type of volume group to create:
|
|
# - 'file' for basic 40g file for testing
|
|
# - 'block_devices' for using block devices, specified in block_devices attribute
|
|
default['openstack']['block-storage']['volume']['create_volume_group_type'] = 'file'
|
|
# String of local disk device paths
|
|
# Examples: '/dev/sdx /dev/sdx1' or '/dev/sd[k-m]1'
|
|
default['openstack']['block-storage']['volume']['block_devices'] = nil
|
|
|
|
default['openstack']['block-storage']['user'] = 'cinder'
|
|
default['openstack']['block-storage']['group'] = 'cinder'
|
|
|
|
# Cinder WSGI app SSL settings
|
|
default['openstack']['block-storage']['ssl']['enabled'] = false
|
|
default['openstack']['block-storage']['ssl']['certfile'] = ''
|
|
default['openstack']['block-storage']['ssl']['chainfile'] = ''
|
|
default['openstack']['block-storage']['ssl']['keyfile'] = ''
|
|
default['openstack']['block-storage']['ssl']['ca_certs_path'] = ''
|
|
default['openstack']['block-storage']['ssl']['cert_required'] = false
|
|
default['openstack']['block-storage']['ssl']['protocol'] = ''
|
|
default['openstack']['block-storage']['ssl']['ciphers'] = ''
|
|
|
|
case node['platform_family']
|
|
when 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this
|
|
# operating system user and group names
|
|
default['openstack']['block-storage']['volume']['iscsi_helper'] = 'lioadm'
|
|
default['openstack']['block-storage']['platform'] = {
|
|
'cinder_common_packages' => ['openstack-cinder'],
|
|
'cinder_api_packages' => ['openstack-cinder'],
|
|
'cinder_api_service' => 'openstack-cinder-api',
|
|
'cinder_volume_packages' => ['qemu-img-ev', 'scsi-target-utils'],
|
|
'cinder_volume_service' => 'openstack-cinder-volume',
|
|
'cinder_scheduler_packages' => [],
|
|
'cinder_scheduler_service' => 'openstack-cinder-scheduler',
|
|
'cinder_backup_packages' => [],
|
|
'cinder_backup_service' => 'openstack-cinder-backup',
|
|
'cinder_iscsitarget_packages' => ['targetcli', 'dbus-python'],
|
|
'cinder_iscsitarget_service' => 'tgtd',
|
|
'cinder_ceph_packages' => ['python-ceph', 'ceph-common'],
|
|
'cinder_nfs_packages' => ['nfs-utils', 'nfs-utils-lib'],
|
|
'cinder_emc_packages' => ['pywbem'],
|
|
'cinder_svc_packages' => ['sysfsutils'],
|
|
'cinder_lvm_packages' => ['lvm2'],
|
|
'cinder_flashsystem_packages' => ['sysfsutils'],
|
|
'package_overrides' => '',
|
|
}
|
|
when 'debian'
|
|
# operating system user and group names
|
|
default['openstack']['block-storage']['platform'] = {
|
|
'cinder_common_packages' => ['cinder-common'],
|
|
'cinder_api_packages' => ['cinder-api'],
|
|
'cinder_api_service' => 'cinder-api',
|
|
'cinder_volume_packages' => ['cinder-volume', 'qemu-utils', 'thin-provisioning-tools'],
|
|
'cinder_volume_service' => 'cinder-volume',
|
|
'cinder_scheduler_packages' => ['cinder-scheduler'],
|
|
'cinder_scheduler_service' => 'cinder-scheduler',
|
|
'cinder_backup_packages' => ['cinder-backup'],
|
|
'cinder_backup_service' => 'cinder-backup',
|
|
'cinder_ceph_packages' => ['python-ceph', 'ceph-common'],
|
|
'cinder_iscsitarget_packages' => ['tgt'],
|
|
'cinder_iscsitarget_service' => 'tgt',
|
|
'cinder_nfs_packages' => ['nfs-common'],
|
|
'cinder_emc_packages' => ['python-pywbem'],
|
|
'cinder_svc_packages' => ['sysfsutils'],
|
|
'cinder_lvm_packages' => ['lvm2'],
|
|
'cinder_flashsystem_packages' => ['sysfsutils'],
|
|
'package_overrides' => '',
|
|
}
|
|
end
|
|
|
|
# ******************** OpenStack Volume Endpoints *****************************
|
|
|
|
# The OpenStack Volume (Cinder) API endpoint
|
|
%w(public internal admin).each do |ep_type|
|
|
default['openstack']['endpoints'][ep_type]['block-storage']['scheme'] = 'http'
|
|
default['openstack']['endpoints'][ep_type]['block-storage']['path'] = '/v2/%(tenant_id)s'
|
|
default['openstack']['endpoints'][ep_type]['block-storage']['host'] = '127.0.0.1'
|
|
default['openstack']['endpoints'][ep_type]['block-storage']['port'] = '8776'
|
|
end
|
|
default['openstack']['bind_service']['all']['block-storage']['host'] = '127.0.0.1'
|
|
default['openstack']['bind_service']['all']['block-storage']['port'] = '8776'
|
|
# ============================= rootwrap Configuration ===================
|
|
# use cinder root wrap
|
|
default['openstack']['block-storage']['use_rootwrap'] = true
|
|
# rootwrap.conf
|
|
default['openstack']['block-storage']['rootwrap']['conf'].tap do |conf|
|
|
conf['DEFAULT']['filters_path'] = '/etc/cinder/rootwrap.d,/usr/share/cinder/rootwrap'
|
|
conf['DEFAULT']['exec_dirs'] = '/sbin,/usr/sbin,/bin,/usr/bin'
|
|
conf['DEFAULT']['use_syslog'] = false
|
|
conf['DEFAULT']['syslog_log_facility'] = 'syslog'
|
|
conf['DEFAULT']['syslog_log_level'] = 'ERROR'
|
|
end
|