fix builder on hub

This commit is contained in:
Trevor Batley 2023-09-03 08:01:23 +10:00
parent 1f5633accd
commit 35e35717c4

View File

@ -162,6 +162,16 @@ while true ; do
echo "$KOJI_BUILD_FQDN will be Koji Build server No. $BSNO" echo "$KOJI_BUILD_FQDN will be Koji Build server No. $BSNO"
((BSNO=BSNO+1)) ((BSNO=BSNO+1))
## On the HUB
# 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"
if [ $KOJI_BUILD_FQDN eq $KOJI_HUB_FQDN ] ; then
deploy-koji-builder.sh
else
## On the HUB ## On the HUB
# check if nfs has been installed on the hub (only need to install once) # check if nfs has been installed on the hub (only need to install once)
if [ ! -s /etc/exports ] ; then if [ ! -s /etc/exports ] ; then
@ -173,12 +183,6 @@ while true ; do
# add build server to nfs exports line # add build server to nfs exports line
echo " $KOJI_BUILD_FQDN(ro,no_root_squash)" >> /etc/exports echo " $KOJI_BUILD_FQDN(ro,no_root_squash)" >> /etc/exports
fi fi
# 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 a certificate for the builder # Generate a certificate for the builder
pushd "$KOJI_PKI_DIR" pushd "$KOJI_PKI_DIR"
./gencert.sh "$KOJI_BUILD_FQDN" "/C=$COUNTRY_CODE/ST=$STATE/L=$LOCATION/O=$ORGANIZATION/CN=$KOJI_BUILD_FQDN" ./gencert.sh "$KOJI_BUILD_FQDN" "/C=$COUNTRY_CODE/ST=$STATE/L=$LOCATION/O=$ORGANIZATION/CN=$KOJI_BUILD_FQDN"
@ -210,7 +214,8 @@ while true ; do
ssh $QUIET root@$KOJI_BUILD_FQDN $SCRIPT_DIR/deploy-koji-nfs-client.sh ssh $QUIET root@$KOJI_BUILD_FQDN $SCRIPT_DIR/deploy-koji-nfs-client.sh
# deploy koji builder # deploy koji builder
ssh $QUIET root@$KOJI_BUILD_FQDN $SCRIPT_DIR/deploy-koji-builder.sh ssh $QUIET root@$KOJI_BUILD_FQDN $SCRIPT_DIR/deploy-koji-builder.sh
done done
fi
# #
bootstrap-build.sh bootstrap-build.sh