Skip to content

Commit bef1a5f

Browse files
authored
Merge branch 'main' into live/ctf
2 parents c88a33c + b4b4e83 commit bef1a5f

File tree

7 files changed

+791
-853
lines changed

7 files changed

+791
-853
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ aws/terraform.tfstate.backup
99
aws/.terraform.tfstate.lock.info
1010
aws/cluster-autoscaler-autodiscover.yaml
1111
aws/cluster-autoscaler-autodiscover.yaml-e
12+
scripts/unusedteams.txt
13+
scripts/users.csv
14+
scripts/teams.csv
1215
db.zip
1316
.idea
1417
.DS_Store

readme.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ We would like to thank the following parties for helping us out:
4444

4545
This environment uses a webtop and an instance of wrongsecrets per user. This means that you need per user:
4646

47-
- 2.5 CPU (min = 0.5 , limit = 2.5)
48-
- 3.5 GB RAM (min 1 GB, limit = 3.5GB)
49-
- 8GB HD (min 3 GB, limit = 8GB)
47+
- 1.5 CPU (min = 0.5 , limit = 2.5)
48+
- 2 GB RAM (min 1 GB, limit = 3.5GB)
49+
- 4GB HD (min 3 GB, limit = 8GB)
5050

5151
### Running this on minikube
5252

53-
A 3-6 contestant game can be played on a local minikube with updated cpu & memory settings (e.g. 6 virtual CPUs, 9 GB ram).
53+
A 4-10 contestant game can be played on a local minikube with updated cpu & memory settings (e.g. 6 virtual CPUs, 9 GB ram).
5454

5555
### Running this on AWS EKS with larger groups
5656

57-
A 100 contestant game can be played on the AWS setup, which will require around 200 (100-250) CPUs, 300 (250-350) GB Ram, and 800 GB of storage available in the cluster. Note that we have configured everything based on autoscaling in AWS. This means that you can often start with a cluster about 20% of the size of the "limit" numbers and then see how things evolve. You will hardly hit those limits, unless all players are very actively fuzzing the WrongSecrets app, while runnign heavy appss on their Webtops. Instead, you will see that you are using just 25% of what is provided in numbers here. So, by using our terraform (including an autoscaling managed nodegroup), you can reduce the cost of your CTF by a lot!
57+
A 100 contestant game can be played on the AWS setup, which will require around 150 (100-250) CPUs, 200 (150-350) GB Ram, and 400 GB of storage available in the cluster. Note that we have configured everything based on autoscaling in AWS. This means that you can often start with a cluster about 20% of the size of the "limit" numbers and then see how things evolve. You will hardly hit those limits, unless all players are very actively fuzzing the WrongSecrets app, while runnign heavy appss on their Webtops. Instead, you will see that you are using just 25% of what is provided in numbers here. So, by using our terraform (including an autoscaling managed nodegroup), you can reduce the cost of your CTF by a lot!
5858

5959
## Status - Experimental release
6060

scripts/list-unused-ns.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ IFS=$'
1111
USERS=($(awk -F , '{print tolower($3)}' users.csv))
1212
TEAMS=($(awk -F , '{print tolower($3)}' teams.csv))
1313
unset IFS
14+
NAMESPACES=$(kubectl get ns | grep t- | awk '{print $1;}')
15+
count=0
1416
for NAMESPACE in `kubectl get ns | grep t- | awk '{print $1;}'`
1517
do
1618
echo "found $NAMESPACE"
1719
CUT_NAMESPACE=${NAMESPACE:2}
20+
let count++
1821
NO_TDASH_NAMESPACE=`echo $CUT_NAMESPACE | awk '{print tolower($0)}'`
1922
echo "checking list for $NO_TDASH_NAMESPACE"
2023
if [[ " ${USERS[*]} " =~ " ${NO_TDASH_NAMESPACE} " ]]; then
@@ -29,3 +32,5 @@ else
2932

3033
fi
3134
done
35+
unregistered=$(wc -l unusedteams.txt)
36+
echo "${count} namespaces active where not registered ${unregistered}"

0 commit comments

Comments
 (0)