Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Project to MultiJuicer #30

Merged
merged 9 commits into from
Jan 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cleaner/readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
![Cleaner Cover](./cleaner-cover.svg)

Cleaner is a sub component of JuicyCTF, a kubernetes Jobs which is responsible for cleaning up Juice Shop instances which haven't been used for some time.
Cleaner is a sub component of MultiJuicer, a kubernetes Jobs which is responsible for cleaning up Juice Shop instances which haven't been used for some time.
273 changes: 144 additions & 129 deletions cover.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions e2e/cypress/integration/juice_balancer_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ it('can create a new team', () => {

cy.visit('/balancer');

cy.contains('JuicyCTF');
cy.contains('MultiJuicer');

cy.get('[data-test-id="teamname-input"]')
.type('team42')
Expand Down Expand Up @@ -39,7 +39,7 @@ it('can join an existing team', () => {

// First Person creating Instance (very simmilar to previous test case)
cy.visit('/balancer');
cy.contains('JuicyCTF');
cy.contains('MultiJuicer');
cy.get('[data-test-id="teamname-input"]')
.type('team43')
.should('have.value', 'team43');
Expand All @@ -60,7 +60,7 @@ it('can join an existing team', () => {

// Second team trying to join in
cy.visit('/balancer');
cy.contains('JuicyCTF');
cy.contains('MultiJuicer');
cy.get('[data-test-id="teamname-input"]').type('team43');
cy.get('[data-test-id="create-join-team-button"]').click();

Expand All @@ -82,7 +82,7 @@ it('can login as admin', () => {

cy.visit('/balancer');

cy.contains('JuicyCTF');
cy.contains('MultiJuicer');

cy.get('[data-test-id="teamname-input"]')
.type('admin')
Expand Down
2 changes: 1 addition & 1 deletion e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "juicy-ctf-e2e-tests",
"name": "multi-juicer-e2e-tests",
"version": "1.0.0",
"description": "",
"main": "index.js",
Expand Down
28 changes: 14 additions & 14 deletions guides/aws/aws.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [WIP] Example Setup with AWS

**NOTE:** This Guide is still a "Work in Progress", if you got any recommendations or issues with it, please post them into the related issue: https://github.com/iteratec/juicy-ctf/issues/15
**NOTE:** This Guide is still a "Work in Progress", if you got any recommendations or issues with it, please post them into the related issue: https://github.com/iteratec/multi-juicer/issues/15

**WARNING:** The resources created in this guide will cost about \$70.00/month. The actual price might depend on its usage, but make sure to delete the resources as described in Step 5 Deinstallation when you do not need them anymore.

Expand All @@ -17,7 +17,7 @@ This example expects you to have the following cli tools setup.
# First we'll need a cluster, you can create one using the DigitalOcean cli.
# This will take a couple of minutes
eksctl create cluster \
--name juicy-ctf \
--name multi-juicer \
--version 1.13 \
--nodegroup-name standard-workers \
--node-type t3.medium \
Expand All @@ -27,21 +27,21 @@ eksctl create cluster \
--node-ami auto

# After completion verify that your kubectl context has been updated:
# Should print something like: Administrator@juicy-ctf.eu-central-1.eksctl.io
# Should print something like: Administrator@multi-juicer.eu-central-1.eksctl.io
kubectl config current-context
```

## Step 2. Installing JuicyCTF via helm
## Step 2. Installing MultiJuicer via helm

```sh
# You'll need to add the juicy-ctf helm repo to your helm repos
helm repo add juicy-ctf https://iteratec.github.io/juicy-ctf/
# You'll need to add the multi-juicer helm repo to your helm repos
helm repo add multi-juicer https://iteratec.github.io/multi-juicer/

# for helm <= 2
helm install juicy-ctf/juicy-ctf --name juicy-ctf
helm install multi-juicer/multi-juicer --name multi-juicer

# for helm >= 3
helm install juicy-ctf juicy-ctf/juicy-ctf
helm install multi-juicer multi-juicer/multi-juicer

# kubernetes will now spin up the pods
# to verify every thing is starting up, run:
Expand All @@ -60,7 +60,7 @@ This step is optional, but helpful to catch errors quicker.
kubectl port-forward service/juice-balancer 3000:3000

# Open up your browser for localhost:3000
# You should be able to see the JuicyCTF Balancer UI
# You should be able to see the MultiJuicer Balancer UI

# Try to create a team and see if everything works correctly
# You should be able to access a JuiceShop instances after a few seconds after creating a team,
Expand All @@ -81,26 +81,26 @@ The Guide below shows **how I thing it should work** but it doesn't. At least no
AWS let's you create LoadBalancer by adding a new ingress config to you cluster.
To set this up follow the **To deploy the ALB Ingress Controller to an Amazon EKS cluster** guide on https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html closely. This will walk you through setting up and configuring the ingress.

After you have set that up we can now create a ingress config for our the JuicyCTF Stack.
After you have set that up we can now create a ingress config for our the MultiJuicer Stack.

```sh
# create the ingress for the JuiceBalancer service
wget https://raw.githubusercontent.com/iteratec/juicy-ctf/master/guides/aws/aws-ingress.yaml
wget https://raw.githubusercontent.com/iteratec/multi-juicer/master/guides/aws/aws-ingress.yaml
kubectl apply -f aws-ingress.yaml
```

## Step 5. Deinstallation

helm delete juicy-ctf
helm delete multi-juicer

```sh
# helm will not delete the persistent volumes for redis!
# delete them by running:
kubectl delete persistentvolumeclaims redis-data-juicy-ctf-redis-master-0 redis-data-juicy-ctf-redis-slave-0
kubectl delete persistentvolumeclaims redis-data-multi-juicer-redis-master-0 redis-data-multi-juicer-redis-slave-0

# Delete the loadbalancer
kubectl delete -f aws-ingress.yaml

# Delete the kubernetes cluster
eksctl delete cluster juicy-ctf
eksctl delete cluster multi-juicer
```
20 changes: 10 additions & 10 deletions guides/azure/azure.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [WIP] Example Setup with Microsoft Azure

**NOTE:** This Guide is still a "Work in Progress", if you got any recommendations or issues with it, please post them into the related issue: https://github.com/iteratec/juicy-ctf/issues/16
**NOTE:** This Guide is still a "Work in Progress", if you got any recommendations or issues with it, please post them into the related issue: https://github.com/iteratec/multi-juicer/issues/16

**WARNING:** The resources created in this guid will cost about \$??/month.
Make sure to delete the resources as described in Step 5 Deinstallation when you do not need them anymore.
Expand All @@ -9,31 +9,31 @@ Make sure to delete the resources as described in Step 5 Deinstallation when you

```sh
# Before we can do anything we need a resource group
az group create --location westeurope --name juicy-ctf
az group create --location westeurope --name multi-juicer

# let's create the cluster now
# I decreased the node count to 2, to dodge the default core limit
az aks create --resource-group juicy-ctf --name juicy-k8s --node-count 2
az aks create --resource-group multi-juicer --name juicy-k8s --node-count 2

# now to authenticate fetch the credentials for the new cluster
az aks get-credentials --resource-group juicy-ctf --name juicy-k8s
az aks get-credentials --resource-group multi-juicer --name juicy-k8s

# verify by running
# should print "juicy-k8s"
kubectl config current-context
```

## Step 2. Installing JuicyCTF via helm
## Step 2. Installing MultiJuicer via helm

```bash
# You'll need to add the juicy-ctf helm repo to your helm repos
helm repo add juicy-ctf https://iteratec.github.io/juicy-ctf/
# You'll need to add the multi-juicer helm repo to your helm repos
helm repo add multi-juicer https://iteratec.github.io/multi-juicer/

# for helm <= 2
helm install juicy-ctf/juicy-ctf --name juicy-ctf
helm install multi-juicer/multi-juicer --name multi-juicer

# for helm >= 3
helm install juicy-ctf juicy-ctf/juicy-ctf
helm install multi-juicer multi-juicer/multi-juicer

# kubernetes will now spin up the pods
# to verify every thing is starting up, run:
Expand All @@ -52,7 +52,7 @@ This step is optional, but helpful to catch errors quicker.
kubectl port-forward service/juice-balancer 3000:3000

# Open up your browser for localhost:3000
# You should be able to see the JuicyCTF Balancer UI
# You should be able to see the MultiJuicer Balancer UI

# Try to create a team and see if everything works correctly
# You should be able to access a JuiceShop instances after a few seconds after creating a team,
Expand Down
20 changes: 10 additions & 10 deletions guides/digital-ocean/digital-ocean.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ doctl kubernetes cluster create juicy-k8s
kubectl config current-context
```

## Step 2. Installing JuicyCTF via helm
## Step 2. Installing MultiJuicer via helm

```bash
# You'll need to add the juicy-ctf helm repo to your helm repos
helm repo add juicy-ctf https://iteratec.github.io/juicy-ctf/
# You'll need to add the multi-juicer helm repo to your helm repos
helm repo add multi-juicer https://iteratec.github.io/multi-juicer/

# for helm <= 2
helm install juicy-ctf/juicy-ctf --name juicy-ctf
helm install multi-juicer/multi-juicer --name multi-juicer

# for helm >= 3
helm install juicy-ctf juicy-ctf/juicy-ctf
helm install multi-juicer multi-juicer/multi-juicer

# kubernetes will now spin up the pods
# to verify every thing is starting up, run:
Expand All @@ -52,7 +52,7 @@ This step is optional, but helpful to catch errors quicker.
kubectl port-forward service/juice-balancer 3000:3000

# Open up your browser for localhost:3000
# You should be able to see the JuicyCTF Balancer UI
# You should be able to see the MultiJuicer Balancer UI

# Try to create a team and see if everything works correctly
# You should be able to access a JuiceShop instances after a few seconds after creating a team,
Expand All @@ -76,25 +76,25 @@ doctl compute certificate list

# We got a example loadbalancer yaml for this example in the repository
# Edit the cert id in do-lb.yaml to the cert id of your domain
wget https://raw.githubusercontent.com/iteratec/juicy-ctf/master/guides/digital-ocean/do-lb.yaml
wget https://raw.githubusercontent.com/iteratec/multi-juicer/master/guides/digital-ocean/do-lb.yaml
vim do-lb.yaml

# Create the loadbalancer
# This might take a couple of minutes
kubectl create -f do-lb.yaml

# If it takes longer than a few minutes take a detailed look at the loadbalancer
kubectl describe services juicy-ctf-loadbalancer
kubectl describe services multi-juicer-loadbalancer
```

## Step 5. Deinstallation

```bash
helm delete juicy-ctf
helm delete multi-juicer
# helm will not delete the persistent volumes for redis!
# these cost $1.60/month ($0.10/GB/month)
# delete them by running:
kubectl delete persistentvolumeclaims redis-data-juicy-ctf-redis-master-0 redis-data-juicy-ctf-redis-slave-0
kubectl delete persistentvolumeclaims redis-data-multi-juicer-redis-master-0 redis-data-multi-juicer-redis-slave-0

# Delete the loadbalancer
kubectl delete -f do-lb.yaml
Expand Down
4 changes: 2 additions & 2 deletions guides/digital-ocean/do-lb.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
kind: Service
apiVersion: v1
metadata:
name: juicy-ctf-loadbalancer
name: multi-juicer-loadbalancer
annotations:
# availible annotations to configure do loadbalancer: https://github.com/digitalocean/digitalocean-cloud-controller-manager/blob/master/docs/controllers/services/annotations.md
service.beta.kubernetes.io/do-loadbalancer-protocol: 'http2'
Expand All @@ -13,7 +13,7 @@ metadata:
spec:
type: LoadBalancer
selector:
app.kubernetes.io/instance: juicy-ctf
app.kubernetes.io/instance: multi-juicer
app.kubernetes.io/name: juice-balancer
ports:
- name: http
Expand Down
2 changes: 1 addition & 1 deletion guides/openshift/openshift-helm-overrides.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file only overrides default option enabled in the chart which clashes with the OpenShift security context
# For the full config file check: https://github.com/iteratec/juicy-ctf/blob/master/helm/juicy-ctf/values.yaml
# For the full config file check: https://github.com/iteratec/multi-juicer/blob/master/helm/multi-juicer/values.yaml
redis:
# OpenShifts Default Security Context makes trouble with the security context
# of the redis chart.
Expand Down
24 changes: 12 additions & 12 deletions guides/openshift/openshift.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@ This example expects you to have the following prerequisites.
# You can copy the login command including your token from the web ui
oc login https://console.openshift.example.com --token=****

# Create a new project to hold the juicy-ctf resources
oc new-project juicy-ctf
# Create a new project to hold the multi-juicer resources
oc new-project multi-juicer
```

## Step 2. Installing JuicyCTF via helm
## Step 2. Installing MultiJuicer via helm

```bash
# You'll need to add the juicy-ctf helm repo to your helm repos
helm repo add juicy-ctf https://iteratec.github.io/juicy-ctf/
# You'll need to add the multi-juicer helm repo to your helm repos
helm repo add multi-juicer https://iteratec.github.io/multi-juicer/

# Before we can install the cluster we need to change one config option, which clashes with OpenShifts security context
# For that download the OpenShift overrides config file
wget https://raw.githubusercontent.com/iteratec/juicy-ctf/master/guides/openshift/openshift-helm-overrides.yaml
wget https://raw.githubusercontent.com/iteratec/multi-juicer/master/guides/openshift/openshift-helm-overrides.yaml

# for helm <= 2
helm install juicy-ctf/juicy-ctf --name juicy-ctf -f openshift-helm-overrides.yaml ./juicy-ctf/helm/juicy-ctf/
helm install multi-juicer/multi-juicer --name multi-juicer -f openshift-helm-overrides.yaml ./multi-juicer/helm/multi-juicer/

# for helm >= 3
helm install juicy-ctf juicy-ctf/juicy-ctf -f openshift-helm-overrides.yaml ./juicy-ctf/helm/juicy-ctf/
helm install multi-juicer multi-juicer/multi-juicer -f openshift-helm-overrides.yaml ./multi-juicer/helm/multi-juicer/
```

## Step 3. Verify the app is running correctly
Expand All @@ -48,7 +48,7 @@ This step is optional, but helpful to catch errors quicker.
oc port-forward service/juice-balancer 3000:3000

# Open up your browser for localhost:3000
# You should be able to see the JuicyCTF Balancer UI
# You should be able to see the MultiJuicer Balancer UI

# Try to create a team and see if everything works correctly
# You should be able to access a JuiceShop instances after a few seconds after creating a team,
Expand All @@ -69,16 +69,16 @@ OpenShift lets you create routes to expose your app to the internet.
# Create the route.
# Make sure to adjust the hostname to match the one of your org.
# You can also perform this step easily via the OpenShift web ui.
oc create route edge juice-balancer --service juice-balancer --hostname juicy-ctf.cloudapps.example.com
oc create route edge juice-balancer --service juice-balancer --hostname multi-juicer.cloudapps.example.com
```

## Step 4. Deinstallation

```bash
helm delete juicy-ctf
helm delete multi-juicer
# helm will not delete the persistent volumes for redis!
# delete them by running:
oc delete persistentvolumeclaims redis-data-juicy-ctf-redis-master-0 redis-data-juicy-ctf-redis-slave-0
oc delete persistentvolumeclaims redis-data-multi-juicer-redis-master-0 redis-data-multi-juicer-redis-slave-0

# Delete the route
oc delete route edge juice-balancer
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions helm/juicy-ctf/Chart.yaml → helm/multi-juicer/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
name: juicy-ctf
name: multi-juicer
description: Run Multi User "Capture the Flags" or Security Trainings with OWASP Juice Shop

# A chart can be either an 'application' or a 'library' chart.
Expand All @@ -14,11 +14,11 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 1.3.1
version: 2.0.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 1.3.1
appVersion: 2.0.0

dependencies:
- name: redis
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
JuicyCTF deployed! 🎉🥳
MultiJuicer deployed! 🎉🥳

JuicyCTF doesn't come with a default way to expose it to the world.
You can find guides for specific cloud providers here: https://github.com/iteratec/juicy-ctf/tree/master/guides
MultiJuicer doesn't come with a default way to expose it to the world.
You can find guides for specific cloud providers here: https://github.com/iteratec/multi-juicer/tree/master/guides

To test it locally run:
$ kubectl port-forward service/juice-balancer 3000:3000
Expand Down
Loading