REGION=us
HOSTMACHINE=mc02
VIRTUALMACHINE=mp
OSVERSION=ub23
NETWORK=en0
APP=kubeadm
SEQ=001
currentHost=`hostname`
function findEthEthernet
{
eth0=`multipass networks |grep ethernet | grep -v Adapter |cut -d " " -f1`
if [ "$eth0" == "" ]
then
eth0=`multipass networks |grep wifi |cut -d " " -f1`
fi
echo $eth0
}
NETWORK=`findEthEthernet`
if [ "Shanthys-Mini.heaerieglobalsolutions.net" == "$currentHost" ]
then
HOSTMACHINE="mc02"
fi
if [ "Agalyas-Air.heaerieglobalsolutions.net" == "$currentHost" ]
then
HOSTMACHINE="mc01"
fi
HOSTNAME="$REGION-$HOSTMACHINE-$VIRTUALMACHINE-$OSVERSION-$NETWORK-$APP-$SEQ"
mkdir ~/data/$HOSTNAME
echo "multipass launch 23.04 --name $HOSTNAME --memory 8G --disk 100G --cpus 8 --network en0 --mount ~/data/$HOSTNAME:/data/"