paramterized additional things and tested on developer sandbox

This commit is contained in:
René Zubcevic 2021-12-23 17:07:23 +01:00
parent 4018212304
commit ee31633822
6 changed files with 23 additions and 7 deletions

View File

@ -5,6 +5,9 @@ This helm chart can be used on a OpenShift Code Ready Container environment or a
With the OpenShift CRC (Code Ready Container) cluster you run an entire environment on your local machine. (> 4 vCPU, >8GB mem)
See the Red Hat documentation for general understanding of OpenShift. Make sure helm is installed as well.
https://developers.redhat.com/developer-sandbox
## CRC commands
crc config set cpus 6
@ -22,6 +25,14 @@ The example without modification uses *demo-project* as the project/namespace fo
helm install goat1 ./webgoat
## Helm install on single node Developer Sandbox (cloud)
oc login --token=sha256~phDWy6Wm_oJQW6kmOHEbLkRdDIXU6b70hRVmdSYWolM --server=https://api.sandbox-m2.rz9k.p1.openshiftapps.com:6443
helm install --set namespace=renezubcevic-dev --set accessMode=ReadWriteOnce --set urlpostfix=.apps.sandbox-m2.rz9k.p1.openshiftapps.com goat1 ./webgoat
A code ready container looks the same for all developers on their local machine, but a developer sandbox requires other credentials from your account in the cloud and different namespace and urlpostfix and also a different access mode for the persistent storage.
Of course the token here is a fake.
## uninstall
helm uninstall goat1

View File

@ -6,4 +6,4 @@ type: application
version: 0.1.0
appVersion: "openshift"
appVersion: "8.2.3-SNAPSHOT"

View File

@ -9,5 +9,5 @@ data:
TZ: 'Europe/Amsterdam'
EXCLUDE_CATEGORIES: 'CLIENT_SIDE'
EXCLUDE_LESSONS: 'SqlInjectionAdvanced'
WEBWOLF_HOST: 'webwolf-1-wolf-demo-project.apps-crc.testing'
WEBWOLF_HOST: '{{ .Values.webwolf_server.name }}-wolf-{{ .Values.namespace }}{{ .Values.urlpostfix }}'
WEBWOLF_PORT: '80'

View File

@ -56,14 +56,14 @@ spec:
"--add-opens","java.desktop/java.awt.font=ALL-UNNAMED",
"--add-opens","java.base/sun.nio.ch=ALL-UNNAMED",
"--add-opens","java.base/java.io=ALL-UNNAMED",
"-Djava.io.tmpdir=/home/webgoat/.webgoat-8.2.3-SNAPSHOT",
"-Djava.io.tmpdir=/home/webgoat/.webgoat-{{ .Chart.AppVersion }}",
"-Dfile.encoding=UTF-8",
"-jar","/home/webgoat/webgoat.jar",
"--server.address=0.0.0.0"]
imagePullPolicy: Always
volumeMounts:
- name: webgoat-volume-1
mountPath: /home/webgoat/.webgoat-8.2.3-SNAPSHOT
mountPath: /home/webgoat/.webgoat-{{ .Chart.AppVersion }}
terminationMessagePolicy: File
envFrom:
- configMapRef:
@ -133,14 +133,14 @@ spec:
command:
- 'java'
args: ["-Duser.home=/home/webgoat",
"-Djava.io.tmpdir=/home/webgoat/.webgoat-8.2.3-SNAPSHOT",
"-Djava.io.tmpdir=/home/webgoat/.webgoat-{{ .Chart.AppVersion }}",
"-Dfile.encoding=UTF-8",
"-jar","/home/webgoat/webwolf.jar",
"--server.address=0.0.0.0"]
imagePullPolicy: Always
volumeMounts:
- name: webgoat-volume-1
mountPath: /home/webgoat/.webgoat-8.2.3-SNAPSHOT
mountPath: /home/webgoat/.webgoat-{{ .Chart.AppVersion }}
terminationMessagePolicy: File
envFrom:
- configMapRef:

View File

@ -5,7 +5,7 @@ metadata:
namespace: '{{ .Values.namespace }}'
spec:
accessModes:
- ReadWriteMany
- '{{ .Values.accessMode }}'
resources:
requests:
storage: 1Gi

View File

@ -1,4 +1,6 @@
namespace: demo-project
urlpostfix: .apps-crc.testing
accessMode: ReadWriteMany
webgoat_server:
name: webgoat-1
@ -7,3 +9,6 @@ webgoat_server:
webwolf_server:
name: webwolf-1
image: docker.io/webgoat/goatandwolf:openshift