Skip to content

Commit

Permalink
Merge pull request #19 from red5pro/feature/AUTO-RECORD
Browse files Browse the repository at this point in the history
AUTO-RECORD - add ability to enable disable auto record broadcast str
  • Loading branch information
iolesyk authored Jun 21, 2024
2 parents 638d4bc + b7b5fd0 commit d833164
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ module "red5pro" {
red5pro_cloudstorage_aws_region = "us-west-1" # AWS region for Red5 Pro cloud storage (S3 Bucket)
red5pro_cloudstorage_postprocessor_enable = false # true - enable Red5 Pro server postprocessor, false - disable Red5 Pro server postprocessor (https://www.red5.net/docs/special/cloudstorage-plugin/server-configuration/)
red5pro_cloudstorage_aws_bucket_acl_policy = "public-read" # AWS bucket ACL policy for Red5 Pro cloud storage (S3 Bucket) Example: none, public-read, authenticated-read, private, public-read-write
red5pro_stream_auto_record_enable = false # true - enable Red5 Pro server broadcast stream auto record, false - disable Red5 Pro server broadcast stream auto record
red5pro_coturn_enable = false # true - enable customized Coturn configuration for Red5Pro server, false - disable customized Coturn configuration for Red5Pro server (https://www.red5.net/docs/installation/turn-stun/turnstun/)
red5pro_coturn_address = "stun:1.2.3.4:3478" # Customized coturn address for Red5Pro server (https://www.red5.net/docs/installation/turn-stun/turnstun/)
red5pro_efs_enable = false # enable/disable EFS mount to record streams
Expand Down Expand Up @@ -224,6 +225,7 @@ module "red5pro" {
origin_image_red5pro_cloudstorage_aws_region = "us-west-1" # AWS region for Red5 Pro cloud storage (S3 Bucket)
origin_image_red5pro_cloudstorage_postprocessor_enable = false # true - enable Red5 Pro server postprocessor, false - disable Red5 Pro server postprocessor (https://www.red5.net/docs/special/cloudstorage-plugin/server-configuration/)
origin_image_red5pro_cloudstorage_aws_bucket_acl_policy = "public-read" # AWS bucket ACL policy for Red5 Pro cloud storage (S3 Bucket) Example: none, public-read, authenticated-read, private, public-read-write
origin_image_red5pro_stream_auto_record_enable = false # true - enable Red5 Pro server broadcast stream auto record, false - disable Red5 Pro server broadcast stream auto record
origin_image_red5pro_efs_enable = false # enable/disable EFS mount to record streams
origin_image_red5pro_efs_dns_name = "example.efs.region.amazonaws.com" # EFS DNS name
Expand Down Expand Up @@ -367,6 +369,7 @@ module "red5pro" {
origin_image_red5pro_cloudstorage_aws_region = "us-west-1" # AWS region for Red5 Pro cloud storage (S3 Bucket)
origin_image_red5pro_cloudstorage_postprocessor_enable = false # true - enable Red5 Pro server postprocessor, false - disable Red5 Pro server postprocessor (https://www.red5.net/docs/special/cloudstorage-plugin/server-configuration/)
origin_image_red5pro_cloudstorage_aws_bucket_acl_policy = "public-read" # AWS bucket ACL policy for Red5 Pro cloud storage (S3 Bucket) Example: none, public-read, authenticated-read, private, public-read-write
origin_image_red5pro_stream_auto_record_enable = false # true - enable Red5 Pro server broadcast stream auto record, false - disable Red5 Pro server broadcast stream auto record
origin_image_red5pro_efs_enable = false # enable/disable EFS mount to record streams
origin_image_red5pro_efs_dns_name = "example.efs.region.amazonaws.com" # EFS DNS name
Expand Down
1 change: 1 addition & 0 deletions examples/autoscaling/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ module "red5pro" {
origin_image_red5pro_cloudstorage_aws_region = "us-west-1" # AWS region for Red5 Pro cloud storage (S3 Bucket)
origin_image_red5pro_cloudstorage_postprocessor_enable = false # true - enable Red5 Pro server postprocessor, false - disable Red5 Pro server postprocessor (https://www.red5.net/docs/special/cloudstorage-plugin/server-configuration/)
origin_image_red5pro_cloudstorage_aws_bucket_acl_policy = "public-read" # AWS bucket ACL policy for Red5 Pro cloud storage (S3 Bucket) Example: none, public-read, authenticated-read, private, public-read-write
origin_image_red5pro_stream_auto_record_enable = false # true - enable Red5 Pro server broadcast stream auto record, false - disable Red5 Pro server broadcast stream auto record
origin_image_red5pro_efs_enable = false # enable/disable EFS mount to record streams
origin_image_red5pro_efs_dns_name = "example.efs.region.amazonaws.com" # EFS DNS name

Expand Down
1 change: 1 addition & 0 deletions examples/cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ module "red5pro" {
origin_image_red5pro_cloudstorage_aws_region = "us-west-1" # AWS region for Red5 Pro cloud storage (S3 Bucket)
origin_image_red5pro_cloudstorage_postprocessor_enable = false # true - enable Red5 Pro server postprocessor, false - disable Red5 Pro server postprocessor (https://www.red5.net/docs/special/cloudstorage-plugin/server-configuration/)
origin_image_red5pro_cloudstorage_aws_bucket_acl_policy = "public-read" # AWS bucket ACL policy for Red5 Pro cloud storage (S3 Bucket) Example: none, public-read, authenticated-read, private, public-read-write
origin_image_red5pro_stream_auto_record_enable = false # true - enable Red5 Pro server broadcast stream auto record, false - disable Red5 Pro server broadcast stream auto record
origin_image_red5pro_efs_enable = false # enable/disable EFS mount to record streams
origin_image_red5pro_efs_dns_name = "example.efs.region.amazonaws.com" # EFS DNS name

Expand Down
1 change: 1 addition & 0 deletions examples/single/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ module "red5pro" {
red5pro_cloudstorage_aws_region = "us-west-1" # AWS region for Red5 Pro cloud storage (S3 Bucket)
red5pro_cloudstorage_postprocessor_enable = false # true - enable Red5 Pro server postprocessor, false - disable Red5 Pro server postprocessor (https://www.red5.net/docs/special/cloudstorage-plugin/server-configuration/)
red5pro_cloudstorage_aws_bucket_acl_policy = "public-read" # AWS bucket ACL policy for Red5 Pro cloud storage (S3 Bucket) Example: none, public-read, authenticated-read, private, public-read-write
red5pro_stream_auto_record_enable = false # true - enable Red5 Pro server broadcast stream auto record, false - disable Red5 Pro server broadcast stream auto record
red5pro_coturn_enable = false # true - enable customized Coturn configuration for Red5Pro server, false - disable customized Coturn configuration for Red5Pro server (https://www.red5.net/docs/installation/turn-stun/turnstun/)
red5pro_coturn_address = "stun:1.2.3.4:3478" # Customized coturn address for Red5Pro server (https://www.red5.net/docs/installation/turn-stun/turnstun/)
red5pro_efs_enable = false # enable/disable EFS mount to record streams
Expand Down
3 changes: 3 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ resource "aws_instance" "red5pro_node_origin" {
"export NODE_CLOUDSTORAGE_AWS_REGION='${var.origin_image_red5pro_cloudstorage_aws_region}'",
"export NODE_CLOUDSTORAGE_POSTPROCESSOR_ENABLE='${var.origin_image_red5pro_cloudstorage_postprocessor_enable}'",
"export NODE_CLOUDSTORAGE_AWS_BUCKET_ACL_POLICY='${var.origin_image_red5pro_cloudstorage_aws_bucket_acl_policy}'",
"export NODE_STREAM_AUTO_RECORD_ENABLE='${var.origin_image_red5pro_stream_auto_record_enable}'",
"export NODE_EFS_ENABLE='${var.origin_image_red5pro_efs_enable}'",
"export NODE_EFS_DNS_NAME='${var.origin_image_red5pro_efs_dns_name}'",
"export NODE_EFS_MOUNT_POINT='${var.origin_image_red5pro_efs_mount_point}'",
Expand Down Expand Up @@ -875,6 +876,7 @@ resource "aws_instance" "red5pro_node_transcoder" {
"export NODE_CLOUDSTORAGE_AWS_REGION='${var.transcoder_image_red5pro_cloudstorage_aws_region}'",
"export NODE_CLOUDSTORAGE_POSTPROCESSOR_ENABLE='${var.transcoder_image_red5pro_cloudstorage_postprocessor_enable}'",
"export NODE_CLOUDSTORAGE_AWS_BUCKET_ACL_POLICY='${var.transcoder_image_red5pro_cloudstorage_aws_bucket_acl_policy}'",
"export NODE_STREAM_AUTO_RECORD_ENABLE='${var.transcoder_image_red5pro_stream_auto_record_enable}'",
"export NODE_EFS_ENABLE='${var.transcoder_image_red5pro_efs_enable}'",
"export NODE_EFS_DNS_NAME='${var.transcoder_image_red5pro_efs_dns_name}'",
"export NODE_EFS_MOUNT_POINT='${var.transcoder_image_red5pro_efs_mount_point}'",
Expand Down Expand Up @@ -1041,6 +1043,7 @@ resource "aws_instance" "red5pro_single" {
"export NODE_CLOUDSTORAGE_AWS_REGION='${var.red5pro_cloudstorage_aws_region}'",
"export NODE_CLOUDSTORAGE_POSTPROCESSOR_ENABLE='${var.red5pro_cloudstorage_postprocessor_enable}'",
"export NODE_CLOUDSTORAGE_AWS_BUCKET_ACL_POLICY='${var.red5pro_cloudstorage_aws_bucket_acl_policy}'",
"export NODE_STREAM_AUTO_RECORD_ENABLE='${var.red5pro_stream_auto_record_enable}'",
"export NODE_EFS_ENABLE='${var.red5pro_efs_enable}'",
"export NODE_EFS_DNS_NAME='${var.red5pro_efs_dns_name}'",
"export NODE_EFS_MOUNT_POINT='${var.red5pro_efs_mount_point}'",
Expand Down
11 changes: 11 additions & 0 deletions red5pro-installer/r5p_config_node_apps_plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# NODE_CLOUDSTORAGE_AWS_REGION=us-east-1
# NODE_CLOUDSTORAGE_POSTPROCESSOR_ENABLE=true
# NODE_CLOUDSTORAGE_AWS_BUCKET_ACL_POLICY=public-read # none, public-read, authenticated-read, private, public-read-write
# NODE_STREAM_AUTO_RECORD_ENABLE=true

# NODE_WEBHOOKS_ENABLE=true
# NODE_WEBHOOKS_ENDPOINT="https://test.webhook.app/api/v1/broadcast/webhook"
Expand Down Expand Up @@ -179,6 +180,16 @@ config_node_apps_plugins(){
else
log_d "Red5Pro AWS Cloudstorage plugin (S3) - disable"
fi
### Red5Pro Stream Auto Record
if [[ "$NODE_STREAM_AUTO_RECORD_ENABLE" == "true" ]]; then
log_i "Red5Pro Broadcas Stream Auto Record - enable"

stream_auto_record="broadcaststream.auto.record=.*"
stream_auto_record_new="broadcaststream.auto.record=true"
sed -i -e "s|$stream_auto_record|$stream_auto_record_new|" "$RED5_HOME/conf/red5.properties"
else
log_d "Red5Pro Broadcas Stream Auto Record - disable"
fi
### Red5Pro Restreamer
if [[ "$NODE_RESTREAMER_ENABLE" == "true" ]]; then
log_i "Red5Pro Restreamer - enable"
Expand Down
15 changes: 15 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ variable "red5pro_cloudstorage_aws_bucket_acl_policy" {
type = string
default = "public-read"
}
variable "red5pro_stream_auto_record_enable" {
description = "Red5 Pro server - enable/disable broadcast stream auto record"
type = bool
default = false
}
variable "red5pro_coturn_enable" {
description = "Red5Pro server customized Coturn configuration"
type = bool
Expand Down Expand Up @@ -495,6 +500,11 @@ variable "origin_image_red5pro_cloudstorage_aws_bucket_acl_policy" {
type = string
default = "public-read"
}
variable "origin_image_red5pro_stream_auto_record_enable" {
description = "Origin node image - enable/disable Red5 Pro server broadcast stream auto record"
type = bool
default = false
}
variable "origin_image_red5pro_efs_enable" {
description = "Origin node image enable/disable EFS mount to record streams"
type = bool
Expand Down Expand Up @@ -719,6 +729,11 @@ variable "transcoder_image_red5pro_cloudstorage_aws_bucket_acl_policy" {
type = string
default = "public-read"
}
variable "transcoder_image_red5pro_stream_auto_record_enable" {
description = "Transcoder node image - enable/disable Red5 Pro server broadcast stream auto record"
type = bool
default = false
}
variable "transcoder_image_red5pro_efs_enable" {
description = "Transcoder node image enable/disable EFS mount to record streams"
type = bool
Expand Down

0 comments on commit d833164

Please sign in to comment.