Skip to content

darkskyapp/storage-cookbook

 
 

Repository files navigation

storage-cookbook

Cookbook Version Build Status Coverage Status

A cookbook for mounting all available EC2 ephemeral volumes and saving their respective mount points into node attributes.

Supported Platforms

EC2 only (but it will fail cleanly on other platforms).

Attributes

Key Type Description Default
['storage']['ephemeral_mounts'] Array An array of strings, set automatically by the recipe, to be used by other cookbooks, which lists the mount points of ephemeral storage devices. automatic

Usage

Recipes

storage::default

Include storage in a wrapper cookbook:

include_recipe 'storage::default'

...or include storage in your node's run_list:

{
  "run_list": [
    "recipe[storage::default]"
  ]
}

Resources

format_mount

Formats a device, creates a mount point for it, and the mounts it.

Attributes
  • mount_point (name attribute) The directory where the filesystem should be mounted
  • device_name The path to the device (typically starts with /dev)
  • fs_type Filesystem type to use for formatting (default: ext4)
  • reserved_space Percentage of space to reserve for the superuser (default: 0)

e.g.

  storage_format_mount '/mnt/dev0' do
    device_name    '/dev/xvdb1'
    fs_type        'ext4'
    reserved_space 5
  end

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (i.e. add-new-recipe)
  3. Write you change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request

License and Authors

Author:: Eric Herot [email protected]
Jeff Byrnes [email protected]

About

Handles mounting volumes and such

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%