Coder Social home page Coder Social logo

cookbook-nfs's Introduction

NFS Build Status

Description

Installs and configures NFS client, or server components

Requirements

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

Note:This cookbook depends on Sean O'Meara's line cookbook

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['v2'] & nfs['v3']

    • Set to yes or no to turn on/off NFS protocol level v2, or v3.
    • Defaults to nil, deferring to the default behavior provided by running kernel.

Usage

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

name "base"
description "Role applied to all systems"
run_list [ "nfs" ]

Then in an nfs_server.rb 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" ],
    "port" => {
      "statd" => 32765,
      "statd_out" => 32766,
      "mountd" => 32767,
      "lockd" => 32768
    }
  }
)
run_list [ "nfs::server" ]

nfs_export LWRP Usage

Applications or other cookbooks can use the nfs_export LWRP to add exports:

nfs_export "/exports" do
  network '10.0.0.0/8'
  writeable false 
  sync true
  options ['no_root_squash']
end

The default parameters for the nfs_export LWRP are as follows

  • directory

    • directory you wish to export
    • defaults to resource name
  • network

    • a CIDR, IP address, or wildcard (*)
    • requires an option
  • writeable

    • ro/rw export option
    • defaults to false
  • sync

    • synchronous/asynchronous export option
    • defaults to true
  • anonuser

    • user mapping for anonymous users
    • the user's UID will be retrieved from /etc/passwd for the anonuid=x option
    • defaults to nil (no mapping)
  • anongroup

    • group mapping for anonymous users
    • the group's GID will be retrieved from /etc/group for the anongid=x option
    • defaults to nil (no mapping)
  • options

    • additional export options as an array, excluding the parameterized sync/async, ro/rw options, and anoymous mappings
    • defaults to root_squash

nfs::undo recipe

Does your freshly kickstarted/preseeded system come with NFS, when you didn't ask for NFS? This recipe inspired by the annoyances cookbook, will run once to remove NFS from the system. Use a knife command to remove NFS components from your system like so.

knife run_list add <node name> nfs::undo

License and Author

Author: Eric G. Wolfe ([email protected]) Contributors: Riot Games, Sean OMeara

Copyright 2011-2012, Eric G. Wolfe Copyright 2012, Riot Games Copyright 2012, Sean OMeara

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.

cookbook-nfs's People

Contributors

bryanwb avatar cayblood avatar gregkare avatar ivey avatar jblaine avatar josephholsten avatar kuckkuck avatar mvollrath avatar nmische avatar soulou avatar walbenzi avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.