From 3cc44736d6b243e721f7e5277902ca59f00d93ad Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Thu, 21 Jan 2016 15:55:10 -0800 Subject: [PATCH] Improve ebs_raid documentation --- README.md | 8 ++++++-- providers/ebs_raid.rb | 8 +++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 75d99dc1..c917ef5c 100644 --- a/README.md +++ b/README.md @@ -170,18 +170,22 @@ Manage Elastic Block Store (EBS) volumes with this resource. ### ebs_raid.rb Manage Elastic Block Store (EBS) raid devices with this resource. +#### Actions: +- `auto_attach` - create / mount raid array + #### Properties: - `aws_secret_access_key`, `aws_access_key` and optionally `aws_session_token` - required, unless using IAM roles for authentication. - `mount_point` - where to mount the RAID volume - `mount_point_owner` - the owner of the mount point (default root) - `mount_point_group` - the group of the mount point (default root) -- `mount_point_mode` - the file mode of the mount point (default 0755) +- `mount_point_mode` - the file mode of the mount point (default 00755) - `disk_count` - number of EBS volumes to raid - `disk_size` - size of EBS volumes to raid - `level` - RAID level (default 10) - `filesystem` - filesystem to format raid array (default ext4) +- `filesystem_options` - String of options to mount the filesystem with (default rw,noatime,nobootwait) - `snapshots` - array of EBS snapshots to restore. Snapshots must be taken using an ec2 consistent snapshot tool, and tagged with a number that indicates how many devices are in the array being backed up (e.g. "Logs Backup [0-4]" for a four-volume raid array snapshot) -volume_type - "standard", "io1", or "gp2" ("standard" is magnetic, "io1" is provisioned iops SSD, "gp2" is general purpose SSD) +- `disk_type` - "standard", "io1", or "gp2" ("standard" is magnetic, "io1" is provisioned iops SSD, "gp2" is general purpose SSD) - `disk_piops` - number of Provisioned IOPS to provision per disk, must be > 100 - `disk_encrypted` - specify if the EBS volumes should be encrypted - `disk_kms_key_id` - the full ARN of the AWS Key Management Service (AWS KMS) master key to use when creating the encrypted volumes (defaults to master key if not specified) diff --git a/providers/ebs_raid.rb b/providers/ebs_raid.rb index b2d0be01..9168d179 100644 --- a/providers/ebs_raid.rb +++ b/providers/ebs_raid.rb @@ -1,15 +1,13 @@ include Opscode::Aws::Ec2 action :auto_attach do # ~FC017 https://github.com/acrmp/foodcritic/issues/387 - package 'mdadm' do - action :install - end + package 'mdadm' - # Baseline expectations. + # Set node['aws']['raid'] = {} if it doesn't already exist node.set['aws'] ||= {} node.set['aws']['raid'] ||= {} - # Mount point information. + # Save mount point information to the node if it doesn't already exist node.set['aws']['raid'][@new_resource.mount_point] ||= {} # we're done we successfully located what we needed