-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update docs installation (#343)
- Loading branch information
Showing
11 changed files
with
99 additions
and
120 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Atm0s Media Server | ||
|
||
A decentralized media server designed to handle media streaming on a global scale, making it suitable for large-scale applications but with minimal cost. | ||
|
||
It is developed by 8xFF, a group of independent developers who are passionate about building a new generation of media server and network infrastructure with decentralization in mind. While we have received support from various companies and individuals, we are not affiliated with any specific company. 8xFF is a community-driven project, and we welcome anyone interested in contributing to join us. | ||
|
||
For a deep dive into the technical aspects of network architecture, please refer to our [Smart-Routing](https://github.com/8xFF/atm0s-sdn/blob/master/docs/smart_routing.md) | ||
|
||
[<img src="https://img.youtube.com/vi/QF8ZJq9xuSU/hqdefault.jpg" | ||
/>](https://www.youtube.com/embed/QF8ZJq9xuSU) | ||
|
||
(Above is a demo video of the version used by Bluesea Network) |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Kubernetes | ||
# Kubernetes (outdate, update needed) | ||
|
||
You can install into kubernetes cluster by Helm chart | ||
|
||
|
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 |
---|---|---|
|
@@ -7,8 +7,10 @@ Limitations: maximum 256 nodes in the same zone. | |
|
||
The cluster has the following nodes: | ||
|
||
- Gateway nodes | ||
- Media server nodes (WebRTC, SIP or RTMP depending on your needs) | ||
- Console node: manage panel and act as a seed node for bootstrapping other nodes | ||
- Gateway nodes: route signaling request into correct media node | ||
- Media server nodes: handling media transport like WebRTC, RTP, RTMP ... | ||
- Connector node: logging, hooks, record uri signer | ||
|
||
In this mode, the gateway will route requests to the best node based on the load, and some users in the same room may be routed to different media server nodes. | ||
|
||
|
@@ -27,145 +29,105 @@ Example we have a node index rules like: | |
|
||
| Node type | Index range | | ||
| --------- | ------------ | | ||
| Gateway | [0; 10) | | ||
| SIP | [10; 60) | | ||
| RTMP | [60; 90) | | ||
| Connector | [90; 100) | | ||
| WebRTC | [100 to 255] | | ||
| Console | [0; 10) | | ||
| Gateway | [10; 20) | | ||
| Connector | [20; 30) | | ||
| Media | [100 to 255] | | ||
|
||
## Deploy some gateway nodes | ||
|
||
First pick index for your gateway nodes, for example 1 to 10 is for gateway nodes. | ||
## Deploy a console nodes | ||
|
||
Node1: | ||
Console node will expose at least 1 tcp port and 1 udp port | ||
|
||
```bash | ||
docker run -d --name atm0s-media-gateway-1 \ | ||
--net=host ghcr.io/8xff/atm0s-media-gateway:master \ | ||
--http-port=8080 \ | ||
--sdn-port=10010 \ | ||
--zone-index=1 \ | ||
--secret=insecure \ | ||
gateway | ||
``` | ||
|
||
After node1 started it will print out the node address like `10@/ip4/192.168.1.10/udp/10010/ip4/192.168.1.10/tcp/10010`, you can use it as a seed node for other nodes. | ||
|
||
```bash | ||
docker run -d --name atm0s-media-gateway-1 \ | ||
--net=host ghcr.io/8xff/atm0s-media-gateway:master \ | ||
--http-port=8080 \ | ||
--zone-index=2 \ | ||
--secret=insecure \ | ||
--seeds FIRST_GATEWAY_ADDR \ | ||
gateway | ||
docker run -d --name main-console --net=host ghcr.io/8xff/atm0s-media-gateway:master \ | ||
--secret secr3t \ | ||
--node-id 0 \ | ||
--sdn-port 10000 \ | ||
--sdn-zone 0 \ | ||
--http-port 8080 \ | ||
console | ||
``` | ||
|
||
## Deploy some media webrtc nodes | ||
|
||
If you need WebRTC, Whip or Whep you need deploy some webrtc nodes, select index for your webrtc nodes, for example 100 to 255 is for webrtc nodes. | ||
After node 0 started it will print out the node address like `0@/ip4/127.0.0.1/udp/10000`, you can use it as a seed node for other nodes. | ||
The console node also have simple UI at `http://IP:8080`, you can login with above secret: `secr3t` | ||
|
||
WebRTC 1: | ||
![alt text](console_screen.png) | ||
![alt text](console_screen2.png) | ||
|
||
```bash | ||
docker run -d --name atm0s-media-gateway-1 \ | ||
--net=host ghcr.io/8xff/atm0s-media-gateway:master \ | ||
--zone-index=100 \ | ||
--secret=insecure \ | ||
--seeds FIRST_GATEWAY_ADDR \ | ||
webrtc | ||
``` | ||
## Deploy some gateway nodes | ||
|
||
WebRTC 2: | ||
Gateway node will expose at least 1 tcp port and 1 udp port | ||
|
||
```bash | ||
docker run -d --name atm0s-media-gateway-1 \ | ||
--net=host ghcr.io/8xff/atm0s-media-gateway:master \ | ||
--zone-index=101 \ | ||
--secret=insecure \ | ||
--seeds FIRST_GATEWAY_ADDR \ | ||
webrtc | ||
``` | ||
|
||
## Deploy some media sip nodes | ||
|
||
If you need SIP, you need deploy some sip nodes, select index for your sip nodes, for example 10 to 60 is for sip nodes. | ||
|
||
SIP 1: | ||
|
||
```bash | ||
docker run -d --name atm0s-media-gateway-1 \ | ||
--net=host ghcr.io/8xff/atm0s-media-gateway:master \ | ||
--zone-index=10 \ | ||
--secret=insecure \ | ||
--seeds FIRST_GATEWAY_ADDR \ | ||
sip \ | ||
--addr SERVER_IP:5060 | ||
docker run -d --name main-console --net=host ghcr.io/8xff/atm0s-media-gateway:master \ | ||
--secret secr3t \ | ||
--node-id 10 \ | ||
--sdn-port 10010 \ | ||
--sdn-zone 0 \ | ||
--http-port 3000 \ | ||
--seed 0@/ip4/192.168.1.10/udp/10010 \ | ||
gateway | ||
``` | ||
|
||
SIP 1: | ||
|
||
```bash | ||
docker run -d --name atm0s-media-gateway-1 \ | ||
--net=host ghcr.io/8xff/atm0s-media-gateway:master \ | ||
--zone-index=11 \ | ||
--secret=insecure \ | ||
--seeds FIRST_GATEWAY_ADDR \ | ||
sip \ | ||
--addr SERVER_IP:5060 | ||
``` | ||
|
||
## Deploy some media rtmp nodes | ||
|
||
If you need RTMP, you need deploy some rtmp nodes, select index for your rtmp nodes, for example 60 to 100 is for rtmp nodes. | ||
|
||
Rtmp 1: | ||
|
||
```bash | ||
docker run -d --name atm0s-media-gateway-1 \ | ||
--net=host ghcr.io/8xff/atm0s-media-gateway:master \ | ||
--zone-index=60 \ | ||
--secret=insecure \ | ||
--seeds FIRST_GATEWAY_ADDR \ | ||
sip \ | ||
--addr SERVER_IP:5060 | ||
docker run -d --name main-console --net=host ghcr.io/8xff/atm0s-media-gateway:master \ | ||
--secret secr3t \ | ||
--node-id 11 \ | ||
--sdn-port 10011 \ | ||
--sdn-zone 0 \ | ||
--http-port 3001 \ | ||
--seed 0@/ip4/192.168.1.10/udp/10011 \ | ||
gateway | ||
``` | ||
|
||
Rtmp 2: | ||
After gateway nodes started, it will print out the node address like: `10@/ip4/127.0.0.1/udp/10010` and `11@/ip4/127.0.0.1/udp/10011`, the address is used as a seed address for media and connector nodes | ||
|
||
```bash | ||
docker run -d --name atm0s-media-gateway-1 \ | ||
--net=host ghcr.io/8xff/atm0s-media-gateway:master \ | ||
--zone-index=60 \ | ||
--secret=insecure \ | ||
--seeds FIRST_GATEWAY_ADDR \ | ||
sip \ | ||
--addr SERVER_IP:5060 | ||
``` | ||
After started gateway node also expose openapi ui for better integrating: | ||
|
||
## Deploy some connector nodes | ||
|
||
If you need RTMP, you need deploy some rtmp nodes, select index for your rtmp nodes, for example 60 to 100 is for rtmp nodes. | ||
|
||
Connector 1: | ||
We need separated connector node which take care store logging data and response signed s3 uri for storing record file. | ||
In default it will store data inside a sqlite file. For config other you can provide db-uri like `protocol://username:password@host/database`, with protocol is: `sqlite`, `mysql`, `postgres` | ||
|
||
```bash | ||
docker run -d --name atm0s-media-gateway-1 \ | ||
--net=host ghcr.io/8xff/atm0s-media-gateway:master \ | ||
--zone-index=60 \ | ||
--secret=insecure \ | ||
--seeds FIRST_GATEWAY_ADDR \ | ||
docker run -d --name main-console --net=host ghcr.io/8xff/atm0s-media-gateway:master \ | ||
--secret secr3t \ | ||
--node-id 30 \ | ||
--sdn-port 10030 \ | ||
--sdn-zone 0 \ | ||
--seed 10@/ip4/127.0.0.1/udp/10010 \ | ||
--seed 11@/ip4/127.0.0.1/udp/10011 \ | ||
connector \ | ||
--mq-uri nats://NATS_IP:4222 | ||
--s3-uri "http://minioadmin:[email protected]:9000/record" | ||
``` | ||
|
||
## Monitoring | ||
|
||
Each cluster nodes will expose a dashboard and prometheus metrics, you can use it to monitor your cluster. | ||
## Deploy some media nodes | ||
|
||
Example bellow is gateway node dashboard: `gateway_url/dashboard/` | ||
```bash | ||
docker run -d --name main-console --net=host ghcr.io/8xff/atm0s-media-gateway:master \ | ||
--secret secr3t \ | ||
--node-id 11 \ | ||
--sdn-port 10011 \ | ||
--sdn-zone 0 \ | ||
--http-port 3001 \ | ||
--seed 10@/ip4/127.0.0.1/udp/10010 \ | ||
--seed 11@/ip4/127.0.0.1/udp/10011 \ | ||
media \ | ||
--allow-private-ip | ||
``` | ||
|
||
![Monitoring](../../imgs/demo-monitor.png) | ||
```bash | ||
docker run -d --name main-console --net=host ghcr.io/8xff/atm0s-media-gateway:master \ | ||
--secret secr3t \ | ||
--node-id 12 \ | ||
--sdn-port 10011 \ | ||
--sdn-zone 0 \ | ||
--http-port 3001 \ | ||
--seed 10@/ip4/127.0.0.1/udp/10010 \ | ||
--seed 11@/ip4/127.0.0.1/udp/10011 \ | ||
media \ | ||
--allow-private-ip | ||
``` | ||
|
||
## Testing your cluster | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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