mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-28 08:59:34 -05:00
remove old e2e test
This commit is contained in:
parent
6dc97590fe
commit
65c387c2b2
@ -8,20 +8,7 @@ cmake ..
|
||||
ctest
|
||||
```
|
||||
|
||||
### E2E Test
|
||||
|
||||
Requirement: Kernel WireGuard, Docker
|
||||
```sh
|
||||
docker build -f Dockerfile.e2e -t constellation-e2e .
|
||||
```
|
||||
For the AWS test run
|
||||
```sh
|
||||
docker run -it --cap-add=NET_ADMIN --env GITHUB_TOKEN="$(cat ~/.netrc)" --env BRANCH="main" --env aws_access_key_id=XXX --env aws_secret_access_key=XXX constellation-e2e /initiateAWS.sh
|
||||
```
|
||||
For the gcp test run
|
||||
```sh
|
||||
docker run -it --cap-add=NET_ADMIN --env GITHUB_TOKEN="$(cat ~/.netrc)" --env BRANCH="main" --env GCLOUD_CREDENTIALS="$(cat ./constellation-keyfile.json)" constellation-e2e /initiategcloud.sh
|
||||
```
|
||||
[Run CI e2e tests](/.github/docs/README.md)
|
||||
|
||||
## Linting
|
||||
|
||||
|
@ -1,33 +0,0 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
ENV DEBIAN_FRONTEND="noninteractive"
|
||||
RUN apt-get update && apt-get install cmake iproute2 iputils-ping wget curl git libssl-dev -y
|
||||
|
||||
# Install kubectl
|
||||
RUN curl -fsSLo /usr/local/bin/kubectl https://dl.k8s.io/release/v1.23.0/bin/linux/amd64/kubectl && chmod +x /usr/local/bin/kubectl
|
||||
|
||||
# Install Go
|
||||
RUN wget https://go.dev/dl/go1.18.linux-amd64.tar.gz
|
||||
RUN tar -C /usr/local -xzf go1.18.linux-amd64.tar.gz && rm go1.18.linux-amd64.tar.gz
|
||||
ENV PATH ${PATH}:/usr/local/go/bin
|
||||
|
||||
# Install wireguard-tools
|
||||
RUN git clone -b v1.0.20210914 --depth=1 https://git.zx2c4.com/wireguard-tools && make -C wireguard-tools/src -j`nproc` && make -C wireguard-tools/src install
|
||||
|
||||
# Setup CLI
|
||||
RUN wg genkey | (umask 0077 && tee /privatekey) | wg pubkey > /publickey
|
||||
RUN mkdir -p /root/.config/constellation && touch /root/.config/constellation/constellation-conf.yaml
|
||||
|
||||
# Setup AWS config
|
||||
RUN mkdir -p /root/.aws && echo "[default]\nregion = us-east-2" > /root/.aws/config && echo "[default]" >> /root/.aws/credentials
|
||||
|
||||
# Setup gcloud config
|
||||
RUN mkdir -p /root/.config/gcloud
|
||||
|
||||
# Use local constellation state
|
||||
# COPY . /constellation
|
||||
# WORKDIR /constellation
|
||||
# RUN mkdir build && cd build && cmake .. && make -j`nproc` cli
|
||||
|
||||
COPY ./test/ /
|
||||
RUN chmod +x /initiateAWS.sh && chmod +x /initiategcloud.sh
|
@ -1,44 +0,0 @@
|
||||
#! /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
|
@ -1,46 +0,0 @@
|
||||
#! /bin/bash
|
||||
export GOOGLE_APPLICATION_CREDENTIALS="/root/.config/gcloud/application_default_credentials.json"
|
||||
|
||||
echo "$GCLOUD_CREDENTIALS" >> /root/.config/gcloud/application_default_credentials.json
|
||||
|
||||
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 gcp 2 n2d-standard-2 -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
|
||||
|
||||
exit_code=$?
|
||||
|
||||
terminate
|
Loading…
Reference in New Issue
Block a user