This repository has been archived by the owner on Aug 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Minikube and Helm medea-demo app integration (#34) #41
Merged
Changes from 250 commits
Commits
Show all changes
341 commits
Select commit
Hold shift + click to select a range
06774bb
Handler error send event
Kirguir f601964
draft
alexlapa 0d472b8
Impl transition into failure state for peer
Kirguir 83f139d
implementing transport
alexlapa d3cd4a8
Revert rename ws session
Kirguir 022c980
Merge branch 'master' into add_peer
Kirguir 7eb2837
Ignore connection errors when closing Room
Kirguir 135abd3
handle on close: stop pinger, remove socket
alexlapa 7b48542
move transport to package
alexlapa c2e6a6c
ping_interval, fmt
alexlapa 479dcd4
Merge branch 'master' into discover-jason-api
alexlapa ce6d1f5
update lock
alexlapa 6ef9c74
Merge branch 'master' into bootstrap-web-client
alexlapa a568ba8
fix merge
alexlapa f423025
fix merge
alexlapa 0d26545
copy protocol messages
alexlapa eeccfc7
Merge branch 'bootstrap-web-client' into discover-jason-api
alexlapa f5f653b
Merge branch 'add_peer' into discover-jason-api
alexlapa 22d3724
parse command
alexlapa 319d732
Merge branch 'master' into discover-jason-api
alexlapa 436e3b6
impl drop for transport, send events to subs
alexlapa cf6ea50
transport.send_command()
alexlapa d852df2
Refactoring send message from WsSession to Room use try_send
Kirguir ff94c99
parse event in session
alexlapa 0618206
Add reconnect timeout parameter to config
Kirguir b74656f
properly pass medea events to session
alexlapa e2dd0f3
Merge branch 'master' into discover-jason-api
alexlapa 3db478c
fix merge
alexlapa f40661f
Merge branch 'master' into add_peer
Kirguir 63c9896
create api package
alexlapa fbe6664
fix imports
alexlapa e41a7e2
refactor session.rs
alexlapa 24e2413
move rpc connection to module
alexlapa b0de9a7
minor refactor
alexlapa a8eb8e0
add todos
alexlapa baa65b4
refactor session
alexlapa 20d9859
Merge branch 'add_peer' into discover-jason-api
alexlapa 99c058b
refactor
alexlapa d708a21
Impl handler StartSignaling
Kirguir b498467
error handling and propagation
alexlapa d1f4651
error handling and propagation
alexlapa 81ebfba
error handling and propagation
alexlapa ae869fd
error handling and propagation
alexlapa 7bf48f0
Make linter happy
Kirguir c068a69
TryFrom<&MessageEvent> for MedeaEvent, TryFrom<&MessageEvent> for Hea…
alexlapa 5a00dbf
js_val_to_string
alexlapa 785b76b
create websocket wrapper
alexlapa 32df588
refactor
alexlapa dbe5a93
fmt
alexlapa 7d20f08
enable clippy for jason, fix jason lint
alexlapa fdc34c7
add some docs
alexlapa 97246ca
refactor
alexlapa 95baf6f
fix room duplication
alexlapa 27715ec
properly drop Room
alexlapa 2e862e0
websocket close
alexlapa 1f8c6f6
fix msg json representation
alexlapa c90bcf5
properly drop room's process_msg_task
alexlapa 5efee0a
correct drop transport
alexlapa f00b923
watch socket.on_error, track socket state
alexlapa d620dc3
fix cyclic drop
alexlapa eb88542
add event_listener
alexlapa 98862d9
make clippy happy
alexlapa ae6fafa
cleanup debug logs
alexlapa 4a494ff
clippy, cleanup
alexlapa b7a89ad
add some doc
alexlapa bf29c77
remove Handler<Heartbeat> for WsSession
alexlapa e80bec8
fix signaling_test
alexlapa d64d604
transport to rpc
alexlapa db792d8
refactor RpcClient.init
alexlapa 7584324
refactor
alexlapa ad20aa1
refactor
alexlapa bbc6048
refactor
alexlapa 96369c5
impl ser for ClientMsg and ServerMsg
alexlapa 29eb658
add protocol deser, tests, run jason unit tests on make test
alexlapa 41dece5
add protocol from jason
alexlapa b7de721
make clippy happy
alexlapa 92de12d
fix tests
alexlapa b39c735
clippy
alexlapa a83de49
fix event send
alexlapa f349796
Merge branch 'add_peer' into discover-jason-api
alexlapa 9a50956
fix event send
alexlapa e7eacbf
Merge branch 'add_peer' into discover-jason-api
alexlapa f753f25
connect in tests
alexlapa b49eec6
refactor transport.subscribe()
alexlapa 246d395
transport futurization
alexlapa 4af378a
format
alexlapa 965256a
format
alexlapa 0361e30
Impl return socket only if connection success
Kirguir 91e83fd
Impl on_close handler
Kirguir 59623c6
Impl on_close handler for RpcClient
Kirguir 7cd3ff1
Impl on_message handler for RpcClient
Kirguir 6002e2d
Create protocol package
Kirguir 508796e
add MediaManager, Stream, MediaCaps
alexlapa e99f6c6
MediaManager
alexlapa 6c0bca3
Impl MemberMessage and RoomMessage for in and out messages in Room
Kirguir 9f2c57a
add Callback wrapper
alexlapa 9454b0f
Impl ServerMessage for input messages in WebMessage
Kirguir fe390a7
Merge branch 'master' into discover-jason-api
Kirguir ca1feaf
Fix merge
Kirguir 2671262
Add docs
Kirguir 76c660f
Fix docs
Kirguir abf3d48
Remove api::client::protocol
Kirguir c865f2d
store Stream instead of tracks, play local video
alexlapa ed182b1
Merge branch 'discover-jason-api' into jason-media-management
alexlapa 7e23542
fix merge
alexlapa e9b3bed
refactor
alexlapa c50bd4e
fix lint errors
alexlapa c684866
Merge branch 'discover-jason-api' into jason-media-management
alexlapa a511d43
refactor to use weak links in external handles, implementing RTCPeerC…
alexlapa 09e205c
add_stream
alexlapa 1dab5d2
Merge branch 'master' into discover-jason-api
alexlapa c6dbd62
fix merge
alexlapa df15e79
Merge branch 'discover-jason-api' into jason-media-management
alexlapa 44e7fbf
handle IceCandidateDiscovered
alexlapa a1bc6d7
fix lint
alexlapa 2872902
handle PeersRemoved
alexlapa 5da5b86
handle SpdAnswerMade
alexlapa fd4c1ee
use weak link in RoomHandle
alexlapa ecb6690
add on_ice_candidate callback
alexlapa 7453894
Merge branch 'discover-jason-api' into jason-media-management
alexlapa 3421de3
fix merge
alexlapa 68ec5cb
implementing on_peer_created
alexlapa 29c89e4
refactor, extend docs
alexlapa 0f51c6d
refactor
alexlapa d65e2f5
Merge branch 'discover-jason-api' into jason-media-management
alexlapa 5ba6efb
fix merge
alexlapa dfa2467
refactor
alexlapa 693007c
implementing on_peer_created
alexlapa a01da0d
fmt
alexlapa 1ce1568
Merge branch 'discover-jason-api' into jason-media-management
alexlapa 78070e7
implementing on_peer_created
alexlapa 0a34eef
parse tracks
alexlapa 09d296d
implementing sigalling
alexlapa e92b82e
implementing on_peer_created
alexlapa 3729019
add conenctionhandler, emit on_local_stream, setup peer=>room messaging
alexlapa d415c0a
implementing on_remote_track, rework test client to use transceivers
alexlapa 7f9af39
add mids to signaling
alexlapa c059f7f
fix tests
alexlapa a5c6549
fix lint
alexlapa 6003a67
formatting deps
alexlapa da94941
formatting deps
alexlapa 607414f
adding docs
alexlapa 2c0468e
fix merge
alexlapa 937a089
(cherry picked from commit 0c8a3aa585f703794ed589b761fbf41766249b89)
alexlapa 7f75241
Merge branch 'cherry' into jason-media-management
alexlapa 1b5a30a
fix merge
alexlapa 7cf98c1
fix merge
alexlapa b06c40c
Merge branch 'cherry' into jason-media-management
alexlapa f8e9be9
fix merge
alexlapa 00b29aa
Merge branch 'master' into jason-media-management
alexlapa b1b366b
fix merge
alexlapa dbfc982
fix deps locks cause rand broke again :(
alexlapa 5fc03e8
fix tests
alexlapa 4f922b4
documentation, refactor callbacks
alexlapa b374022
documentation
alexlapa a8e0d8b
documentation, refactor
alexlapa 1eaa06b
documentation, refactor
alexlapa 893749f
refactor
alexlapa c8b83d0
Merge branch 'master' into jason-media-management
alexlapa 9ec0902
fix merge
alexlapa 8503802
refactor
alexlapa 8c7a826
refactor
alexlapa 968d7f1
refactor
alexlapa ba7c847
refactor
alexlapa 6400c66
add ice servers, decompose peer, clippy
alexlapa 122731f
refactor
alexlapa 9b95541
refactor
alexlapa 9da4dbd
refactor
alexlapa 78aba98
documentation
alexlapa 91943d6
cleanup rpc connection on connection_established err
alexlapa 86e6f91
fix race
alexlapa da85646
refactor
alexlapa d75eaca
refactor
alexlapa 0fef592
Merge branch 'master' into jason-media-management
alexlapa 1c93c72
merge
alexlapa f0c9cb7
refactor
alexlapa 951e8c3
refactor
alexlapa d0ee404
refactor
alexlapa a34f535
minor fixes
alexlapa 557b1b8
fix
alexlapa 1b74b81
refcator transceivers management
alexlapa 20f2ad9
impl from<str> && from<String> for wasmerr
alexlapa 5774e18
refactoring transceivers management
alexlapa 3547dd2
docs, refactor
alexlapa d882059
remove some debug
alexlapa b5f680e
refactor
alexlapa 5647ada
refactor transceivers management
alexlapa 21c7866
add InnerMediaConnections
alexlapa 450117c
add RtcPeerConnection wrapper
alexlapa 2a72a91
refactor
alexlapa 778d70a
add InnerPeerConnection, on_ice_candidate, on_track
alexlapa 1541a80
rearrange packages
alexlapa 10c5106
fix memory leak
alexlapa 95b31a0
fix tests
alexlapa 78b74a4
update client api rfc
alexlapa e24f7e5
add TODO
alexlapa 95ca265
refactor, use pub+pub in demo
alexlapa f00dd56
docs
alexlapa fcf9287
fix possible race with get_stream()
alexlapa bc251cb
docs
alexlapa b845e82
add `crate` param to `make docs`
alexlapa 6cbf95f
add docs
alexlapa 06f0e12
refactor server and components bootstrap to use future
alexlapa 293b42b
use 1=>1 in tests and 1<=>1 in dev
alexlapa 88199c2
Revert unnecessary changes and code style corrections
tyranron b68f0b4
Correct Makefile changes
tyranron 135ce32
Refactor jason::utils
tyranron 1fe6143
Corrections in jason crate
tyranron 774b966
creating demo
alexlapa 31fdd4d
creating demo
alexlapa 8b7b340
Merge branch 'master' into p2p-demo
alexlapa 6e07828
fmt
alexlapa cbbda3c
dockerize yarn, docker.build.demo
alexlapa 27b1ee3
configure nginx to use wasm
alexlapa 09dd88d
impl demo, docker-compose, make publish.jason
alexlapa 7c55e01
impl demo, docker-compose
alexlapa 51e0890
derive Clone for PeerStateMachine, Arc<TurnAuthService> in Participan…
alexlapa 55fbedd
dont clone peers, some room management in demo client
alexlapa 4e8e12e
make up.demo
alexlapa e9f5d85
fix tests
alexlapa 2612892
reread
alexlapa fcccc80
reread
alexlapa 0263451
Arc<Box<dyn _>> to Arc<dyn _>, increase logger buffer and OverflowStr…
alexlapa 045a2f0
makefile: helm.init, helm.build, helm.dep, helm.up, helm.down, helm.l…
alexlapa e76d36f
Merge branch 'master' into 34-helm
alexlapa 69aa048
makefile, medea-demo templates
alexlapa 7f8f4a7
add config map, coturn, redis to medea-deployment
alexlapa 0884195
makefile
alexlapa ffc2777
add tls
alexlapa 1c2a23e
add tls
alexlapa 686cfbf
parse medea url from location in demo, some naming changes in charts
alexlapa 280d59c
values.yml
alexlapa 940afa0
add tls section to values.yml
alexlapa c324788
build config map from files
alexlapa 1df657c
oops
alexlapa 6446209
pass config file to medea container
alexlapa c088ec9
pass medea conf file as env var
alexlapa 93f5afd
reread
alexlapa 5d8dbaf
Refactor Helm chart
tyranron 57a2858
Move chart to demo dir
tyranron 218b116
Correct Docker Compose env
tyranron 4ff3e6f
Refactor Makefile
tyranron f3287bf
Refactor Makefile
tyranron 3f42504
Impl Helm releasing
tyranron c3245f8
Impl publishing Helm chart to GitHub Pages
tyranron b2d1bab
Correct env vars
tyranron aea5ef6
Impl deployment to staging
tyranron b609928
Correct TURN IP for staging
tyranron 0714d3f
Fix Redis DB arg evaluation for Coturn in Helm chart
tyranron 7715904
Add ability to specify external_ip explicitly for Coturn in Helm chart
tyranron File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v1 | ||
name: medea-demo | ||
version: 0.0.1 | ||
appVersion: 0.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
[server] | ||
# IP address to bind HTTP server to. | ||
bind_ip = "0.0.0.0" | ||
|
||
# Port to bind HTTP server to. | ||
bind_port = 8080 | ||
|
||
|
||
|
||
|
||
[rpc] | ||
# Duration, after which remote RPC client will be considered idle if no | ||
# heartbeat messages received. | ||
idle_timeout = "10s" | ||
|
||
# Duration, after which the server deletes the client session if | ||
# the remote RPC client does not reconnect after it is idle. | ||
reconnect_timeout = "10s" | ||
|
||
|
||
|
||
|
||
[turn] | ||
# Turn server IP address. | ||
ip = "127.0.0.1" | ||
|
||
# Turn server port. | ||
port = 3478 | ||
|
||
# Static user on Turn server. | ||
user = "USER" | ||
|
||
# Static user password on Turn server. | ||
pass = "PASS" | ||
|
||
[turn.db.redis] | ||
# Host of Coturn's Redis database. | ||
host = "127.0.0.1" | ||
|
||
# Port of Coturn's Redis database for client connections. | ||
port = 6379 | ||
|
||
# Password to connect to Coturn's Redis database with. | ||
pass = "turn" | ||
|
||
# Number of Coturn's database in Redis. | ||
db_number = 0 | ||
|
||
# Timeout for establishing connection with Coturn's Redis database. | ||
connection_timeout = "5s" | ||
|
||
|
||
|
||
|
||
[log] | ||
# Maximum allowed level of application log entries. | ||
# | ||
# Possible values: | ||
# "OFF", "CRITICAL", "ERROR", "WARN", "INFO", "DEBUG", "TRACE" | ||
level = "DEBUG" | ||
|
||
|
||
|
||
|
||
[shutdown] | ||
# Maximum duration given to shutdown the whole application gracefully. | ||
timeout = "5s" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
requirepass turn | ||
timeout 0 | ||
tcp-keepalive 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
lt-cred-mech | ||
fingerprint | ||
no-cli | ||
no-tls | ||
no-dtls | ||
realm=medea | ||
redis-userdb="ip=127.0.0.1 port=6379 dbname=0 password=turn" | ||
user=USER:PASS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
{{- range $i, $host := .Values.ingress.hosts }} | ||
--- | ||
kind: Ingress | ||
apiVersion: extensions/v1beta1 | ||
metadata: | ||
name: webclient.{{ $host }} | ||
spec: | ||
{{- if $.Values.ingress.tls.enabled }} | ||
tls: | ||
- hosts: | ||
- {{ $host | quote }} | ||
- {{ printf "www.%s" $host | quote }} | ||
secretName: medea-demo-cert | ||
{{- end }} | ||
rules: | ||
- host: {{ $host | quote }} | ||
http: | ||
paths: | ||
- path: /ws | ||
backend: | ||
serviceName: medea | ||
servicePort: http | ||
- path: / | ||
backend: | ||
serviceName: webclient | ||
servicePort: http | ||
- host: {{ printf "www.%s" $host | quote }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no sense to consider |
||
http: | ||
paths: | ||
- path: /ws | ||
backend: | ||
serviceName: medea | ||
servicePort: http | ||
- path: / | ||
backend: | ||
serviceName: webclient | ||
servicePort: http | ||
{{- end }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
data: | ||
redis.conf: | | ||
{{- tpl (.Files.Get "conf/redis.conf") . | nindent 4 }} | ||
coturn.turnserver.conf: | | ||
{{- tpl (.Files.Get "conf/turnserver.conf") . | nindent 4 }} | ||
medea.toml: | | ||
{{- tpl (.Files.Get "conf/medea.toml") . | nindent 4 }} | ||
kind: ConfigMap | ||
metadata: | ||
name: medea.config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
kind: Deployment | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: medea | ||
labels: | ||
app: medea | ||
tier: backend | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: medea | ||
tier: backend | ||
template: | ||
spec: | ||
hostNetwork: true | ||
containers: | ||
- name: medea | ||
image: "{{ $.Values.medea.image.repository }}:{{ $.Values.medea.image.tag }}" | ||
imagePullPolicy: {{ $.Values.medea.image.pullPolicy }} | ||
env: | ||
- name: MEDEA_CONF | ||
value: '/etc/medea.toml' | ||
ports: | ||
- name: medea-http | ||
containerPort: 8080 | ||
volumeMounts: | ||
- name: config | ||
subPath: medea.toml | ||
mountPath: /etc/medea.toml | ||
readOnly: true | ||
- name: coturn-db | ||
image: redis:alpine | ||
imagePullPolicy: IfNotPresent | ||
args: ['redis-server', '/etc/redis.conf'] | ||
volumeMounts: | ||
- name: config | ||
subPath: redis.conf | ||
mountPath: /etc/redis.conf | ||
readOnly: true | ||
livenessProbe: | ||
exec: | ||
command: ['redis-cli', 'ping'] | ||
initialDelaySeconds: 30 | ||
readinessProbe: | ||
exec: | ||
command: ['redis-cli', 'ping'] | ||
initialDelaySeconds: 5 | ||
- name: coturn | ||
image: instrumentisto/coturn:4.5 | ||
imagePullPolicy: Always | ||
args: | ||
- --verbose | ||
- --log-file=stdout | ||
ports: | ||
- name: turn | ||
containerPort: 3478 | ||
protocol: TCP | ||
- name: turn-udp | ||
containerPort: 3478 | ||
protocol: UDP | ||
volumeMounts: | ||
- name: config | ||
subPath: coturn.turnserver.conf | ||
mountPath: /etc/coturn/turnserver.conf | ||
readOnly: true | ||
- name: coturn-data | ||
mountPath: /var/lib/coturn | ||
volumes: | ||
- name: config | ||
configMap: | ||
name: medea.config | ||
- name: coturn-data | ||
emptyDir: {} | ||
metadata: | ||
labels: | ||
app: medea | ||
tier: backend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: medea | ||
labels: | ||
app: medea | ||
tier: backend | ||
spec: | ||
selector: | ||
app: medea | ||
tier: backend | ||
ports: | ||
- name: http | ||
port: 80 | ||
targetPort: 8080 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexlapa Helm mandatory labels and injectable annotations are missing. They should be present in every chart.
See: https://helm.sh/docs/chart_best_practices/#labels-and-annotations