Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

RSS

filesystem_resize (3) Versions 0.3.0

Resize the file system automatically when the underlying partition or disk increases its size.

Berkshelf/Librarian
Policyfile
Knife
cookbook 'filesystem_resize', '~> 0.3.0'
cookbook 'filesystem_resize', '~> 0.3.0', :supermarket
knife cookbook site install filesystem_resize
knife cookbook site download filesystem_resize
README
Dependencies
Changelog
Quality 78%

Filesystem Resize Cookbook

Cookbook Version Dependency Status Code Climate Build Status

This Chef cookbook resizes the file system automatically when the underlying partition or disk increases its size.

It is mainly oriented to work with cloud or virtual servers where it is common to change the disk size.

Requirements

Platform Requirements

This cookbook has been tested on the following platforms:

  • Amazon (>= 2012.03)
  • CentOS (>= 6.0)
  • Debian (>= 7.0)
  • Fedora
  • RedHat
  • Ubuntu (>= 12.04)

Please, let us know if you use it successfully on any other platform.

Application Requirements

  • Ruby 1.9.3 or higher.

The other required applications usually come with the operating system:

  • lsblk, findmnt and losetup: included inside util-linux (≥ 2.19) package.
  • pgrep: included inside procps-ng package.
  • e2fsck, dumpe2fs and resize2fs for ext3 and ext4: included inside e2fsprogs package.
  • xfs_info and xfs_growfs for XFS: included inside xfsprogs package.

Attributes

Parameter Default Description
node['filesystem_resize']['compiletime'] false Resize the file systems at compile time.

Recipes

filesystem_resize::default

Resizes all mounted file systems.

Resources

filesystem_resize(device)

Resizes a partition.

filesystem_resize Actions

  • run (default)

filesystem_resize Parameters

Parameter Default Description
device resource name Device full path.

filesystem_resize_all(name)

Resizes all mounted file systems.

filesystem_resize Actions

  • run (default)

Usage

Including in a Cookbook Recipe

You can simply include it in a recipe:

# in your recipe
include_recipe 'filesystem_resize'

Don't forget to include the filesystem_resize cookbook as a dependency in the metadata:

# metadata.rb
depends 'filesystem_resize'

Including in the Run List

Another alternative is to include it in your Run List:

{
  "name": "app001.example.com",
  [...]
  "run_list": [
    [...]
    "recipe[filesystem_resize]"
  ]
}

Testing

See TESTING.md.

ChefSpec Matchers

filesystem_resize(device)

Helper method for locating a filesystem_resize resource in the collection.

resource = chef_run.filesystem_resize('/dev/sda1')
expect(resource).to notify('service[apache2]').to(:restart)

run_filesystem_resize(device)

Assert that the Chef Run runs filesystem_resize.

expect(chef_run).to run_filesystem_resize('/dev/sda1')

filesystem_resize_all(name)

Helper method for locating a filesystem_resize_all resource in the collection.

resource = chef_run.filesystem_resize_all('default')
expect(resource).to notify('service[apache2]').to(:restart)

run_filesystem_resize_all(name)

Assert that the Chef Run runs filesystem_resize.

expect(chef_run).to run_filesystem_resize_all('default')

Contributing

Please do not hesitate to open an issue with any questions or problems.

See CONTRIBUTING.md.

TODO

See TODO.md.

License and Author

Author: Xabier de Zuazo (xabier@zuazo.org)
Copyright: Copyright (c) 2015, Xabier de Zuazo
Copyright: Copyright (c) 2014-2015, Onddo Labs, SL.
License: Apache License, Version 2.0
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.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

CHANGELOG for filesystem_resize

This file is used to list changes made in each version of the filesystem_resize cookbook.

v0.3.0 (2015-09-04)

  • Update chef links to use chef.io domain.
  • Update contact information and links after migration.
  • Update RuboCop to version 0.33.0.
  • metadata: Add source_url and issues_url links.

  • Documentation:

    • README: Improve description.
  • Testing:

    • Update Gemfile dependencies and Kitchen platforms.
    • Move ChefSpec tests to test/unit.
    • Use ChefSpec::SoloRunner to make unit tests faster.
    • Integrate tests with should_not gem.

v0.2.0 (2015-01-23)

  • Fix always resize bug.
  • Add filesystem_resize and filesystem_resize_all resources, big refactor.
  • Update Gemfile deps, update RuboCop.

v0.1.0 (2014-08-11)

  • Initial release of filesystem_resize.

Collaborator Number Metric
            

0.3.0 failed this metric

Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.3.0 passed this metric

Foodcritic Metric
            

0.3.0 failed this metric

FC066: Ensure chef_version is set in metadata: filesystem_resize/metadata.rb:1
FC069: Ensure standardized license defined in metadata: filesystem_resize/metadata.rb:1
FC072: Metadata should not contain "attribute" keyword: filesystem_resize/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: filesystem_resize/resources/all.rb:1
FC074: LWRP should use DSL to define resource's default action: filesystem_resize/resources/default.rb:1
Run with Foodcritic Version 12.2.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

0.3.0 passed this metric

No Binaries Metric
            

0.3.0 passed this metric

Publish Metric
            

0.3.0 passed this metric

Supported Platforms Metric
            

0.3.0 passed this metric

Testing File Metric
            

0.3.0 passed this metric

Version Tag Metric
            

0.3.0 passed this metric