Skip to content

Commit

Permalink
Actually send email to swapper at start/end of kubernetes setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
carboxylman committed Jan 13, 2021
1 parent ae08dec commit 160b04d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup-driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -x

ALLNODESCRIPTS="setup-ssh.sh setup-disk-space.sh"
HEADNODESCRIPTS="setup-nginx.sh setup-ssl.sh setup-kubespray.sh setup-kubernetes-extra.sh"
HEADNODESCRIPTS="setup-nginx.sh setup-ssl.sh setup-kubespray.sh setup-kubernetes-extra.sh setup-end.sh"

export SRC=`dirname $0`
cd $SRC
Expand Down
9 changes: 9 additions & 0 deletions setup-end.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

set -x

# Grab our libs
. "`dirname $0`/setup-lib.sh"

echo "Your ${EXPTTYPE} instance setup completed on $NFQDN ." \
| mail -s "${EXPTTYPE} Instance Setup Complete" ${SWAPPER_EMAIL} &
7 changes: 7 additions & 0 deletions setup-kubespray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ fi

logtstart "kubespray"

maybe_install_packages dma
maybe_install_packages mailutils
echo "$PFQDN" > /etc/mailname
sleep 2
echo "Your ${EXPTTYPE} instance is setting up on $NFQDN ." \
| mail -s "${EXPTTYPE} Instance Setting Up" ${SWAPPER_EMAIL} &

# First, we need yq.
are_packages_installed yq
if [ ! $? -eq 1 ]; then
Expand Down
1 change: 1 addition & 0 deletions setup-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ if [ "x${ADMIN_PASS_HASH}" = "x" ] ; then
echo "ADMIN_PASS_HASH='${ADMIN_PASS_HASH}'" >> $OURDIR/parameters
fi

EXPTTYPE="Kubernetes"
CREATOR=`cat $BOOTDIR/creator`
SWAPPER=`cat $BOOTDIR/swapper`
NODEID=`cat $BOOTDIR/nickname | cut -d . -f 1`
Expand Down

0 comments on commit 160b04d

Please sign in to comment.