how to deploy egress of livekit using helm end to ...
# ask-ai
g
how to deploy egress of livekit using helm end to end ?
t
Thanks for reaching out, Gaurav. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To deploy LiveKit Egress using Helm, follow these steps: 1. Ensure Helm is installed on your machine. 2. Add the LiveKit Helm repository:
helm repo add livekit <https://helm.livekit.io>
3. Create a
values.yaml
file for your deployment, using egress-sample.yaml as a template. Note: Each egress instance can record one room at a time, so either enable autoscaling or set
replicaCount
to be greater than or equal to the number of rooms you’ll need to simultaneously record. 4. Install the Helm chart:
helm install <instance_name> livekit/egress --namespace <namespace> --values values.yaml
5. To update your installation when new versions are released:
Copy code
helm repo update
helm upgrade <instance_name> livekit/egress --namespace <namespace> --values values.yaml
If you need further assistance, feel free to ask! Sources: Self-hosting the Egress Service | LiveKit Docs
g
Now since i have install this, how can i further start the recording ? whats the nexr setup ?
t
After deploying LiveKit Egress using Helm, you can start recording by following these steps: 1. Ensure that LiveKit Egress is properly deployed using the Helm chart as described earlier. 2. Use LiveKit Egress to record rooms or individual tracks from a LiveKit session. Egress supports recording to MP4 files or HLS segments, as well as exporting to livestreaming services via RTMP(s). 3. Optionally, set up Auto Egress to automatically start recording when a room is created. This can simplify the process if you need recordings to start automatically. Note: Each Egress instance can record one room at a time, so ensure you have enabled autoscaling or set
replicaCount
to match the number of rooms you need to record simultaneously. If you need further details or assistance with specific configurations, feel free to ask! Sources: Self-hosting the Egress Service | LiveKit Docs | Egress Overview | LiveKit Docs | Auto Egress | LiveKit Docs
g
how can i set auto recording ?
t
To set up auto recording in LiveKit Egress, you can use the Auto Egress feature, which allows recordings to start automatically when a room is created. Here are some key points: • Auto Egress can be configured to automatically record all tracks to a storage destination like S3 or GCP. • You can also set it up to record each room to HLS on GCP or other supported storage services. • Using the LiveKit API, you can create a
RoomCompositeEgressRequest
to specify room name, layout, encoding preset, and configure segment outputs with upload credentials. For detailed implementation, you may need to refer to the LiveKit documentation or API examples. If you need further assistance, feel free to ask! Sources: Auto Egress | LiveKit Docs | Recording agent sessions | LiveKit Docs
g
there is two way to do recording one is by writing customize code or using the yaml ?
t
Yes, there are generally two approaches to setting up recording in LiveKit Egress: 1. Using YAML Configuration: You can configure recording settings directly in the
values.yaml
file when deploying LiveKit Egress using Helm. This approach is more declarative and suitable for predefined setups. 2. Writing Custom Code: You can use the LiveKit API to programmatically control recording. This method provides more flexibility and allows you to customize recording behavior dynamically based on your application’s requirements. Each method has its use cases, and the choice depends on your specific needs. If you need further clarification or assistance, feel free to ask!
g
Give me Both approach documentation
t
Here is the documentation for both approaches to setting up LiveKit Egress recording: 1. YAML Configuration You can configure LiveKit Egress using a YAML file. Below are the key components: Required Fields: • `api_key`: LiveKit server API key • `api_secret`: LiveKit server API secret • `ws_url`: LiveKit server websocket URL • `redis`: Redis configuration including address, username, password, and database Optional Fields: • `health_port`: Port for health checks • `template_port`: Port for hosting default templates (default: 7980) • `prometheus_port`: Port for collecting Prometheus metrics • `log_level`: Set to debug, info, warn, or error (default: info) • `template_base`: Can be used to host custom templates • `enable_chrome_sandbox`: If true, runs Chrome with sandboxing enabled • `insecure`: Can be used to connect to an insecure websocket Example Configuration:
Copy code
log_level: debug
api_key: your-api-key
api_secret: your-api-secret
ws_url: <ws://192.168.65.2:7880>
insecure: true
redis:
  address: 192.168.65.2:6379
To run the service with this configuration:
Copy code
docker run --rm \
--cap-add SYS_ADMIN \
-e EGRESS_CONFIG_FILE=/out/config.yaml \
-v ~/livekit-egress:/out \
livekit/egress
2. Custom Code For custom code, you can use the LiveKit API to programmatically control recording. This involves creating a
RoomCompositeEgressRequest
to specify room name, layout, encoding preset, and configure segment outputs with upload credentials. This approach provides flexibility for dynamic recording setups. If you need further details or examples for either approach, feel free to ask! Sources: Self-hosting the Egress Service | LiveKit Docs | Egress Overview | LiveKit Docs
g
where can i find the golang SDK code example
t
Unfortunately, I couldn't locate specific Golang SDK code examples for LiveKit Egress in the available documentation. However, the LiveKit Golang SDK does provide API definitions for the EgressClient, which you can use to interact with the Egress service. You may want to check the official LiveKit GitHub repository or documentation for detailed examples. If you need further assistance, feel free to ask!