Git Product home page Git Product logo

nfs-boshrelease's Introduction

NFS on BOSH

This BOSH release provides both halves of a working NFS volume share. With it, you can build a BOSH-deployed NAS device, exporting disk space attached to the NFS server VM to clients. You can also add remote filesystem mount support to existing deployments, using the nfs-client job.

This BOSH release supports both Trusty and Xenial stemcells, and can be trivially modified to support other Linux-based operating systems as needed.

Configuring a Server

To deploy a VM that will act as an NFS file server, you need to colocate the nfs-server job, and provide a list of exports.

Here's an excerpt from a working manifest:

instance_groups:
  - name: nas
    instances: 1
    persistent_disk: 81_920

    jobs:
      - name: nfs-server
        release: nfs
        properties:
          exports:

            # export /var/vcap/store/pub to all clients.
            #
            - path: pub


            # export /etc, read-only, to hosts in the
            # 10.5.0.0/24 and 10.6.0.0./24 subnets.
            #
            - path: /etc
              options: [ro]
              clients:
                - 10.5.0.0/24
                - 10.6.0.0/24

Configuring a Client

To support remote mounts of NFS volumes, colocate the nfs-client job alongside your other jobs and releases.

instance_groups:
  - name: something-else
    jobs:
      - name: nfs-client
        release: nfs
        properties:
          mounts:

            # mount the web application code files over NFS,
            # from an intranet NAS / filer.  This mount gets
            # done during pre-start, so that it is available
            # to other jobs on the VM (like a web server).
            #
            - server: nas.example.com
              remote: /web/app
              local:  /var/vcap/data/app
              when:   immediate


            # mount the web data files over NFS, in the BOSH
            # post-deploy hook (the default).  This mount will
            # not be available until after the jobs have
            # deployed successfully.
            #
            - server: nas.example.com
              remote: /web/files
              local:  /var/vcap/data/webfiles

Running an NFS-v4 Server

If you want to run only NFSv4 you can set the nfsd_arguments and mountd_arguments manifest properties, like so:

instance_groups:
  - name: nas
    jobs:
      - name: nfs-server
        release: nfs
        properties:
          nfsd_arguments:   -N 2 -N 3 -V 4
          mountd_arguments: -N 2 -N 3 -V 4

The -N argument instructs the rpc.mountd and rpc.nfsd processes to skip the named version (here v2 and v3). The -V argument turns on version 4.

How Do I Contribute?

  1. Fork this repo
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request in Github
  6. Profit!

nfs-boshrelease's People

Contributors

jhunt avatar

Watchers

 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.