Skip to content

Commit 7f0e264

Browse files
committed
updated documentation and deployment
1 parent 1cc2aba commit 7f0e264

File tree

5 files changed

+22
-16
lines changed

5 files changed

+22
-16
lines changed

aws/build-an-deploy-aws.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ aws secretsmanager put-secret-value --secret-id wrongsecret-2 --secret-string "$
103103
echo "Generate Parameter store challenge secret"
104104
aws ssm put-parameter --name wrongsecretvalue --overwrite --type SecureString --value "$(openssl rand -base64 24)" --region $AWS_REGION --output json --no-cli-pager
105105

106+
echo "Installing metrics api-server"
107+
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
106108

107109
wait
108110

helm/wrongsecrets-ctf-party/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ virtualdesktop:
198198
maxInstances: 500
199199
# -- Juice Shop Image to use
200200
image: jeroenwillemsen/wrongsecrets-desktop
201-
tag: latest
201+
tag: test2
202202
repository: commjoenie/wrongSecrets
203203
resources:
204204
request:

readme.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Note that we:
99
- A working admin interface which can restart both or delete both (by deleting the full namespace)
1010
- Do not support any progress watchdog as you will have access to it, we therefore disabled it.
1111

12-
1312
## Special thanks
1413
Special thanks to Madhu Akula, Ben de Haan, and Mike Woudenberg for making this port a reality!
1514

@@ -20,8 +19,11 @@ This environment uses a webtop and an instance of wrongsecrets per user. This me
2019
- 3.5 GB RAM (min 2.5GB, limit = 3.5GB)
2120
- 8GB HD (min 3 GB, limit = 8GB)
2221

23-
A 6 contestant game can be played on a local minikube with updated cpu & memory settings.
24-
A 100 contestant game can be played on the AWS setup, which will require at least 200 CPUs, 350 GB Ram, and 800 GB of storage available in the cluster.
22+
### Running this on minikube
23+
A 3-6 contestant game can be played on a local minikube with updated cpu & memory settings (e.g. 6 CPUs, 9 GB ram).
24+
25+
### Running this on AWS EKS with larger groups
26+
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. If you see heavy under-utilization as players are not very actively engaged: you can often scale down the amount of nodes required.
2527

2628
## Status
2729

wrongsecrets-balancer/src/kubernetes.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,7 @@ const createDesktopDeploymentForTeam = async ({ team, passcodeHash }) => {
10961096
{
10971097
name: 'virtualdesktop',
10981098
//TODO REPLACE HARDCODED BELOW WITH PROPPER GETS: image: `${get('wrongsecrets.image')}:${get('wrongsecrets.tag')}`,
1099-
image: 'jeroenwillemsen/wrongsecrets-desktop:latest',
1099+
image: 'jeroenwillemsen/wrongsecrets-desktop:test3',
11001100
imagePullPolicy: get('virtualdesktop.imagePullPolicy'),
11011101
resources: {
11021102
requests: {
@@ -1122,11 +1122,11 @@ const createDesktopDeploymentForTeam = async ({ team, passcodeHash }) => {
11221122
containerPort: 3000,
11231123
},
11241124
],
1125-
volumeMounts:[
1126-
{
1127-
mountPath: '/config',
1128-
name: 'ephemeral',
1129-
},
1125+
volumeMounts: [
1126+
// {
1127+
// mountPath: '/config',
1128+
// name: 'ephemeral',
1129+
// },
11301130
// {
11311131
// mountPath: '/defaults',
11321132
// name: 'ephemeral-2',
@@ -1164,11 +1164,11 @@ const createDesktopDeploymentForTeam = async ({ team, passcodeHash }) => {
11641164
},
11651165
],
11661166
volumes: [
1167-
{
1168-
name: 'ephemeral',
1169-
emptyDir: {},
1170-
sizeLimit: '4Gi'
1171-
},
1167+
// {
1168+
// name: 'ephemeral',
1169+
// emptyDir: {},
1170+
// sizeLimit: '4Gi',
1171+
// },
11721172
// {
11731173
// name: 'ephemeral-2',
11741174
// emptyDir: {},

wrongsecrets-balancer/src/teams/teams.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,9 @@ async function resetPasscode(req, res) {
498498
return res.status(404).send({ message: 'No instance to reset the passcode for.' });
499499
}
500500
logger.error(
501-
`Encountered unknown error while resetting passcode hash for deployment: ${JSON.stringify(error)}`
501+
`Encountered unknown error while resetting passcode hash for deployment: ${JSON.stringify(
502+
error
503+
)}`
502504
);
503505
// logger.error(error.message);
504506
return res.status(500).send({ message: 'Unknown error while resetting passcode.' });

0 commit comments

Comments
 (0)