GithubHelp home page GithubHelp logo

esalberg / jbeard-nfs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jbeard6/jbeard-nfs

0.0 2.0 0.0 41 KB

Puppet module for controlling NFS clients and servers.

License: Apache License 2.0

Puppet 92.49% Ruby 4.22% HTML 1.71% Pascal 1.58%

jbeard-nfs's Introduction

#nfs

####Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with nfs
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

##Overview This is a module designed for controlling the Network File System server and client daemons.

##Module Description This module installs and configures the Network File System servers and clients.

##Setup

###What nfs affects The nfs module will install the appropriate packages for RedHat and Debian distributions. It also controls execution of the appropriate daemon services.

###Setup requirements This module requires the puppetlabs/stdlib module and the jbeard/portmap modules.

###Beginning with nfs The nfs module is broken into two main components: nfs::client for those hosts that only wish to consume NFS exports from another server, and nfs::server for those hosts that wish also to export filesystems via NFS. Importing the nfs class directly will have no affect. At this time, inclusion of the nfs::server class automatically includes the nfs::client class as well.

Furthermore, for hosts that import the nfs::server class, the nfs::export type becomes available. This type exposes the /etc/exports file with a puppet-like interface.

##Usage

###NFS Client To enable a host to act as an NFS client, simply include the nfs::client class in the manifest.

include nfs::client

The resource may optionally be specified as

class { 'nfs::client':
    ensure => installed,
}

###NFS Server To enable a host to act as an NFS server, include the nfs::server class in the manifest and, optionally, some nfs::export resources.

class { 'nfs::server':
    package => latest,
    service => running,
    enable  => true,
}

nfs::export { '/srv/shared':
    options => [ 'rw', 'async' ],
    clients => [ "${::network_eth0}/${netmask_eth0}" ],
}

You also have the options of manageing only the /etc/exports config file by enabling configonly => true

class { 'nfs::server':
  configonly => true
}

NFS Exports

If you want to use hiera to define all your exports in one place. If you place these elements in one of your yaml files parsed

---
nfs::exports::definitions:
  :export_hiera_1:
    :path:        '/tmp/export_hiera_1'
    :options:     ['rw', 'async' ]
    :clients:     [ 192.168.1.77 ]
  :export_hiera_chroot: 
    :path:        /tmp/export_hiera_chroot
    :options:     ['ro', 'async', 'no_subtree_check', 'no_root_squash' ]
    :clients:     [ 192.168.1.0/24 ]

if will produce the following /etc/exports

# This file is configured through the nfs::server puppet module.
/tmp/export_hiera_1 192.168.1.77(rw,async)

/tmp/export_hiera_chroot 192.168.1.0/24(ro,async,no_subtree_check,no_root_squash)

Or as shown in the file tests/exports.pp you may enter a hash directly into your puppet file

##Reference TODO List all the classes and organization

##Limitations The nfs module is currently only supported on RedHat Enterprise Linux 5/6, CentOS 5/6, Ubuntu 12.04 LTS, and Debian (Client only).

Furthermore, use of the nfs::server class dictates that all exports be defined with the nfs::export resource type.

##Development TODO Document development practices

jbeard-nfs's People

Contributors

agperson avatar conzar avatar cwood avatar jbeard6 avatar ngiger avatar tompurl avatar treyormsbee avatar treyormsbee-interop avatar

Watchers

 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.