Add client recipe for block storage
Add an explicit recipe for installing client only packages. Tests are also included. Bumped minor version for this new feature. Change-Id: I4cf9aa8351f0c846b835b28d06c9ee92561f0353 Addresses: blueprint add-client-recipes
This commit is contained in:
parent
2cb0c061d6
commit
18aba8f49a
|
@ -2,6 +2,9 @@ openstack-block-storage Cookbook CHANGELOG
|
|||
==============================
|
||||
This file is used to list changes made in each version of the openstack-block-storage cookbook.
|
||||
|
||||
## 8.1.0
|
||||
* Add client recipe
|
||||
|
||||
## 8.0.0
|
||||
### New version
|
||||
* Upgrade to upstream Havana release
|
||||
|
|
|
@ -29,6 +29,10 @@ api
|
|||
- Installs the cinder-api, sets up the cinder database,
|
||||
and cinder service/user/endpoints in keystone
|
||||
|
||||
client
|
||||
----
|
||||
- Install the cinder client packages
|
||||
|
||||
scheduler
|
||||
----
|
||||
- Installs the cinder-scheduler service
|
||||
|
@ -170,7 +174,8 @@ License and Author
|
|||
| **Author** | Ionut Artarisi (<iartarisi@suse.cz>) |
|
||||
| **Author** | David Geng (<gengjh@cn.ibm.com>) |
|
||||
| **Author** | Salman Baset (<sabaset@us.ibm.com>) |
|
||||
| **Author** | Chen Zhiwei (zhiwchen@cn.ibm.com>) |
|
||||
| **Author** | Chen Zhiwei (<zhiwchen@cn.ibm.com>) |
|
||||
| **Author** | Mark Vanderwiel (<vanderwl@us.ibm.com>) |
|
||||
| | |
|
||||
| **Copyright** | Copyright (c) 2012, Rackspace US, Inc. |
|
||||
| **Copyright** | Copyright (c) 2012-2013, AT&T Services, Inc. |
|
||||
|
|
|
@ -169,6 +169,7 @@ when 'fedora', 'redhat', 'centos' # :pragma-foodcritic: ~FC024 - won't fix this
|
|||
'cinder_common_packages' => ['openstack-cinder'],
|
||||
'cinder_api_packages' => ['python-cinderclient'],
|
||||
'cinder_api_service' => 'openstack-cinder-api',
|
||||
'cinder_client_packages' => ['python-cinderclient'],
|
||||
'cinder_volume_packages' => [],
|
||||
'cinder_volume_service' => 'openstack-cinder-volume',
|
||||
'cinder_scheduler_packages' => [],
|
||||
|
@ -188,6 +189,7 @@ when 'suse'
|
|||
'cinder_common_packages' => ['openstack-cinder'],
|
||||
'cinder_api_packages' => ['openstack-cinder-api'],
|
||||
'cinder_api_service' => 'openstack-cinder-api',
|
||||
'cinder_client_packages' => ['python-cinderclient'],
|
||||
'cinder_scheduler_packages' => ['openstack-cinder-scheduler'],
|
||||
'cinder_scheduler_service' => 'openstack-cinder-scheduler',
|
||||
'cinder_volume_packages' => ['openstack-cinder-volume'],
|
||||
|
@ -206,6 +208,7 @@ when 'ubuntu'
|
|||
'cinder_common_packages' => ['cinder-common'],
|
||||
'cinder_api_packages' => ['cinder-api', 'python-cinderclient'],
|
||||
'cinder_api_service' => 'cinder-api',
|
||||
'cinder_client_packages' => ['python-cinderclient'],
|
||||
'cinder_volume_packages' => ['cinder-volume'],
|
||||
'cinder_volume_service' => 'cinder-volume',
|
||||
'cinder_scheduler_packages' => ['cinder-scheduler'],
|
||||
|
|
|
@ -5,10 +5,11 @@ maintainer_email 'cookbooks@lists.tfoundry.com'
|
|||
license 'Apache 2.0'
|
||||
description 'The OpenStack Advanced Volume Management service Cinder.'
|
||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version '8.0.0'
|
||||
version '8.1.0'
|
||||
|
||||
recipe 'openstack-block-storage::common', 'Defines the common pieces of repeated code from the other recipes'
|
||||
recipe 'openstack-block-storage::api', 'Installs the cinder-api, sets up the cinder database, and cinder service/user/endpoints in keystone'
|
||||
recipe 'openstack-block-storage::client', 'Install packages required for cinder client'
|
||||
recipe 'openstack-block-storage::common', 'Defines the common pieces of repeated code from the other recipes'
|
||||
recipe 'openstack-block-storage::keystone_registration', 'Registers cinder service/user/endpoints in keystone'
|
||||
recipe 'openstack-block-storage::scheduler', 'Installs the cinder-scheduler service'
|
||||
recipe 'openstack-block-storage::volume', 'Installs the cinder-volume service and sets up the iscsi helper'
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
# encoding: UTF-8
|
||||
#
|
||||
# Cookbook Name:: openstack-block-storage
|
||||
# Recipe:: client
|
||||
#
|
||||
# Copyright 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.
|
||||
#
|
||||
|
||||
class ::Chef::Recipe # rubocop:disable Documentation
|
||||
include ::Openstack
|
||||
end
|
||||
|
||||
platform_options = node['openstack']['block-storage']['platform']
|
||||
platform_options['cinder_client_packages'].each do |pkg|
|
||||
package pkg do
|
||||
options platform_options['package_overrides']
|
||||
|
||||
action :upgrade
|
||||
end
|
||||
end
|
|
@ -0,0 +1,18 @@
|
|||
# encoding: UTF-8
|
||||
require_relative 'spec_helper'
|
||||
|
||||
describe 'openstack-block-storage::client' do
|
||||
|
||||
describe 'redhat' do
|
||||
|
||||
let(:runner) { ChefSpec::Runner.new(REDHAT_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) do
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
||||
it 'installs packages' do
|
||||
expect(chef_run).to upgrade_package('python-cinderclient')
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,18 @@
|
|||
# encoding: UTF-8
|
||||
require_relative 'spec_helper'
|
||||
|
||||
describe 'openstack-block-storage::client' do
|
||||
|
||||
describe 'ubuntu' do
|
||||
|
||||
let(:runner) { ChefSpec::Runner.new(UBUNTU_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) do
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
||||
it 'installs packages' do
|
||||
expect(chef_run).to upgrade_package('python-cinderclient')
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue