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

The co-nfs cookbook has been deprecated

Author provided reason for deprecation:

The co-nfs cookbook has been deprecated and is no longer being maintained by its authors. Use of the co-nfs cookbook is no longer recommended.

You may find that the nfs cookbook is a suitable alternative.

RSS

co-nfs (2) Versions 0.2.1

Installs/Configures nfs

Policyfile
Berkshelf
Knife
cookbook 'co-nfs', '~> 0.2.1', :supermarket
cookbook 'co-nfs', '~> 0.2.1'
knife supermarket install co-nfs
knife supermarket download co-nfs
README
Dependencies
Changelog
Quality 17%

co-nfs Cookbook

Installs and configures NFS client, or server components.
Based on original Chef community cookbooks .

Requirements

Should work on any Red Hat-family or Debian-family Linux distribution.

Basic Usage

Define shares on the node as follow for NFSserver:

{
  "nfs":{
    "exports":[
      "/data/nfs/primary *(rw,async,no_root_squash)",
      "/data/nfs/secondary 172.16.21.0/24(rw,async,no_root_squash)",
      "/data/iso *(rw,async,no_root_squash)"
      ]
    }
}

Attributes

  • nfs['packages']

    • Makes a best effort to choose NFS client packages dependent on platform
    • NFS server package needs to be hardcoded for Debian/Ubuntu in the server recipe, or overridden in a role.
  • nfs['service']

    • portmap - the portmap or rpcbind service depending on platform
    • lock - the statd or nfslock service depending on platform
    • server - the server component, nfs or nfs-kernel-server depending on platform
  • nfs['config']

    • client_templates - templates to iterate through on client systems, chosen by platform
    • server_template - server specific template, chosen by platform
  • nfs['port']

    • ['statd'] = Listen port for statd, default 32765
    • ['statd_out'] = Outgoing port for statd, default 32766
    • ['mountd'] = Listen port for mountd, default 32767
    • ['lockd'] = Listen port for lockd, default 32768
  • nfs['exports']

    • This may be replaced in the future by an LWRP to load export definitions from a data bag. For now, its a simple array of strings to populate in an export file. Note: The "nfs::exports" recipe is separate from the "nfs::server" recipe.
  • nfs['config']['nfs_network']

    • If the value is a broadcast IP (like 10.60.250.255), it checks that an NIC is configured inside that network before mounting any NFS mount point
    • If value is false, it does not check an y IP, it will mount your NFS share
    • default is false

Usage

CLIENT :

To install the NFS components for a client system, simply add co-nfs::client to the run_list.

<tt>run_list => [ "co_nfs::client" ]</tt>

To define a share, you need to apply the following attributes :

    "nfs": {
        "shares": {
            "/local/mount/point": {
                "server":       "nfs_server_ip_or_hostname",
                "remote_folder":    "export_name",
                "nfs_options':      "nfs_mount_options"
            }
        }
    }

default nfs_options if not specified :
<tt>rw,noatime,hard,timeo=10,retrans=2"</tt>

You can define an attribute :
<tt>node["nfs"]["config"]["nfs_network"]</tt>

If it contains a network address, before creating the mount point, it will first check if an ip address inside that IP scope is available or not.
If not available, it will skip the mount point configuration.

SERVER :

Then in an <tt>nfs_server.rb</tt> role that is applied to NFS servers:

    name "nfs_server"
    description "Role applied to the system that should be an NFS server."
    override_attributes(
      "nfs" => {
        "packages" => [ "portmap", "nfs-common", "nfs-kernel-server" ],
        "ports" => {
          "statd" => 32765,
          "statd_out" => 32766,
          "mountd" => 32767,
          "lockd" => 32768
        },
        "exports" => [
          "/exports 10.0.0.0/8(ro,sync,no_root_squash)"
        ]
      }
    )
    run_list => [ "nfs::server", "nfs::exports" ]

LICENSE AND AUTHOR

Copyright:: Copyright (c) 2013 CloudOps.com

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

co-cloudstack Applicable Versions

v0.2.1

  • Pierre-Luc - add name into metadata.md for Chef v12 support.

v0.2.0

  • Pierre-Luc - license and Readme update

v0.1.4

  • Pierre-Luc - fix installation of package for Chefv11 co-nfs::default

v0.1.3

  • Matthieu - CLient recipes chef 11 compatibility

v0.1.2

  • Matthieu - HA NFS Server recipe co-nfs::server_ha

v0.1.1

  • Matthieu - shares recipes to manage nfs mount point on a client

v0.1.0

  • Initial version

Collaborator Number Metric
            

0.2.1 failed this metric

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

Contributing File Metric
            

0.2.1 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
            

0.2.1 failed this metric

FC007: Ensure recipe dependencies are reflected in cookbook metadata: co-nfs/recipes/server_ha.rb:21
FC007: Ensure recipe dependencies are reflected in cookbook metadata: co-nfs/recipes/server_ha.rb:22
FC007: Ensure recipe dependencies are reflected in cookbook metadata: co-nfs/recipes/server_ha.rb:23
FC043: Prefer new notification syntax: co-nfs/recipes/server.rb:34
FC064: Ensure issues_url is set in metadata: co-nfs/metadata.rb:1
FC065: Ensure source_url is set in metadata: co-nfs/metadata.rb:1
FC066: Ensure chef_version is set in metadata: co-nfs/metadata.rb:1
FC069: Ensure standardized license defined in metadata: co-nfs/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.2.1 passed this metric

Testing File Metric
            

0.2.1 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
            

0.2.1 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