Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CHEF
cookbooks
fai
Commits
0f720120
Commit
0f720120
authored
Oct 02, 2014
by
Dennis Klein
Browse files
make use of nfs cookbook
parent
a61061cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
metadata.rb
View file @
0f720120
...
...
@@ -3,5 +3,5 @@ maintainer_email "hpc@gsi.de"
license
"All rights reserved"
description
"Installs/Configures fai"
long_description
IO
.
read
(
File
.
join
(
File
.
dirname
(
__FILE__
),
'README.md'
))
version
"0.
3
.0"
version
"0.
4
.0"
depends
"nfs"
recipes/default.rb
View file @
0f720120
...
...
@@ -14,6 +14,11 @@ include_recipe "nfs::server"
package
"fai-server"
#package fai-quickstart ???
ohai
'dpkg'
do
plugin
'dpkg'
action
:reload
end
# fallback to admit access to everybody if not specified
node
[
:fai
][
:clients
]
=
[
"*"
]
if
node
[
:fai
][
:clients
].
empty?
...
...
@@ -26,20 +31,30 @@ if node.fai.configdir
action
:create
# TODO: fill from version control or sample scripts
end
node
[
:fai
][
:clients
].
each
do
|
client
|
node
.
default
[
:nfs
][
:exports
]
=
[
"
#{
node
[
:fai
][
:configdir
]
}
#{
client
}
(ro,async,subtree_check)"
]
nfs_export
'/srv/fai/config'
do
network
client
writeable
false
sync
false
options
[
'subtree_check'
,
'no_root_squash'
]
end
end
node
[
:fai
][
:insecure_clients
].
each
do
|
insecure_client
|
node
.
default
[
:nfs
][
:exports
]
=
[
"
#{
node
[
:fai
][
:configdir
]
}
#{
insecure_client
}
(ro,async,subtree_check,insecure)"
]
nfs_export
'/srv/fai/config'
do
network
insecure_client
writeable
false
sync
false
options
[
'subtree_check'
,
'no_root_squash'
,
'insecure'
]
end
end
end
# There have been some changes to FAI v4, which is shipped on Wheezy
nfsroot_config
=
"make-fai-nfsroot.conf"
if
node
.
lsb
.
codename
==
"wheezy"
if
(
node
.
lsb
.
codename
==
"wheezy"
)
or
(
node
.
lsb
.
codename
==
"jessie"
)
nfsroot_config
=
"nfsroot.conf"
end
...
...
@@ -128,9 +143,19 @@ if node.fai.setup_default
end
node
[
:fai
][
:clients
].
each
do
|
client
|
node
.
default
[
:nfs
][
:exports
]
=
[
"/srv/fai/nfsroot
#{
client
}
(ro,no_root_squash,async,subtree_check)"
]
nfs_export
'/srv/fai/nfsroot'
do
network
client
writeable
false
sync
false
options
[
'subtree_check'
,
'no_root_squash'
]
end
end
node
[
:fai
][
:insecure_clients
].
each
do
|
insecure_client
|
node
.
default
[
:nfs
][
:exports
]
=
[
"/srv/fai/nfsroot
#{
insecure_client
}
(ro,async,subtree_check,insecure)"
]
nfs_export
'/srv/fai/nfsroot'
do
network
insecure_client
writeable
false
sync
false
options
[
'subtree_check'
,
'no_root_squash'
,
'insecure'
]
end
end
recipes/flavors.rb
View file @
0f720120
...
...
@@ -6,7 +6,7 @@ end
nfsroot_config
=
"make-fai-nfsroot.conf"
nfsroot_cmd
=
"make-fai-nfsroot"
if
node
.
lsb
.
codename
==
"wheezy"
if
(
node
.
lsb
.
codename
==
"wheezy"
)
or
(
node
.
lsb
.
codename
==
"jessie"
)
nfsroot_config
=
"nfsroot.conf"
nfsroot_cmd
=
"fai-make-nfsroot"
end
...
...
@@ -104,7 +104,12 @@ node.fai.flavors.each do |f, pkgs|
end
node
[
:fai
][
:clients
].
each
do
|
client
|
node
.
default
[
:nfs
][
:exports
]
=
[
"
#{
nfs_dir
}
#{
client
}
(ro,no_root_squash,async,subtree_check)"
]
nfs_export
nfs_dir
do
network
client
writeable
false
sync
false
options
[
'subtree_check'
,
'no_root_squash'
]
end
end
end
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment