Skip to content

Commit

Permalink
feat: projector replaced with VNC
Browse files Browse the repository at this point in the history
  • Loading branch information
slisson committed Nov 15, 2024
1 parent 60f7db6 commit e80287c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 27 deletions.
35 changes: 11 additions & 24 deletions helm/modelix/templates/common/workspace-client-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
effect: "NoExecute"
containers:
- name: workspace-client
image: "{{ .Values.dockerProxy.prefix }}modelix/modelix-workspace-client:{{ .Values.imageTags.wsClient | default .Values.versions.modelix.workspaces }}"
image: "{{ .Values.dockerProxy.prefix }}modelix/mps-vnc-baseimage:{{ .Values.versions.modelix.vncBaseImage }}-mps2024.1"
imagePullPolicy: IfNotPresent
env:
- name: "modelix_executionMode"
Expand All @@ -39,9 +39,11 @@ spec:
value: "http://{{ include "modelix.fullname" . }}-workspace-manager:28104/"
- name: MODEL_URI
value: "http://{{ include "modelix.fullname" . }}-model:28101/"
- name: PRE_STARTUP_SCRIPT_URL
value: "http://{{ include "modelix.fullname" . }}-workspace-manager:28104/client/pre-startup.sh"
ports:
- name: "projector"
containerPort: 8887
- name: "vnc"
containerPort: 5800
- name: "jvmdebug"
containerPort: 5071
- name: "yourkit"
Expand All @@ -61,33 +63,18 @@ spec:
limits:
memory: "4.0Gi" # is replaced with the value in the workspace configuration
cpu: "1.5"
# 8887 is the port used to access the MPS UI.
# http://localhost:8887/mainWindows can be used to list opened windows.
# See https://github.com/JetBrains/projector-client/blob/0f1e08a68f01c417a7ce8a58afe77d63603e22db/projector-server-core/src/main/kotlin/org/jetbrains/projector/server/core/websocket/HttpWsServer.kt#L68
# The response is single line of JSON.
# Example responses values are:
# * `[]`, when no windows are opened yet
# * `[{"title":"splash","pngBase64Icon":null}]`, when the splash screen is loading
# * `[{"title":"<projectName>","pngBase64Icon":"iVB<...>YII="}]`, when one project is opened
#
# With the different probes, we make sure to only redirect the user to the UI when MPS started.
# Use `wget` because `curl` does not exist in container.
startupProbe:
exec:
command: ["/bin/sh", "-c", "wget -qO- http://localhost:8887/mainWindows | grep -vqF '[]'"]
# Give MPS and projector 2 minutes (12 * 10 seconds) to startup.
httpGet:
path: /
port: 5800
failureThreshold: 12
periodSeconds: 10
livenessProbe:
exec:
command: ["/bin/sh", "-c", "wget -qO- http://localhost:8887/mainWindows | grep -vqF '[]'"]
httpGet:
path: /
port: 5800
periodSeconds: 20
timeoutSeconds: 10
readinessProbe:
exec:
command: ["/bin/sh", "-c", "wget -qO- http://localhost:8887/mainWindows | grep -vqF '[]'"]
periodSeconds: 5
timeoutSeconds: 3
restartPolicy: Always
{{- include "modelix.pullSecret" . | nindent 6 }}
{{- end -}}
6 changes: 3 additions & 3 deletions helm/modelix/templates/common/workspace-client-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ metadata:
spec:
type: NodePort
ports:
- name: "projector"
port: 8887
targetPort: "projector"
- name: "vnc"
port: 5800
targetPort: "vnc"
- name: "diff"
port: 33334
targetPort: "diff"
Expand Down
1 change: 1 addition & 0 deletions helm/modelix/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ versions:
workspaces: "0.3.2"
core: "4.11.5"
kubernetes: "0.1.2-dirty"
vncBaseImage: "0.6.0"

imageTags:
db: ""
Expand Down

0 comments on commit e80287c

Please sign in to comment.