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

Select Status

RSS

sanoid (4) Versions 1.0.3

Installs/Configures sanoid

Policyfile
Berkshelf
Knife
cookbook 'sanoid', '~> 1.0.3', :supermarket
cookbook 'sanoid', '~> 1.0.3'
knife supermarket install sanoid
knife supermarket download sanoid
README
Dependencies
Changelog
Quality 17%

sanoid-cookbook

Description

A chef cookbook which provides an LWRP interface for the sanoid tool (for making snapshots with ZFS). Additionally the sanoid::default recipe installs the latest sanoid and syncoid to the system. Thanks to chef-accumulator and opscode-backup (for some cookbook design patterns) cookbooks as well as github user jimsalterjrs for the snapshot tool!

Supports

  • FreeBSD
  • Debian-alike, Red Hat-alike (zfs_on_linux or some other way to get zfs command is required)

Attributes

<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><tt>['sanoid']['bin_path']</tt></td>
<td>String</td>
<td>Location where the sanoid binary will be stored</td>
<td><tt>/usr/local/bin</tt></td>
</tr>
<tr>
<td><tt>['sanoid']['conf_path']</tt></td>
<td>String</td>
<td>Location where the sanoid conf file will be stored</td>
<td><tt>/etc/sanoid/</tt></td>
</tr>
<tr>
<td><tt>['sanoid']['user']</tt></td>
<td>String</td>
<td>Value of user to run sanoid as.</td>
<td><tt>root</tt></td>
</tr>
<tr>
<td><tt>['sanoid']['group']</tt></td>
<td>String</td>
<td>Value of group to own sanoid files.</td>
<td><tt>Debian,RedHat: root, FreeBSD: wheel</tt></td>
</tr>
</table>

Resources Overview

sanoid_dataset

The sanoid_dataset resource manages a snapshot model. It requires only a name and template to use (as use_template), but you may override any template settings for only this model as needed

Example

sanoid_dataset 'zpool/test' do
  use_template "default"
end

Please note that the zfs dataset must already exist, or sanoid will fail to make a snapshot for it!

sanoid_template

The sanoid_template resource manages a sanoid template. You can use any existing setting for snapshot timings/count here (TODO: monitoring support). Note that you should not use a template named default as it is already provided from the sanoid.conf file with some sane defaults.

Example

sanoid_template 'backup' do
  hourly 30
  daily 1
  monthly 1
  yearly 1
  autosnap "yes"
  autoprune "yes"
end

sanoid_syncoid

The sanoid_syncoid resource manages a syncoid cron job. It currently only supports a local source, remote target, because in a chef environment, you can easily just apply the opposite resource to the remote server if you'd like the reverse to occur. The user defaults to node['sanoid']['user'] which may be quite different for you, so feel free to override it. The cron attribute follows the min hour day month weekday format, and the default results in one sync daily at midnight (eg. 0 0 * * *). Also supports deletion of a job with action :delete.

Example

sanoid_syncoid 'backup' do
  user
  server "backup.server.com"
  dataset "zroot/tmp"
  target "backup/zroot/tmp"
  cron "0 0 * * *"
end

License and Authors

Author:: Steve Nolen (technolengy@gmail.com)

Copright:: 2015 Steve Nolen

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see .

Dependent cookbooks

accumulator >= 0.0.0
perl >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

1.0.0

Initial release of sanoid!

Collaborator Number Metric
            

1.0.3 failed this metric

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

Contributing File Metric
            

1.0.3 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

1.0.3 failed this metric

FC064: Ensure issues_url is set in metadata: sanoid/metadata.rb:1
FC065: Ensure source_url is set in metadata: sanoid/metadata.rb:1
FC066: Ensure chef_version is set in metadata: sanoid/metadata.rb:1
FC069: Ensure standardized license defined in metadata: sanoid/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: sanoid/resources/dataset.rb:1
FC074: LWRP should use DSL to define resource's default action: sanoid/resources/syncoid.rb:1
FC074: LWRP should use DSL to define resource's default action: sanoid/resources/template.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: sanoid/providers/syncoid.rb:32
FC085: Resource using new_resource.updated_by_last_action to converge resource: sanoid/providers/syncoid.rb:47
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

1.0.3 passed this metric

Testing File Metric
            

1.0.3 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

1.0.3 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number