Kurento Media Server - chatforyou-io/ChatForYou.io-back GitHub Wiki

μΏ λ Œν†  λ―Έλ””μ–΄ μ„œλ²„

  • k8s 에 μΏ λ Œν†  λ―Έλ””μ–΄ μ„œλ²„ 배포 방법에 λŒ€ν•œ μ„€λͺ…μž…λ‹ˆλ‹€.
  • λ””ν”Œλ‘œμ΄λ¨ΌνŠΈ νƒ€μž…μ˜ yaml 둜 μž‘μ„±ν•˜μ˜€μŠ΅λ‹ˆλ‹€.

μ£Όμ˜μ‚¬ν•­

  • μ•„λž˜ λ””ν”Œλ‘œμ΄λ¨ΌνŠΈμ—μ„œ webrtc-config λŠ” kurento-media-server 의 μ£Όμš” μ„€μ •νŒŒμΌμž…λ‹ˆλ‹€.
  • λ°˜λ“œμ‹œ 본인 ν™˜κ²½μ— 맞게 μˆ˜μ • ν›„ configmap 으둜 λ§Œλ“€μ–΄ μΆ”κ°€ν•˜μ—¬ λ„£μ–΄μ£Όμ–΄μ•Ό ν•©λ‹ˆλ‹€.
apiVersion: apps/v1
kind: Deployment
metadata:
  name: kurento
  namespace: kurento-media-server
spec:
  replicas: 2
  selector:
    matchLabels:
      app: kurento
  template:
    metadata:
      labels:
        app: kurento
    spec:
      containers:
        - name: kurento
          image: kurento/kurento-media-server
          ports:
            - containerPort: 8888
              protocol: TCP
          volumeMounts:
            - name: config-volume
              mountPath: /etc/kurento/modules/kurento/WebRtcEndpoint.conf.ini
              subPath: WebRtcEndpoint.conf.ini
          imagePullPolicy: Always
      volumes:
        - name: config-volume
          configMap:
            name: webrtc-config
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
      dnsPolicy: ClusterFirst
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%
      maxSurge: 25%
  revisionHistoryLimit: 10
  progressDeadlineSeconds: 600

webrtc-config

  • WebRtcEndpoint.conf.ini 의 λͺ¨λ“  λ‚΄μš©μ„ μˆ˜μ •ν•  ν•„μš”λŠ” μ—†μœΌλ©°, κ°„λ‹¨ν•˜κ²ŒλŠ” μ•„λž˜ 두 λΆ€λΆ„λ§Œ μˆ˜μ •ν•΄λ„ λ™μž‘ν•  수 μžˆμŠ΅λ‹ˆλ‹€.
;; TURN server URL.
		;;
		;; When STUN is not enough to open connections through some NAT firewalls,
		;; using TURN is the remaining alternative.
		;;
		;; You don't need to configure both STUN and TURN, because TURN already includes
		;; STUN functionality.
		;;
		;; The provided URL should follow one of these formats:
		;;
		;;   * user:password@ipaddress:port
		;;   * user:password@ipaddress:port?transport=[udp|tcp|tls]
		;;
		;; <ipaddress> MUST be an IP address; domain names are NOT supported.
		;; <transport> is OPTIONAL. Possible values: udp, tcp, tls. Default: udp.
		;;
		;; You need to use a well-working TURN server. Use this to check if it works:
		;; https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/
		;;
		;; From that check, you should get at least one Server-Reflexive Candidate
		;; (type \"srflx\") AND one Relay Candidate (type \"relay\").
		;;
		turnURL={{turn μ„œλ²„ μ£Όμ†Œ}}
		
              ----- μ€‘λž΅ -----
		
		;; External IPv4 and IPv6 addresses of the media server.
		;;
		;; Forces all local IPv4 and/or IPv6 ICE candidates to have the given address.
		;; This is really nothing more than a hack, but it's very effective to force a
		;; public IP address when one is known in advance for the media server. In doing
		;; so, KMS will not need a STUN or TURN server, but remote peers will still be
		;; able to contact it.
		;;
		;; You can try using these settings if KMS is deployed on a publicly accessible
		;; server, without NAT, and with a static public IP address. But if it doesn't
		;; work for you, just go back to configuring a STUN or TURN server for ICE.
		;;
		;; Only set this parameter if you know what you're doing, and you understand
		;; 100% WHY you need it. For the majority of cases, you should just prefer to
		;; configure a STUN or TURN server.
		;;
		;; <externalIPv4> is a single IPv4 address.
		;; <externalIPv6> is a single IPv6 address.
		;;
		externalIPv4={{μ‚¬μš© IP}}
⚠️ **GitHub.com Fallback** ⚠️