add jicofo
This commit is contained in:
parent
524fae676f
commit
360b4d1357
8 changed files with 130 additions and 3 deletions
2
build.py
2
build.py
|
@ -165,12 +165,12 @@ def lint(project):
|
||||||
@task
|
@task
|
||||||
def inst(project):
|
def inst(project):
|
||||||
package_uberjar(project)
|
package_uberjar(project)
|
||||||
package_native(project)
|
|
||||||
run(
|
run(
|
||||||
f"sudo install -m=755 target/uberjar/{project.name}-standalone.jar /usr/local/bin/{project.name}-standalone.jar",
|
f"sudo install -m=755 target/uberjar/{project.name}-standalone.jar /usr/local/bin/{project.name}-standalone.jar",
|
||||||
shell=True,
|
shell=True,
|
||||||
check=True,
|
check=True,
|
||||||
)
|
)
|
||||||
|
package_native(project)
|
||||||
run(
|
run(
|
||||||
f"sudo install -m=755 target/graalvm/{project.name} /usr/local/bin/{project.name}",
|
f"sudo install -m=755 target/graalvm/{project.name} /usr/local/bin/{project.name}",
|
||||||
shell=True,
|
shell=True,
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
(cm/concat-vec
|
(cm/concat-vec
|
||||||
(ns/generate resolved-config)
|
(ns/generate resolved-config)
|
||||||
(jitsi/prosody-config resolved-config)
|
(jitsi/prosody-config resolved-config)
|
||||||
|
(jitsi/jicofo-config resolved-config)
|
||||||
(jitsi/jitsi-config resolved-config)
|
(jitsi/jitsi-config resolved-config)
|
||||||
(jitsi/jibri-config resolved-config)
|
(jitsi/jibri-config resolved-config)
|
||||||
;; [(jitsi/generate-jvb-service config)
|
;; [(jitsi/generate-jvb-service config)
|
||||||
|
|
|
@ -153,7 +153,7 @@
|
||||||
(cm/replace-all-matching "JITSI_FQDN" fqdn))
|
(cm/replace-all-matching "JITSI_FQDN" fqdn))
|
||||||
(load-and-adjust-namespace "jitsi/prosody-config-default-cm.yaml" namespace)
|
(load-and-adjust-namespace "jitsi/prosody-config-default-cm.yaml" namespace)
|
||||||
(load-and-adjust-namespace "jitsi/prosody-config-envs-cm.yaml" namespace)
|
(load-and-adjust-namespace "jitsi/prosody-config-envs-cm.yaml" namespace)
|
||||||
(load-and-adjust-namespace "jitsi/prosody-config-init-cm.yaml"namespace)
|
(load-and-adjust-namespace "jitsi/prosody-config-init-cm.yaml" namespace)
|
||||||
(load-and-adjust-namespace "jitsi/prosody-config-stateful-set.yaml" namespace)
|
(load-and-adjust-namespace "jitsi/prosody-config-stateful-set.yaml" namespace)
|
||||||
(load-and-adjust-namespace "jitsi/prosody-config-service.yaml" namespace)
|
(load-and-adjust-namespace "jitsi/prosody-config-service.yaml" namespace)
|
||||||
(load-and-adjust-namespace "jitsi/prosody-config-test-deployment.yaml" namespace)]))
|
(load-and-adjust-namespace "jitsi/prosody-config-test-deployment.yaml" namespace)]))
|
||||||
|
@ -174,6 +174,16 @@
|
||||||
(load-and-adjust-namespace "jitsi/prosody-auth-jvb-secret.yaml" namespace)
|
(load-and-adjust-namespace "jitsi/prosody-auth-jvb-secret.yaml" namespace)
|
||||||
(cm/replace-key-value :JVB_AUTH_PASSWORD (b64/encode jvb-auth-password)))]))
|
(cm/replace-key-value :JVB_AUTH_PASSWORD (b64/encode jvb-auth-password)))]))
|
||||||
|
|
||||||
|
(defn-spec jicofo-config cp/map-or-seq?
|
||||||
|
[config config?]
|
||||||
|
(let [{:keys [namespace]} config]
|
||||||
|
[(load-and-adjust-namespace "jitsi/jicofo-config-defaults-cm.yaml" namespace)
|
||||||
|
(->
|
||||||
|
(load-and-adjust-namespace "jitsi/jicofo-config-envs-cm.yaml" namespace)
|
||||||
|
(cm/replace-key-value :XMPP_SERVER (str "prosody." namespace ".svc.cluster.local")))
|
||||||
|
(load-and-adjust-namespace "jitsi/jicofo-config-init-cm.yaml" namespace)
|
||||||
|
(load-and-adjust-namespace "jitsi/jicofo-config-deployment.yaml" namespace)]))
|
||||||
|
|
||||||
(defn-spec jitsi-config cp/map-or-seq?
|
(defn-spec jitsi-config cp/map-or-seq?
|
||||||
[config config?]
|
[config config?]
|
||||||
(let [{:keys [fqdn namespace]} config]
|
(let [{:keys [fqdn namespace]} config]
|
||||||
|
@ -184,7 +194,9 @@
|
||||||
(let [{:keys [fqdn namespace]} config]
|
(let [{:keys [fqdn namespace]} config]
|
||||||
[(load-and-adjust-namespace "jitsi/jitsi-config-serviceaccount.yaml" namespace)
|
[(load-and-adjust-namespace "jitsi/jitsi-config-serviceaccount.yaml" namespace)
|
||||||
(load-and-adjust-namespace "jitsi/jibri-config-default-cm.yaml" namespace)
|
(load-and-adjust-namespace "jitsi/jibri-config-default-cm.yaml" namespace)
|
||||||
|
(->
|
||||||
(load-and-adjust-namespace "jitsi/jibri-config-envs.yaml" namespace)
|
(load-and-adjust-namespace "jitsi/jibri-config-envs.yaml" namespace)
|
||||||
|
(cm/replace-key-value :XMPP_SERVER (str "prosody." namespace ".svc.cluster.local")))
|
||||||
(load-and-adjust-namespace "jitsi/jibri-config-init-cm.yaml" namespace)
|
(load-and-adjust-namespace "jitsi/jibri-config-init-cm.yaml" namespace)
|
||||||
(load-and-adjust-namespace "jitsi/jibri-config-service.yaml" namespace)
|
(load-and-adjust-namespace "jitsi/jibri-config-service.yaml" namespace)
|
||||||
(load-and-adjust-namespace "jitsi/jibri-config-deployment.yaml" namespace)]))
|
(load-and-adjust-namespace "jitsi/jibri-config-deployment.yaml" namespace)]))
|
||||||
|
|
14
src/main/resources/jitsi/jicofo-config-defaults-cm.yaml
Normal file
14
src/main/resources/jitsi/jicofo-config-defaults-cm.yaml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: jitsi-meet-jicofo-defaults
|
||||||
|
namespace: NAMESPACE
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: jitsi-meet
|
||||||
|
app.kubernetes.io/component: jicofo
|
||||||
|
data:
|
||||||
|
jicofo.conf: |
|
||||||
|
# Using jicofo /default/jicofo.conf from container image
|
||||||
|
|
||||||
|
logging.properties: |
|
||||||
|
# Using jicofo /default/logging.properties from container image
|
70
src/main/resources/jitsi/jicofo-config-deployment.yaml
Normal file
70
src/main/resources/jitsi/jicofo-config-deployment.yaml
Normal file
|
@ -0,0 +1,70 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: jitsi-meet-jicofo
|
||||||
|
namespace: NAMESPACE
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: jitsi-meet
|
||||||
|
app.kubernetes.io/component: jicofo
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: jitsi-meet
|
||||||
|
app.kubernetes.io/component: jicofo
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: jitsi-meet
|
||||||
|
app.kubernetes.io/component: jicofo
|
||||||
|
spec:
|
||||||
|
serviceAccountName: jitsi-meet
|
||||||
|
securityContext:
|
||||||
|
{}
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
emptyDir: {}
|
||||||
|
- name: custom-cont-inits
|
||||||
|
configMap:
|
||||||
|
defaultMode: 493
|
||||||
|
name: jitsi-meet-jicofo-cont-inits
|
||||||
|
items:
|
||||||
|
- key: 10-config
|
||||||
|
path: 10-config
|
||||||
|
- name: custom-defaults
|
||||||
|
configMap:
|
||||||
|
name: jitsi-meet-jicofo-defaults
|
||||||
|
items:
|
||||||
|
- key: jicofo.conf
|
||||||
|
path: jicofo.conf
|
||||||
|
- key: logging.properties
|
||||||
|
path: logging.properties
|
||||||
|
containers:
|
||||||
|
- name: jitsi-meet
|
||||||
|
securityContext:
|
||||||
|
{}
|
||||||
|
image: "jitsi/jicofo:stable-9646"
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
envFrom:
|
||||||
|
- secretRef:
|
||||||
|
name: prosody-jicofo
|
||||||
|
- configMapRef:
|
||||||
|
name: prosody-common
|
||||||
|
- configMapRef:
|
||||||
|
name: jitsi-meet-jicofo
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: 8888
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: 8888
|
||||||
|
resources:
|
||||||
|
{}
|
||||||
|
volumeMounts:
|
||||||
|
# to support readOnlyRootFilesystem
|
||||||
|
- name: config
|
||||||
|
mountPath: /config
|
13
src/main/resources/jitsi/jicofo-config-envs-cm.yaml
Normal file
13
src/main/resources/jitsi/jicofo-config-envs-cm.yaml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: jitsi-meet-jicofo
|
||||||
|
namespace: NAMESPACE
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: jitsi-meet
|
||||||
|
app.kubernetes.io/component: jicofo
|
||||||
|
data:
|
||||||
|
JVB_BREWERY_MUC: 'jvbbrewery'
|
||||||
|
XMPP_SERVER: 'prosody.NAMESPACE.svc.cluster.local'
|
||||||
|
JIBRI_BREWERY_MUC: 'jibribrewery'
|
||||||
|
JIBRI_PENDING_TIMEOUT: '90'
|
11
src/main/resources/jitsi/jicofo-config-init-cm.yaml
Normal file
11
src/main/resources/jitsi/jicofo-config-init-cm.yaml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: jitsi-meet-jicofo-cont-inits
|
||||||
|
namespace: NAMESPACE
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: jitsi-meet
|
||||||
|
app.kubernetes.io/component: jicofo
|
||||||
|
data:
|
||||||
|
10-config: |
|
||||||
|
# Using jicofo /etc/cont-init.d/10-config from container image
|
|
@ -138,6 +138,12 @@
|
||||||
:jicofo-auth-password "jicofo-auth"
|
:jicofo-auth-password "jicofo-auth"
|
||||||
:jicofo-component-secret "jicofo-comp"})))))
|
:jicofo-component-secret "jicofo-comp"})))))
|
||||||
|
|
||||||
|
(deftest should-generate-jicofo
|
||||||
|
(is (= 4
|
||||||
|
(count (cut/jicofo-config
|
||||||
|
{:fqdn "xy.xy.xy"
|
||||||
|
:namespace "jitsi"})))))
|
||||||
|
|
||||||
(deftest should-generate-jitsi
|
(deftest should-generate-jitsi
|
||||||
(is (= 1
|
(is (= 1
|
||||||
(count (cut/jitsi-config
|
(count (cut/jitsi-config
|
||||||
|
|
Loading…
Add table
Reference in a new issue