#!/bin/bash
echo Trearing down lab-control stack ...
infra/destroy_infra.sh

bin/update_config.sh

echo Waiting for 300 seconds...
sleep 300;

echo Deploying the new lab-control stack ...
infra/deploy_infra.sh
echo Waiting for 300 seconds ...
sleep 300;

ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -A ec2-user@lab-control.pingcap.net << 'EOFX'
echo "Operating on `hostname`"
sudo cat /var/log/cloud-init-output.log
EOFX
