Files
wlan-toolsmith/eksctl/wifi-289708231103/tip-wlan-main/scale_it
Carsten Schafer c96d9a5db9 Add 2nd nodegroup for large gw node
Signed-off-by: Carsten Schafer <Carsten.Schafer@kinarasystems.com>
2024-05-30 15:54:34 -04:00

48 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
. ./utils.sh
check_env
echo "Scaling cluster:"
show_env
echo "Press ENTER to continue [or CTRL-C to exit]"
read enter
declare -a steps
max_steps=10
for ((i=0; i < $max_steps; i++)) ; do
steps[$i]=""
done
if [ -n "$1" ] ; then
for ((i=0; i < $1; i++)) ; do
steps[$i]="echo"
done
fi
cstep=1
logv startscale "$(date)"
#set -x
echo "Determine caller identity"
if [ -n "$AWS_PROFILE" ] ; then
account_id=$(aws sts get-caller-identity --query Account --output text --profile $AWS_PROFILE)
else
account_id=$(aws sts get-caller-identity --query Account --output text)
fi
logv accountid $account_id
if [ -z "$account_id" ] ; then
echo "Unable to determine caller-identity!"
exit 1
fi
config_file="cluster.$CLUSTER_NAME.yaml"
echo "Generating cluster.yml file -> $config_file"
envsubst < cluster.yaml > $config_file
#eksctl create nodegroup -f cluster.$CLUSTER_NAME.yaml
eksctl scale nodegroup -f cluster.$CLUSTER_NAME.yaml
logv scaled $CLUSTER_NAME
logv endscale "$(date)"
#----------------------------------
#set +x
cstep=-1