smeserver-koji/koji-setup/deploy-koji-nfs-server.sh

25 lines
650 B
Bash
Raw Normal View History

2023-08-28 06:44:38 +02:00
#!/bin/bash
# Copyright (C) 2019 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
set -xe
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
source "$SCRIPT_DIR"/globals.sh
source "$SCRIPT_DIR"/parameters.sh
2023-08-29 08:08:48 +02:00
dnf install nfs-utils
2023-08-28 06:44:38 +02:00
# Export server directory to be mounted by clients
echo "$KOJI_DIR $KOJI_SLAVE_FQDN(ro,no_root_squash)" >> /etc/exports
2023-08-29 08:08:48 +02:00
# allow nfs usage in selinux and firewall
setsebool -P httpd_use_nfs=1
firewall-cmd --permanent --add-service=nfs
firewall-cmd --permanent --add-service=mountd
firewall-cmd --permanent --add-service=rpc-bind
firewall-cmd --reload
2023-08-28 06:44:38 +02:00
systemctl enable --now rpcbind
systemctl enable --now nfs-server