Adds nfs-server element
This patch adds an element that installs and configures nfs services for testing the cinder nfs backend in an environment where no nfs services are present (e.g. CI) When added to an image, this element creates a directory at /mnt/state/var/lib/nfs and shares it to each node of the overcloud. This patch that handles the package mapping in diskimage-builder needs to be applied first: https://review.openstack.org/#/c/76398/. Change-Id: I4c425af64b866caa80b32b808e8a3b97d71ca81d
This commit is contained in:
parent
ad868bfe27
commit
34a713afe3
|
@ -0,0 +1,9 @@
|
|||
##nfs-server
|
||||
|
||||
This element installs and configures nfs services for testing the
|
||||
cinder nfs backend in an environment where no nfs services are
|
||||
present (i.e. CI)
|
||||
|
||||
When added to an image, this element creates a directory at
|
||||
/mnt/state/var/lib/nfs and shares it to each node on the
|
||||
overcloud.
|
|
@ -0,0 +1,4 @@
|
|||
iptables
|
||||
os-apply-config
|
||||
os-refresh-config
|
||||
os-svc-install
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
set -eu
|
||||
|
||||
install-packages nfs-kernel-server
|
|
@ -0,0 +1,3 @@
|
|||
{{#nfs_server.shares}}
|
||||
/mnt/state/var/lib/nfs {{.}}(rw,async,no_root_squash)
|
||||
{{/nfs_server.shares}}
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
set -eu
|
||||
|
||||
[ -d /mnt/state/var/lib/nfs ] || install -d -m 0770 -o root -g root /mnt/state/var/lib/nfs
|
||||
os-svc-enable -n nfs-server
|
||||
os-svc-restart -n nfs-server
|
||||
exportfs -a -r -v
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
set -eu
|
||||
|
||||
add-rule INPUT -m state --state NEW -m tcp -p tcp --dport 111 -j ACCEPT
|
||||
add-rule INPUT -m state --state NEW -m udp -p udp --dport 111 -j ACCEPT
|
||||
add-rule INPUT -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT
|
||||
add-rule INPUT -m state --state NEW -m udp -p udp --dport 2049 -j ACCEPT
|
||||
add-rule INPUT -m state --state NEW -m tcp -p tcp --dport 20048 -j ACCEPT
|
||||
add-rule INPUT -m state --state NEW -m udp -p udp --dport 20048 -j ACCEPT
|
Loading…
Reference in New Issue