Instantly share code, notes, and snippets.

Embed
What would you like to do?
nfs head node recipe for blogpost
# Recipe for a cluster head node with an NFS share
# Install NFS packages
package("nfs-common")
package("nfs-kernel-server")
# Make sure the diretory to be exported exists
node.nfs['shared_dirs'].each do |d|
directory d do
mode "0777"
action :create
end
end
# Create the exports file and refresh the NFS exports
template "/etc/exports" do
source "exports.erb"
owner "root"
group "root"
mode "0644"
end
# Start the NFS server
service "nfs-kernel-server" do
action [:enable,:start,:restart]
end
execute "exportfs" do
command "exportfs -a"
action :run
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment