Skip to content

Commit

Permalink
Additional device support (#68) (#71)
Browse files Browse the repository at this point in the history
* Additional device support (#68)

* new additonal_devices attribute

* back down lvm version

* Running Cookstyle

* trying to update chefdk

* updating foodcritic rules
  • Loading branch information
rshade authored Jul 13, 2018
1 parent f6cc184 commit b90a2ad
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .foodcritic
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
~FC072

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: ruby
rvm:
- 2.3.1
before_install:
- curl -L https://www.getchef.com/chef/install.sh | sudo bash -s -- -P chefdk -v 1.0.3
- curl -L https://www.getchef.com/chef/install.sh | sudo bash -s -- -P chefdk -v 2.4.17
- gem install bundler -v 1.11.2
install:
- chef exec bundle install --jobs=3 --retry=3
Expand Down
6 changes: 3 additions & 3 deletions Berksfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ DEPENDENCIES
path: test/cookbooks/fake

GRAPH
ephemeral_lvm (3.0.0)
lvm (>= 4.0.0)
ephemeral_lvm (3.0.2)
lvm (>= 4.0.6)
now (>= 0.0.0)
fake (0.1.1)
lvm (4.0.5)
lvm (4.1.13)
now (1.0.0)
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Place the `ephemeral_lvm::default` in the runlist and the ephemeral devices will
* `node['ephemeral_lvm']['logical_volume_size']` - the size to be used for the ephemeral LVM. Default: `'100%VG'` - This will use all available space in the volume group.
* `node['ephemeral_lvm']['logical_volume_name']` - the name of the logical volume for ephemeral LVM. Default: `'ephemeral0'`
* `node['ephemeral_lvm']['stripe_size']` - the stripe size to be used for the ephemeral logical volume. Default: `512`
* `node['ephemeral_lvm']['additonal_devices']` - array of additional devices to add to stripe. Use if we are not finding them in metadata. default: []

# Recipes

Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ desc 'runs foodcritic linttask'
task :fc_new do
FoodCritic::Rake::LintTask.new(:chef) do |t|
t.options = {
fail_tags: ['any']
fail_tags: ['any'],
}
end
end
Expand Down
6 changes: 3 additions & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ Vagrant.configure('2') do |config|
mysql: {
server_root_password: 'rootpass',
server_debian_password: 'debpass',
server_repl_password: 'replpass'
}
server_repl_password: 'replpass',
},
}

chef.run_list = [
'recipe[ephemeral_lvm::default]'
'recipe[ephemeral_lvm::default]',
]
end
end
5 changes: 4 additions & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# The ephemeral mount point options
default['ephemeral_lvm']['mount_point_properties'] = {
options: %w(defaults noauto),
pass: 0
pass: 0,
}

# The ephemeral volume group name
Expand All @@ -46,3 +46,6 @@

# Whether to wipe signatures on any existing drives
default['ephemeral_lvm']['wipe_signatures'] = false

# Array of devices to force into the ephemeral device list
default['ephemeral_lvm']['additonal_devices'] = []
1 change: 1 addition & 0 deletions libraries/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def self.gce_ephemeral_devices?(cloud, node)
#
def self.get_ephemeral_devices(cloud, node)
ephemeral_devices = []
ephemeral_devices.concat node['ephemeral_lvm']['additonal_devices']
# Detects the ephemeral disks available on the instance.
#
# If the cloud plugin supports block device mapping on the node, obtain the
Expand Down
6 changes: 3 additions & 3 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
name 'ephemeral_lvm'
maintainer 'RightScale, Inc.'
maintainer_email '[email protected]'
license 'Apache 2.0'
license 'Apache-2.0'
description 'Configures available ephemeral devices on a cloud server'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '3.0.1'
version '3.0.2'
issues_url 'https://github.com/rightscale-cookbooks/ephemeral_lvm/issues' if respond_to?(:issues_url)
source_url 'https://github.com/rightscale-cookbooks/ephemeral_lvm' if respond_to?(:source_url)
chef_version '>= 12.0' if respond_to?(:chef_version)
Expand All @@ -15,7 +15,7 @@
supports 'debian'

depends 'now'
depends 'lvm', '>= 4.0'
depends 'lvm', '>= 4.0.6'

recipe 'ephemeral_lvm::default', 'Sets up ephemeral devices on a cloud server'

Expand Down

0 comments on commit b90a2ad

Please sign in to comment.