constellation/test/initiateAWS.sh
Leonard Cohnen 2d8fcd9bf4 monorepo
Co-authored-by: Malte Poll <mp@edgeless.systems>
Co-authored-by: katexochen <katexochen@users.noreply.github.com>
Co-authored-by: Daniel Weiße <dw@edgeless.systems>
Co-authored-by: Thomas Tendyck <tt@edgeless.systems>
Co-authored-by: Benedict Schlueter <bs@edgeless.systems>
Co-authored-by: leongross <leon.gross@rub.de>
Co-authored-by: Moritz Eckert <m1gh7ym0@gmail.com>
2022-03-22 16:09:39 +01:00

45 lines
1.0 KiB
Bash

#! /bin/bash
echo "aws_access_key_id = $aws_access_key_id" >> /root/.aws/credentials
echo "aws_secret_access_key = $aws_secret_access_key" >> /root/.aws/credentials
echo "$GITHUB_TOKEN" >> /root/.netrc
terminate() {
err=$?
pkill kubectl
./constellation terminate
exit $err
}
trap terminate ERR
BRANCH="${BRANCH:-main}"
git clone --branch $BRANCH https://github.com/edgelesssys/constellation-coordinator.git
mkdir -p constellation-coordinator/build
cd constellation-coordinator/build
cmake ..
make -j"$(nproc)" cli
./constellation create aws 2 4xlarge -y
echo "Initializing constellation"
./constellation init --privatekey /privatekey
export KUBECONFIG="./admin.conf"
kubectl wait --for=condition=ready --timeout=60s --all nodes
kubectl apply -k github.com/BuoyantIO/emojivoto/kustomize/deployment
echo "Wait for service to be applied"
kubectl wait --for=condition=available --timeout=60s -n emojivoto --all deployments
kubectl -n emojivoto port-forward svc/web-svc 8080:80 &
sleep 5
curl http://localhost:8080
terminate