Skip to content

Commit

Permalink
Merge pull request #23 from rightscale-cookbooks/white_14_08_acu17610…
Browse files Browse the repository at this point in the history
…6_vsphere_using_volume_type

Add volume_type input.
  • Loading branch information
douglaswth committed Aug 6, 2014
2 parents 66c7ba5 + 59519f6 commit 81ac618
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 4 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
rs-mysql Cookbook CHANGELOG
=======================

This file is used to list changes made in each version of the rs-mysql cookbook.

v1.1.1
------

- Update the dependency versions of `rightscale_volume` and `rightscale_backup`, supporing VMware vSphere.
- Set `rs-mysql/device/volume_type` node attribute in metadata.
- Pass `rs-mysql/device/volume_type` and `rs-mysql/device/controller_type` to `rightscale_volume`.

v1.1.0
------

- Release to coincide with the v14.0.0 Beta ServerTemplates.

v1.0.0
------

- Initial release
6 changes: 6 additions & 0 deletions attributes/volume.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
# I/O Operations Per Second value
default['rs-mysql']['device']['iops'] = nil

# Volume type
default['rs-mysql']['device']['volume_type'] = nil

# Controller type
default['rs-mysql']['device']['controller_type'] = nil

# The filesystem to be used on the device
default['rs-mysql']['device']['filesystem'] = 'ext4'

Expand Down
13 changes: 10 additions & 3 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
license 'Apache 2.0'
description 'Installs and configures a MySQL server'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '1.1.0'
version '1.1.1'

depends 'chef_handler', '~> 1.1.6'
depends 'marker', '~> 1.0.0'
Expand All @@ -14,8 +14,8 @@
depends 'rightscale_tag', '~> 1.0.2'
depends 'filesystem', '~> 0.9.0'
depends 'lvm', '~> 1.1.0'
depends 'rightscale_volume', '~> 1.1.0'
depends 'rightscale_backup', '~> 1.1.1'
depends 'rightscale_volume', '~> 1.2.1'
depends 'rightscale_backup', '~> 1.1.3'
depends 'dns', '~> 0.1.3'
depends 'git', '~> 2.7.0'

Expand Down Expand Up @@ -127,6 +127,13 @@
:recipes => ['rs-mysql::volume', 'rs-mysql::stripe'],
:required => 'optional'

attribute 'rs-mysql/device/volume_type',
:display_name => 'Volume Type',
:description => 'Volume Type to use for creating volumes. Currently this value is only used on vSphere.' +
' Example: Platinum-Volume-Type',
:recipes => ['rs-mysql::volume', 'rs-mysql::stripe'],
:required => 'optional'

attribute 'rs-mysql/device/filesystem',
:display_name => 'Device Filesystem',
:description => 'The filesystem to be used on the device. Example: ext4',
Expand Down
2 changes: 2 additions & 0 deletions recipes/stripe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
# Cloud-specific volume options
volume_options = {}
volume_options[:iops] = node['rs-mysql']['device']['iops'] if node['rs-mysql']['device']['iops']
volume_options[:volume_type] = node['rs-mysql']['device']['volume_type'] if node['rs-mysql']['device']['volume_type']
volume_options[:controller_type] = node['rs-mysql']['device']['controller_type'] if node['rs-mysql']['device']['controller_type']

# Install packages required for setting up LVM
include_recipe 'lvm::default'
Expand Down
2 changes: 2 additions & 0 deletions recipes/volume.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
# Cloud-specific volume options
volume_options = {}
volume_options[:iops] = node['rs-mysql']['device']['iops'] if node['rs-mysql']['device']['iops']
volume_options[:volume_type] = node['rs-mysql']['device']['volume_type'] if node['rs-mysql']['device']['volume_type']
volume_options[:controller_type] = node['rs-mysql']['device']['controller_type'] if node['rs-mysql']['device']['controller_type']

new_mysql_dir = "#{node['rs-mysql']['device']['mount_point']}/mysql"

Expand Down
1 change: 1 addition & 0 deletions spec/backup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
describe 'rs-mysql::backup' do
let(:chef_run) do
ChefSpec::Runner.new do |node|
node.set['chef_handler']['handler_path'] = '/var/chef/handlers'
node.set['rs-mysql']['server_root_password'] = 'rootpass'
node.set['rs-mysql']['backup']['lineage'] = 'testing'
end.converge(described_recipe)
Expand Down
2 changes: 1 addition & 1 deletion spec/tuning_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
let(:tune_attributes) do
described_class.tune_attributes(
node.override['mysql']['tunable'],
node['memory']['total'],
category[:memory],
usage
)
end
Expand Down

0 comments on commit 81ac618

Please sign in to comment.