diff --git a/apps/workadventure/README.md b/apps/workadventure/README.md index dde9c01..a3a728b 100644 --- a/apps/workadventure/README.md +++ b/apps/workadventure/README.md @@ -1,9 +1,30 @@ ## Workedvanture +## Status + +* Deploys via helm +* Backend does not connect to redis + * Bug report: https://github.com/thecodingmachine/workadventure/issues/1657 +* Otherwise, all components are coming up from v3: + +``` +[14:06] nb3:~% kubectl get pods -l app.kubernetes.io/instance=wa1 +NAME READY STATUS RESTARTS AGE +wa1-back-5cdf6c477-wpjzn 1/1 Running 0 12m +wa1-coturn-846c5c48bc-cm9n9 1/1 Running 0 37m +wa1-front-7c8d9649f5-68wx2 1/1 Running 0 12m +wa1-icon-5f846d674-hswst 1/1 Running 0 37m +wa1-nginx-78b59f78d8-lgbv7 1/1 Running 0 37m +wa1-pusher-dcbc5f4f5-zh25d 1/1 Running 0 17m +wa1-redis-59b5c9fc5f-m268b 1/1 Running 0 37m +[14:06] nb3:~% +``` + ## Components ### Back + ### Front ### Pusher @@ -64,5 +85,61 @@ sudo: policy plugin failed session initialization * Production docker-compose: https://github.com/thecodingmachine/workadventure/blob/master/contrib/docker/docker-compose.prod.yaml +back is crashing: + +wa1-back-7b59d6b7bb-w4l9j 0/1 Error 3 3m26s + +``` +[13:31] nb3:workadventure% kubectl logs -f wa1-back-7b59d6b7bb-w4l9j +yarn install v1.22.5 +[1/4] Resolving packages... +[2/4] Fetching packages... +info fsevents@2.1.3: The platform "linux" is incompatible with this module. +info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation. +error Could not write file "/usr/src/yarn-error.log": "EACCES: permission denied, open '/usr/src/yarn-error.log'" +error An unexpected error occurred: "EACCES: permission denied, unlink '/usr/src/node_modules/.yarn-integrity'". +info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. +[13:32] nb3:workadventure% +``` + +#### Front does not listen on port 8080: + +``` +[13:36] nb3:workadventure% curl -v http://wa1-front.default.svc.c2.k8s.ooo:8080 +* Trying 2a0a:e5c0:13:e2::69cc:8080... +* connect to 2a0a:e5c0:13:e2::69cc port 8080 failed: Connection refused +* Failed to connect to wa1-front.default.svc.c2.k8s.ooo port 8080 after 12 ms: Connection refused +* Closing connection 0 +curl: (7) Failed to connect to wa1-front.default.svc.c2.k8s.ooo port 8080 after 12 ms: Connection refused +[13:36] nb3:workadventure% + +``` + +Fixed: it is listening on port 80. + +#### Network error + +* Seems like the pusher cannot be reached: https://issueexplorer.com/issue/thecodingmachine/workadventure/1481 +* Pusher is not reachable + + +#### Pusher does not respond + +* Needed to fix the service definition, reachable now + +``` +[13:42] nb3:workadventure% curl -v http://wa1-pusher.default.svc.c2.k8s.ooo:8080 +* Trying 2a0a:e5c0:13:e2::1488:8080... +* Connected to wa1-pusher.default.svc.c2.k8s.ooo (2a0a:e5c0:13:e2::1488) port 8080 (#0) +> GET / HTTP/1.1 +> Host: wa1-pusher.default.svc.c2.k8s.ooo:8080 +> User-Agent: curl/7.80.0 +> Accept: */* +> +* Empty reply from server +* Closing connection 0 +curl: (52) Empty reply from server +``` + ### v4: helm re-usable diff --git a/apps/workadventure/v3/templates/back-deployment.yaml b/apps/workadventure/v3/templates/back-deployment.yaml index 888920e..1861e0d 100644 --- a/apps/workadventure/v3/templates/back-deployment.yaml +++ b/apps/workadventure/v3/templates/back-deployment.yaml @@ -48,6 +48,8 @@ spec: value: SomeStaticAuthSecret image: thecodingmachine/workadventure-back:v1.6.4 name: back + securityContext: + runAsUser: 0 restartPolicy: Always --- apiVersion: v1 diff --git a/apps/workadventure/v3/templates/front-deployment.yaml b/apps/workadventure/v3/templates/front-deployment.yaml index c539060..5f308dd 100644 --- a/apps/workadventure/v3/templates/front-deployment.yaml +++ b/apps/workadventure/v3/templates/front-deployment.yaml @@ -44,15 +44,15 @@ spec: - name: START_ROOM_URL - name: STUN_SERVER value: stun:stun.l.google.com:19302 - - name: TURN_PASSWORD - name: TURN_SERVER - value: turn:coturn.workadventure.localhost:3478,turns:coturn.workadventure.localhost:5349 + value: turn:{{ .Release.Name }}-coturn:3478,turns:{{ .Release.Name }}-coturn:5349 - name: TURN_USER - # FIXME + - name: TURN_PASSWORD + # FIXME: create that instance - name: UPLOADER_URL - value: //uploader.workadventure.localhost + value: http://{{ .Release.Name }}-uploader ports: - - containerPort: 8080 + - containerPort: 80 securityContext: runAsUser: 0 image: thecodingmachine/workadventure-front:v1.6.4 @@ -75,7 +75,7 @@ metadata: spec: type: ClusterIP ports: - - port: 8080 + - port: 80 name: http selector: app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/apps/workadventure/v3/templates/nginx.yaml b/apps/workadventure/v3/templates/nginx.yaml index 5b03d0c..74941f0 100644 --- a/apps/workadventure/v3/templates/nginx.yaml +++ b/apps/workadventure/v3/templates/nginx.yaml @@ -52,7 +52,8 @@ kind: Service metadata: name: {{ .Release.Name }} labels: - app: {{ .Release.Name }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: nginx spec: type: ClusterIP ports: @@ -61,8 +62,8 @@ spec: - port: 443 name: https selector: - app: {{ .Release.Name }}-workadventure ---- + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: nginx --- apiVersion: v1 kind: PersistentVolumeClaim diff --git a/apps/workadventure/v3/templates/pusher-deployment.yaml b/apps/workadventure/v3/templates/pusher-deployment.yaml index 3eb462f..5f712ef 100644 --- a/apps/workadventure/v3/templates/pusher-deployment.yaml +++ b/apps/workadventure/v3/templates/pusher-deployment.yaml @@ -2,20 +2,20 @@ apiVersion: apps/v1 kind: Deployment metadata: annotations: - labels: - io.kompose.service: pusher - name: pusher + name: {{ .Release.Name}}-pusher spec: replicas: 1 selector: matchLabels: - io.kompose.service: pusher + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: pusher strategy: type: Recreate template: metadata: labels: - io.kompose.service: pusher + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/component: pusher spec: containers: - command: @@ -25,7 +25,7 @@ spec: env: - name: ADMIN_API_TOKEN - name: API_URL - value: back:50051 + value: {{ .Release.Name}}-back:50051 - name: DEBUG value: socket:* - name: DISABLE_ANONYMOUS @@ -49,7 +49,8 @@ spec: name: pusher ports: - containerPort: 8080 - resources: {} + securityContext: + runAsUser: 0 restartPolicy: Always --- apiVersion: v1