workadventure/v2: phase in first version that "runs"
This commit is contained in:
parent
7d84ed56d7
commit
275fea63a9
|
@ -23,3 +23,40 @@
|
||||||
## Other TODO
|
## Other TODO
|
||||||
|
|
||||||
* Checkout whether traefik can be of help for us, too
|
* Checkout whether traefik can be of help for us, too
|
||||||
|
|
||||||
|
|
||||||
|
## Versions
|
||||||
|
|
||||||
|
### v1: all manifests apply in k8s
|
||||||
|
|
||||||
|
### v2: all pods run
|
||||||
|
|
||||||
|
Problem with the default front container:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo: unable to send audit message
|
||||||
|
sudo: pam_open_session: System error
|
||||||
|
sudo: policy plugin failed session initialization
|
||||||
|
```
|
||||||
|
|
||||||
|
A lot of sudo commands even in the root path:
|
||||||
|
|
||||||
|
https://github.com/thecodingmachine/docker-images-nodejs/blob/master/utils/docker-entrypoint-as-root.sh
|
||||||
|
|
||||||
|
"fixed" by running as uid 0 and running the entrypoints in container
|
||||||
|
command.
|
||||||
|
|
||||||
|
Messages pod:
|
||||||
|
|
||||||
|
```
|
||||||
|
[11:38] nb3:workadventure% kubectl logs messages-6d5fd6486b-qgdjn
|
||||||
|
sudo: unable to send audit message
|
||||||
|
sudo: pam_open_session: System error
|
||||||
|
sudo: policy plugin failed session initialization
|
||||||
|
```
|
||||||
|
|
||||||
|
* Also has incorrect volumes
|
||||||
|
* Disable pod/pvc for the moment
|
||||||
|
|
||||||
|
|
||||||
|
### v3: all components work
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
io.kompose.service: messages-claim0
|
||||||
|
name: messages-claim0
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Mi
|
||||||
|
status: {}
|
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
io.kompose.service: messages-claim1
|
||||||
|
name: messages-claim1
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Mi
|
||||||
|
status: {}
|
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
io.kompose.service: messages-claim2
|
||||||
|
name: messages-claim2
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Mi
|
||||||
|
status: {}
|
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
io.kompose.service: messages-claim3
|
||||||
|
name: messages-claim3
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Mi
|
||||||
|
status: {}
|
|
@ -0,0 +1,51 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
io.kompose.service: messages
|
||||||
|
name: messages
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
io.kompose.service: messages
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
io.kompose.service: messages
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- env:
|
||||||
|
- name: STARTUP_COMMAND_1
|
||||||
|
value: yarn install
|
||||||
|
- name: STARTUP_COMMAND_2
|
||||||
|
value: yarn run proto:watch
|
||||||
|
image: thecodingmachine/workadventure-back-base:latest
|
||||||
|
name: messages
|
||||||
|
resources: {}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /usr/src/app
|
||||||
|
name: messages-claim0
|
||||||
|
- mountPath: /usr/src/back
|
||||||
|
name: messages-claim1
|
||||||
|
- mountPath: /usr/src/front
|
||||||
|
name: messages-claim2
|
||||||
|
- mountPath: /usr/src/pusher
|
||||||
|
name: messages-claim3
|
||||||
|
restartPolicy: Always
|
||||||
|
volumes:
|
||||||
|
- name: messages-claim0
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: messages-claim0
|
||||||
|
- name: messages-claim1
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: messages-claim1
|
||||||
|
- name: messages-claim2
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: messages-claim2
|
||||||
|
- name: messages-claim3
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: messages-claim3
|
||||||
|
status: {}
|
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
io.kompose.service: back-claim0
|
||||||
|
name: back-claim0
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Mi
|
||||||
|
status: {}
|
|
@ -0,0 +1,61 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
labels:
|
||||||
|
io.kompose.service: back
|
||||||
|
name: back
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
io.kompose.service: back
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
io.kompose.service: back
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- command:
|
||||||
|
- yarn
|
||||||
|
- run
|
||||||
|
- runprod
|
||||||
|
env:
|
||||||
|
- name: ADMIN_API_TOKEN
|
||||||
|
- name: ALLOW_ARTILLERY
|
||||||
|
value: "true"
|
||||||
|
- name: DEBUG
|
||||||
|
value: '*'
|
||||||
|
- name: JITSI_ISS
|
||||||
|
- name: JITSI_URL
|
||||||
|
- name: MAX_PER_GROUP
|
||||||
|
value: MAX_PER_GROUP
|
||||||
|
- name: NODE_ENV
|
||||||
|
value: development
|
||||||
|
- name: REDIS_HOST
|
||||||
|
value: redis
|
||||||
|
- name: SECRET_JITSI_KEY
|
||||||
|
- name: SECRET_KEY
|
||||||
|
value: yourSecretKey
|
||||||
|
- name: STARTUP_COMMAND_1
|
||||||
|
value: yarn install
|
||||||
|
- name: STARTUP_COMMAND_2
|
||||||
|
value: while [ ! -f /usr/src/app/src/Messages/generated/messages_pb.js ]; do sleep 1; done
|
||||||
|
- name: STORE_VARIABLES_FOR_LOCAL_MAPS
|
||||||
|
value: "true"
|
||||||
|
- name: TURN_STATIC_AUTH_SECRET
|
||||||
|
value: SomeStaticAuthSecret
|
||||||
|
image: thecodingmachine/workadventure-back:v1.6.4
|
||||||
|
name: back
|
||||||
|
resources: {}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /usr/src/app
|
||||||
|
name: back-claim0
|
||||||
|
restartPolicy: Always
|
||||||
|
volumes:
|
||||||
|
- name: back-claim0
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: back-claim0
|
||||||
|
status: {}
|
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
io.kompose.service: front-claim0
|
||||||
|
name: front-claim0
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Mi
|
||||||
|
status: {}
|
|
@ -0,0 +1,70 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
io.kompose.service: front
|
||||||
|
name: front
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
io.kompose.service: front
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
io.kompose.service: front
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- env:
|
||||||
|
- name: DEBUG_MODE
|
||||||
|
- name: DISABLE_ANONYMOUS
|
||||||
|
- name: DISABLE_NOTIFICATIONS
|
||||||
|
- name: HOST
|
||||||
|
value: 0.0.0.0
|
||||||
|
- name: ICON_URL
|
||||||
|
value: //icon.workadventure.localhost
|
||||||
|
- name: JITSI_PRIVATE_MODE
|
||||||
|
- name: JITSI_URL
|
||||||
|
- name: LIVE_RELOAD
|
||||||
|
value: "true"
|
||||||
|
- name: MAX_PER_GROUP
|
||||||
|
- name: MAX_USERNAME_LENGTH
|
||||||
|
- name: NODE_ENV
|
||||||
|
value: development
|
||||||
|
- name: OPID_LOGIN_SCREEN_PROVIDER
|
||||||
|
- name: PUSHER_URL
|
||||||
|
value: //pusher.workadventure.localhost
|
||||||
|
- name: SKIP_RENDER_OPTIMIZATIONS
|
||||||
|
- name: STARTUP_COMMAND_1
|
||||||
|
value: ./templater.sh
|
||||||
|
- name: STARTUP_COMMAND_2
|
||||||
|
value: yarn install
|
||||||
|
- 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
|
||||||
|
- name: TURN_USER
|
||||||
|
- name: UPLOADER_URL
|
||||||
|
value: //uploader.workadventure.localhost
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
image: thecodingmachine/workadventure-front:v1.6.4
|
||||||
|
name: front
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- "./templater.sh; yarn install; node /usr/local/bin/enable_apache_mods.js | bash; node /usr/local/bin/startup_commands.js | bash ; /usr/local/bin/apache-expose-envvars.sh; apache2-foreground"
|
||||||
|
resources: {}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /usr/src/app
|
||||||
|
name: front-claim0
|
||||||
|
restartPolicy: Always
|
||||||
|
volumes:
|
||||||
|
- name: front-claim0
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: front-claim0
|
||||||
|
status: {}
|
|
@ -0,0 +1,25 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
labels:
|
||||||
|
io.kompose.service: icon
|
||||||
|
name: icon
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
io.kompose.service: icon
|
||||||
|
strategy: {}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
io.kompose.service: icon
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: matthiasluedtke/iconserver:v3.13.0
|
||||||
|
name: icon
|
||||||
|
resources: {}
|
||||||
|
restartPolicy: Always
|
||||||
|
status: {}
|
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
io.kompose.service: maps-claim0
|
||||||
|
name: maps-claim0
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Mi
|
||||||
|
status: {}
|
|
@ -0,0 +1,46 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
labels:
|
||||||
|
io.kompose.service: maps
|
||||||
|
name: maps
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
io.kompose.service: maps
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
io.kompose.service: maps
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- env:
|
||||||
|
- name: DEBUG_MODE
|
||||||
|
- name: FRONT_URL
|
||||||
|
value: http://play.workadventure.localhost
|
||||||
|
- name: HOST
|
||||||
|
value: 0.0.0.0
|
||||||
|
- name: NODE_ENV
|
||||||
|
value: development
|
||||||
|
- name: STARTUP_COMMAND_0
|
||||||
|
value: sudo a2enmod headers
|
||||||
|
- name: STARTUP_COMMAND_1
|
||||||
|
value: yarn install
|
||||||
|
- name: STARTUP_COMMAND_2
|
||||||
|
value: yarn run dev &
|
||||||
|
image: thecodingmachine/php:8.1-v4-apache-node12
|
||||||
|
name: maps
|
||||||
|
resources: {}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /var/www/html
|
||||||
|
name: maps-claim0
|
||||||
|
restartPolicy: Always
|
||||||
|
volumes:
|
||||||
|
- name: maps-claim0
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: maps-claim0
|
||||||
|
status: {}
|
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
io.kompose.service: pusher-claim0
|
||||||
|
name: pusher-claim0
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Mi
|
||||||
|
status: {}
|
|
@ -0,0 +1,59 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
labels:
|
||||||
|
io.kompose.service: pusher
|
||||||
|
name: pusher
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
io.kompose.service: pusher
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
io.kompose.service: pusher
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- command:
|
||||||
|
- yarn
|
||||||
|
- run
|
||||||
|
- runprod
|
||||||
|
env:
|
||||||
|
- name: ADMIN_API_TOKEN
|
||||||
|
- name: API_URL
|
||||||
|
value: back:50051
|
||||||
|
- name: DEBUG
|
||||||
|
value: socket:*
|
||||||
|
- name: DISABLE_ANONYMOUS
|
||||||
|
- name: FRONT_URL
|
||||||
|
value: http://play.workadventure.localhost
|
||||||
|
- name: JITSI_ISS
|
||||||
|
- name: JITSI_URL
|
||||||
|
- name: OPID_CLIENT_ID
|
||||||
|
- name: OPID_CLIENT_ISSUER
|
||||||
|
- name: OPID_CLIENT_REDIRECT_URL
|
||||||
|
- name: OPID_CLIENT_SECRET
|
||||||
|
- name: OPID_PROFILE_SCREEN_PROVIDER
|
||||||
|
- name: SECRET_JITSI_KEY
|
||||||
|
- name: SECRET_KEY
|
||||||
|
value: yourSecretKey
|
||||||
|
- name: STARTUP_COMMAND_1
|
||||||
|
value: yarn install
|
||||||
|
- name: STARTUP_COMMAND_2
|
||||||
|
value: while [ ! -f /usr/src/app/src/Messages/generated/messages_pb.js ]; do sleep 1; done
|
||||||
|
image: thecodingmachine/workadventure-pusher:v1.6.4
|
||||||
|
name: pusher
|
||||||
|
resources: {}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /usr/src/app
|
||||||
|
name: pusher-claim0
|
||||||
|
restartPolicy: Always
|
||||||
|
volumes:
|
||||||
|
- name: pusher-claim0
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: pusher-claim0
|
||||||
|
status: {}
|
|
@ -0,0 +1,37 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
io.kompose.service: redis
|
||||||
|
name: redis
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
io.kompose.service: redis
|
||||||
|
strategy: {}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
io.kompose.service: redis
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: redis:6.2.6-alpine
|
||||||
|
name: redis
|
||||||
|
resources: {}
|
||||||
|
ports:
|
||||||
|
- containerPort: 6379
|
||||||
|
restartPolicy: Always
|
||||||
|
status: {}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: redis
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 6379
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
io.kompose.service: redis
|
||||||
|
---
|
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
creationTimestamp: null
|
||||||
|
labels:
|
||||||
|
io.kompose.service: uploader-claim0
|
||||||
|
name: uploader-claim0
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 100Mi
|
||||||
|
status: {}
|
|
@ -0,0 +1,40 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
io.kompose.service: uploader
|
||||||
|
name: uploader
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
io.kompose.service: uploader
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
io.kompose.service: uploader
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- command:
|
||||||
|
- yarn
|
||||||
|
- run
|
||||||
|
- runprod
|
||||||
|
env:
|
||||||
|
- name: DEBUG
|
||||||
|
value: '*'
|
||||||
|
- name: STARTUP_COMMAND_1
|
||||||
|
value: yarn install
|
||||||
|
image: thecodingmachine/workadventure-uploader:v1.6.4
|
||||||
|
name: uploader
|
||||||
|
resources: {}
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /usr/src/app
|
||||||
|
name: uploader-claim0
|
||||||
|
restartPolicy: Always
|
||||||
|
volumes:
|
||||||
|
- name: uploader-claim0
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: uploader-claim0
|
||||||
|
status: {}
|
Loading…
Reference in New Issue