Make setup for koji NFS mounting easier

When koji builder and koji master are hosted on different machines, NFS
mounting is needed to connect the services.  Make this process more
smooth to minimize manual editing of files.  Namely, change the top
directory that koji looks at.  If on the master, this is on the local
file system.  If on the builder not on the master, this is also on the
local file system, but is backed by a NFS mount in a different location.

Signed-off-by: George T Kramer <george.t.kramer@intel.com>
This commit is contained in:
George T Kramer
2019-03-04 17:36:19 -08:00
parent d33200af07
commit 85452e2af4
3 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -20,12 +20,17 @@ useradd -r kojibuilder
usermod -G mock kojibuilder
# Kojid Configuration Files
if [[ "$KOJI_SLAVE_FQDN" = "$KOJI_MASTER_FQDN" ]]; then
KOJI_TOP_DIR="$KOJI_DIR"
else
KOJI_TOP_DIR="$KOJI_MOUNT_DIR"
fi
mkdir -p /etc/kojid
cat > /etc/kojid/kojid.conf <<- EOF
[kojid]
sleeptime=5
maxjobs=16
topdir=$KOJI_DIR
topdir=$KOJI_TOP_DIR
workdir=/tmp/koji
mockdir=/var/lib/mock
mockuser=kojibuilder
-1
View File
@@ -7,7 +7,6 @@ SCRIPT_DIR="$(dirname "$(realpath "$0")")"
source "$SCRIPT_DIR"/globals.sh
source "$SCRIPT_DIR"/parameters.sh
KOJI_MOUNT_DIR=/mnt/koji
KOJI_MOUNT_SERVICE="${KOJI_MOUNT_DIR:1}"
KOJI_MOUNT_SERVICE="${KOJI_MOUNT_SERVICE/\//-}".mount
mkdir -p /etc/systemd/system
+1
View File
@@ -4,6 +4,7 @@
## KOJI RPM BUILD AND TRACKER
export KOJI_DIR=/srv/koji
export KOJI_MOUNT_DIR=/mnt/koji
export KOJI_MASTER_FQDN="$(hostname -f)"
export KOJI_URL=https://"$KOJI_MASTER_FQDN"
export KOJI_MOUNT_DIR=/mnt/koji