refactor install to handle multiple builders

This commit is contained in:
Trevor Batley
2023-09-02 14:37:19 +10:00
parent 4a940912ae
commit b1b9d15934
5 changed files with 86 additions and 40 deletions

View File

@@ -7,6 +7,7 @@ SCRIPT_DIR="$(dirname "$(realpath "$0")")"
source "$SCRIPT_DIR"/globals.sh
source "$SCRIPT_DIR"/parameters.sh
KOJI_BUILD_FQDN="$(hostname -f)"
# Install the koji builder componelts from epel
dnf install -y epel-release
dnf install -y koji-builder

View File

@@ -7,6 +7,8 @@ SCRIPT_DIR="$(dirname "$(realpath "$0")")"
source "$SCRIPT_DIR"/globals.sh
source "$SCRIPT_DIR"/parameters.sh
KOJI_BUILD_FQDN=$1
dnf install -y nfs-utils
# Export server directory to be mounted by clients

20
koji-setup/deploy-koji.sh Executable file → Normal file
View File

@@ -319,26 +319,6 @@ systemctl enable --now httpd
sudo -u kojiadmin koji moshimoshi
## KOJI DAEMON - BUILDER
# Add the host entry for the koji builder to the database
sudo -u kojiadmin koji add-host "$KOJI_BUILD_FQDN" "$RPM_ARCH"
# Add the host to the createrepo channel
sudo -u kojiadmin koji add-host-to-channel "$KOJI_BUILD_FQDN" createrepo
# A note on capacity
sudo -u kojiadmin koji edit-host --capacity="$KOJID_CAPACITY" "$KOJI_BUILD_FQDN"
# Generate certificates
pushd "$KOJI_PKI_DIR"
./gencert.sh "$KOJI_BUILD_FQDN" "/C=$COUNTRY_CODE/ST=$STATE/L=$LOCATION/O=$ORGANIZATION/CN=$KOJI_BUILD_FQDN"
popd
if [[ "$KOJI_BUILD_FQDN" = "$KOJI_HUB_FQDN" ]]; then
"$SCRIPT_DIR"/deploy-koji-builder.sh
fi
## KOJIRA - DNF|YUM REPOSITORY CREATION AND MAINTENANCE
# Add the user entry for the kojira user
sudo -u kojiadmin koji add-user kojira

View File

@@ -5,10 +5,6 @@
## KOJI RPM BUILD AND TRACKER
export KOJI_DIR=/mnt/koji
export KOJI_HUB_FQDN="$(hostname -f)"
# Use master FQDN if a combined build and master server
#export KOJI_BUILD_FQDN="$KOJI_MASTER_FQDN"
# Build server FQDN if different from master
export KOJI_BUILD_FQDN="kojibuild1.koozali.org"
export KOJI_URL=http://"$KOJI_HUB_FQDN"
export KOJID_CAPACITY=16
export TAG_NAME=sme