From 78488e6d2a57cb6ade34e9b5a19403be90021577 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 17 Apr 2024 08:59:08 +0300 Subject: [PATCH 01/98] fix json --- install_ant-media-server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_ant-media-server.sh b/install_ant-media-server.sh index 76ad259c..91d8f803 100755 --- a/install_ant-media-server.sh +++ b/install_ant-media-server.sh @@ -25,7 +25,6 @@ RED='\033[0;31m' NC='\033[0m' #version that is being installed. It's get filled below VERSION= -VERSION_NAME=$(curl -s https://antmedia.io/download/latest-version.json | jq -r '.versionName') update_script () { SCRIPT_NAME="$0" @@ -281,6 +280,7 @@ if [ -z "$ANT_MEDIA_SERVER_ZIP_FILE" ]; then echo "Invalid license key. Please check your license key." exit 1 else + VERSION_NAME=$(curl -s https://antmedia.io/download/latest-version.json | jq -r '.versionName') echo "The license key is valid. Downloading the latest version ($VERSION_NAME) of Ant Media Server Enterprise Edition." curl --progress-bar -o ams_enterprise.zip "$check_license" ANT_MEDIA_SERVER_ZIP_FILE="ams_enterprise.zip" From 2852c04616d4f1088c5a26036dc225a4073db787 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 22 Apr 2024 10:15:30 +0300 Subject: [PATCH 02/98] Add the GCP Jinja template for clustering deployment. --- .../antmedia-firewall-template.jinja | 45 ++++++++++++++ .../antmedia-instance-group-template.jinja | 25 ++++++++ .../antmedia-instance-template.jinja | 60 +++++++++++++++++++ .../antmedia-mongodb-template.jinja | 47 +++++++++++++++ .../antmedia-vpc-template.jinja | 33 ++++++++++ gcp-jinja-template/antmedia.jinja | 43 +++++++++++++ gcp-jinja-template/antmedia.yaml | 25 ++++++++ gcp-jinja-template/backend.jinja | 16 +++++ 8 files changed, 294 insertions(+) create mode 100644 gcp-jinja-template/antmedia-firewall-template.jinja create mode 100644 gcp-jinja-template/antmedia-instance-group-template.jinja create mode 100644 gcp-jinja-template/antmedia-instance-template.jinja create mode 100644 gcp-jinja-template/antmedia-mongodb-template.jinja create mode 100644 gcp-jinja-template/antmedia-vpc-template.jinja create mode 100644 gcp-jinja-template/antmedia.jinja create mode 100644 gcp-jinja-template/antmedia.yaml create mode 100644 gcp-jinja-template/backend.jinja diff --git a/gcp-jinja-template/antmedia-firewall-template.jinja b/gcp-jinja-template/antmedia-firewall-template.jinja new file mode 100644 index 00000000..e33e9ec1 --- /dev/null +++ b/gcp-jinja-template/antmedia-firewall-template.jinja @@ -0,0 +1,45 @@ +{# +Copyright 2016 Google Inc. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +#} + +resources: +- type: compute.v1.firewall + name: ams-mongodb-internal + properties: + network: $(ref.antmedia-vpc-network.selfLink) + sourceRanges: + - 10.0.0.0/16 + targetTags: + - antmedia-mongodb + allowed: + - IPProtocol: tcp + ports: + - "27017" + - "22" + +- type: compute.v1.firewall + name: ams-antmedia-external + properties: + network: $(ref.antmedia-vpc-network.selfLink) + sourceRanges: + - 0.0.0.0/0 + targetTags: + - antmedia + allowed: + - IPProtocol: tcp + ports: + - "5080" + - "22" + - "1935" + diff --git a/gcp-jinja-template/antmedia-instance-group-template.jinja b/gcp-jinja-template/antmedia-instance-group-template.jinja new file mode 100644 index 00000000..314cb5aa --- /dev/null +++ b/gcp-jinja-template/antmedia-instance-group-template.jinja @@ -0,0 +1,25 @@ +resources: +- name: origin-instance-group + type: compute.v1.instanceGroupManager + properties: + zone: {{ default_zone }} + targetSize: 1 + baseInstanceName: my-instance + instanceTemplate: projects/{{ env["project"] }}/global/instanceTemplates/ams-origin-template + namedPorts: + - name: http + port: 5080 + +- name: origin-autoscaler + type: compute.v1.autoscaler + properties: + zone: {{ default_zone }} + target: $(ref.origin-instance-group.selfLink) + autoscalingPolicy: + minNumReplicas: 1 + maxNumReplicas: 10 + coolDownPeriodSec: 60 + cpuUtilization: + utilizationTarget: 0.6 + + diff --git a/gcp-jinja-template/antmedia-instance-template.jinja b/gcp-jinja-template/antmedia-instance-template.jinja new file mode 100644 index 00000000..62f8b10c --- /dev/null +++ b/gcp-jinja-template/antmedia-instance-template.jinja @@ -0,0 +1,60 @@ +resources: +- name: ams-origin-template + type: compute.v1.instanceTemplate + properties: + properties: + zone: {{ properties["zone"] }} + machineType: {{ properties["origin_machine_type"] }} + metadata: + items: + - key: startup-script + value: |- + #!/bin/bash + rm -rf /usr/local/antmedia/conf/instanceId + rm -rf /usr/local/antmedia/*.db.* + rm -rf /usr/local/antmedia/*.db + cd /usr/local/antmedia + ./change_server_mode.sh cluster $(ref.{{ env["deployment"] }}-mongodb.networkInterfaces[0].networkIP) + disks: + - deviceName: boot + type: PERSISTENT + boot: true + autoDelete: true + initializeParams: + sourceImage: projects/antmedia-public-385620/global/images/ams-marketplace282 + networkInterfaces: + - network: $(ref.antmedia-vpc-network.selfLink) + subnetwork: $(ref.origin-subnet.selfLink) + accessConfigs: + - name: External NAT + type: ONE_TO_ONE_NAT + +- name: ams-edge-template + type: compute.v1.instanceTemplate + properties: + properties: + zone: {{ properties["zone"] }} + machineType: {{ properties["edge_machine_type"] }} + metadata: + items: + - key: startup-script + value: |- + #!/bin/bash + rm -rf /usr/local/antmedia/conf/instanceId + rm -rf /usr/local/antmedia/*.db.* + rm -rf /usr/local/antmedia/*.db + cd /usr/local/antmedia + ./change_server_mode.sh cluster $(ref.{{ env["deployment"] }}-mongodb.networkInterfaces[0].networkIP) + disks: + - deviceName: boot + type: PERSISTENT + boot: true + autoDelete: true + initializeParams: + sourceImage: projects/antmedia-public-385620/global/images/ams-marketplace282 + networkInterfaces: + - network: $(ref.antmedia-vpc-network.selfLink) + subnetwork: $(ref.edge-subnet.selfLink) + accessConfigs: + - name: External NAT + type: ONE_TO_ONE_NAT diff --git a/gcp-jinja-template/antmedia-mongodb-template.jinja b/gcp-jinja-template/antmedia-mongodb-template.jinja new file mode 100644 index 00000000..2f43a0a2 --- /dev/null +++ b/gcp-jinja-template/antmedia-mongodb-template.jinja @@ -0,0 +1,47 @@ +{# +Copyright 2016 Google Inc. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +#} + +resources: +- type: compute.v1.instance + name: {{ env["deployment"] }}-mongodb + properties: + zone: {{ properties["zone"] }} + machineType: https://www.googleapis.com/compute/v1/projects/{{ env["project"] }}/zones/{{ properties["zone"] }}/machineTypes/{{ properties["machine_type"] }} + metadata: + items: + # For more ways to use startup scripts on an instance, see: + # https://cloud.google.com/compute/docs/startupscript + - key: startup-script + value: | + #!/bin/bash + wget https://raw.githubusercontent.com/ant-media/Scripts/master/install_mongodb.sh + bash ./install_mongodb.sh + disks: + - deviceName: boot + type: PERSISTENT + boot: true + autoDelete: true + initializeParams: + sourceImage: https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/family/ubuntu-2204-lts + networkInterfaces: + - network: $(ref.antmedia-vpc-network.selfLink) + subnetwork: $(ref.origin-subnet.selfLink) + # Access Config required to give the instance a public IP address + accessConfigs: + - name: External NAT + type: ONE_TO_ONE_NAT + tags: + items: + - antmedia-mongodb diff --git a/gcp-jinja-template/antmedia-vpc-template.jinja b/gcp-jinja-template/antmedia-vpc-template.jinja new file mode 100644 index 00000000..2e365253 --- /dev/null +++ b/gcp-jinja-template/antmedia-vpc-template.jinja @@ -0,0 +1,33 @@ +resources: +- name: antmedia-vpc-network + type: compute.v1.network + properties: + region: {{ properties["region"] }} + autoCreateSubnetworks: false + +- name: origin-subnet + type: compute.v1.subnetwork + properties: + ipCidrRange: 10.0.1.0/24 + network: $(ref.antmedia-vpc-network.selfLink) + region: {{ properties["region"] }} + +- name: edge-subnet + type: compute.v1.subnetwork + properties: + ipCidrRange: 10.0.2.0/24 + network: $(ref.antmedia-vpc-network.selfLink) + region: {{ properties["region"] }} + +- name: firewall-rule + type: compute.v1.firewall + properties: + network: $(ref.antmedia-vpc-network.selfLink) + sourceRanges: + - 0.0.0.0/0 + allowed: + - IPProtocol: tcp + ports: + - "80" + - "443" + - "22" diff --git a/gcp-jinja-template/antmedia.jinja b/gcp-jinja-template/antmedia.jinja new file mode 100644 index 00000000..d3d287ea --- /dev/null +++ b/gcp-jinja-template/antmedia.jinja @@ -0,0 +1,43 @@ +{# +Copyright 2016 Google Inc. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +#} + +{% set default_zone = "us-central1-a" %} +{% set default_region = "us-central1" %} +{% set mongodb_machine_type = "e2-standard-2" %} +{% set origin_machine_type = "e2-standard-2" %} +{% set edge_machine_type = "e2-standard-2" %} + + +resources: +- name: antmedia-mongodb + type: antmedia-mongodb-template.jinja + properties: + zone: {{ default_zone }} + machine_type: {{ mongodb_machine_type }} +- name: antmedia-instance + type: antmedia-instance-template.jinja + properties: + zone: {{ default_zone }} + origin_machine_type: {{ origin_machine_type }} + edge_machine_type: {{ edge_machine_type }} +- name: antmedia-firewall + type: antmedia-firewall-template.jinja + properties: + zone: {{ default_zone}} +- name: antmedia-vpc-network + type: antmedia-vpc-template.jinja + properties: + region: {{ default_region}} + autoCreateSubnetworks: false diff --git a/gcp-jinja-template/antmedia.yaml b/gcp-jinja-template/antmedia.yaml new file mode 100644 index 00000000..47faf0b7 --- /dev/null +++ b/gcp-jinja-template/antmedia.yaml @@ -0,0 +1,25 @@ +# Copyright 2016 Google Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +imports: +- path: antmedia-mongodb-template.jinja +- path: antmedia-instance-template.jinja +- path: antmedia-firewall-template.jinja +- path: antmedia-vpc-template.jinja +- path: antmedia.jinja + +resources: +- name: antmedia + type: antmedia.jinja + diff --git a/gcp-jinja-template/backend.jinja b/gcp-jinja-template/backend.jinja new file mode 100644 index 00000000..3f018c9c --- /dev/null +++ b/gcp-jinja-template/backend.jinja @@ -0,0 +1,16 @@ +--- +# Your resource definitions go here under resources key +resources: + - name: my-backend-service # Replace with your desired name + type: compute.v1.backendService # Adjust type based on resource + properties: + portName: http + protocol: HTTP + backend: + group: origin-instance-group # Assuming your instance group name + healthChecks: + - https://www.googleapis.com/compute/v1/healthChecks/default + +# You can add other outputs here if needed +output: + # ... From ec76b41d147ec17855433f741e8ec79012d652f4 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 23 Apr 2024 08:01:16 +0300 Subject: [PATCH 03/98] Add Ubuntu 24.04 support --- install_ant-media-server.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install_ant-media-server.sh b/install_ant-media-server.sh index 91d8f803..655b8a24 100755 --- a/install_ant-media-server.sh +++ b/install_ant-media-server.sh @@ -161,7 +161,7 @@ distro () { os_release="/etc/os-release" if [ -f "$os_release" ]; then . $os_release - msg="We are supporting Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04, Centos 8, Centos 9, RockyLinux 8, RockyLinux 9, AlmaLinux 8 and AlmaLinux 9" + msg="We are supporting Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04, Ubuntu 22.04, Centos 8, Centos 9, RockyLinux 8, RockyLinux 9, AlmaLinux 8 and AlmaLinux 9" if [ "$OTHER_DISTRO" == "true" ]; then echo -e """\n- OpenJDK 11 (openjdk-11-jdk)\n- De-archiver (unzip)\n- Commons Daemon (jsvc)\n- Apache Portable Runtime Library (libapr1)\n- SSL Development Files (libssl-dev)\n- Video Acceleration (VA) API (libva-drm2)\n- Video Acceleration (VA) API - X11 runtime (libva-x11-2)\n- Video Decode and Presentation API Library (libvdpau-dev)\n- Crystal HD Video Decoder Library (libcrystalhd-dev)\n""" read -p 'Are you sure that the above packages are installed? Y/N ' CUSTOM_PACKAGES @@ -182,7 +182,7 @@ distro () { exit 1 fi - if [[ $VERSION_ID != 18.04 ]] && [[ $VERSION_ID != 20.04 ]] && [[ $VERSION_ID != 22.04 ]] && [[ $VERSION_ID != 8* ]] && [[ $VERSION_ID != 9* ]]; then + if [[ $VERSION_ID != 18.04 ]] && [[ $VERSION_ID != 20.04 ]] && [[ $VERSION_ID != 22.04 ]] && [[ $VERSION_ID != 24.04 ]] && [[ $VERSION_ID != 8* ]] && [[ $VERSION_ID != 9* ]]; then echo $msg exit 1 fi From 6a61ed9073d162f3eb933d41bf0925a1b9254f87 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 23 Apr 2024 08:02:21 +0300 Subject: [PATCH 04/98] Update install_ant-media-server.sh --- install_ant-media-server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_ant-media-server.sh b/install_ant-media-server.sh index 655b8a24..164f9c5c 100755 --- a/install_ant-media-server.sh +++ b/install_ant-media-server.sh @@ -161,7 +161,7 @@ distro () { os_release="/etc/os-release" if [ -f "$os_release" ]; then . $os_release - msg="We are supporting Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04, Ubuntu 22.04, Centos 8, Centos 9, RockyLinux 8, RockyLinux 9, AlmaLinux 8 and AlmaLinux 9" + msg="We are supporting Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04, Ubuntu 24.04, Centos 8, Centos 9, RockyLinux 8, RockyLinux 9, AlmaLinux 8 and AlmaLinux 9" if [ "$OTHER_DISTRO" == "true" ]; then echo -e """\n- OpenJDK 11 (openjdk-11-jdk)\n- De-archiver (unzip)\n- Commons Daemon (jsvc)\n- Apache Portable Runtime Library (libapr1)\n- SSL Development Files (libssl-dev)\n- Video Acceleration (VA) API (libva-drm2)\n- Video Acceleration (VA) API - X11 runtime (libva-x11-2)\n- Video Decode and Presentation API Library (libvdpau-dev)\n- Crystal HD Video Decoder Library (libcrystalhd-dev)\n""" read -p 'Are you sure that the above packages are installed? Y/N ' CUSTOM_PACKAGES From f98c9c0471ef5b0aed0fb0351b6792ee8d0c5082 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 23 Apr 2024 08:04:54 +0300 Subject: [PATCH 05/98] Create install-latest-to-ubuntu-24-04.yml --- .../install-latest-to-ubuntu-24-04.yml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/install-latest-to-ubuntu-24-04.yml diff --git a/.github/workflows/install-latest-to-ubuntu-24-04.yml b/.github/workflows/install-latest-to-ubuntu-24-04.yml new file mode 100644 index 00000000..7cf9f005 --- /dev/null +++ b/.github/workflows/install-latest-to-ubuntu-24-04.yml @@ -0,0 +1,53 @@ +name: Install Latest to Ubuntu 24.04 +on: [push] + +jobs: + Install-Ubuntu-24-04: + runs-on: ubuntu-24.04 + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + #Get latest version + - run: curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) + - run: ./install_ant-media-server.sh -i ant-media-server-community.zip + - run: sleep 30 + - run: cat /usr/local/antmedia/log/ant-media-server.log + - run: | + if [ $(cat /usr/local/antmedia/log/ant-media-server.log | grep "LiveApp started" | wc -l | xargs) -eq 0 ]; then + echo "LiveApp started log does not exist. Check the logs above" + exit 1; + fi; + - run: cat /usr/local/antmedia/log/antmedia-error.log + Auto-Install-Community-: + runs-on: ubuntu-24.04 + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + #Get latest version + - run: ./install_ant-media-server.sh + - run: sleep 30 + - run: cat /usr/local/antmedia/log/ant-media-server.log + - run: | + if [ $(cat /usr/local/antmedia/log/ant-media-server.log | grep "LiveApp started" | wc -l | xargs) -eq 0 ]; then + echo "LiveApp started log does not exist. Check the logs above" + exit 1; + fi; + - run: cat /usr/local/antmedia/log/antmedia-error.log + Auto-Install-Enterprise-: + runs-on: ubuntu-24.04 + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + #Get latest version + - run: bash -x ./install_ant-media-server.sh -l"${{ secrets.ENTERPRISE_LICENSE }}" + - run: sleep 30 + - run: cat /usr/local/antmedia/log/ant-media-server.log + - run: | + if [ $(cat /usr/local/antmedia/log/ant-media-server.log | grep "LiveApp started" | wc -l | xargs) -eq 0 ]; then + echo "LiveApp started log does not exist. Check the logs above" + exit 1; + fi; + - run: cat /usr/local/antmedia/log/antmedia-error.log From eef72faff96dddba3888531001ed5cead83ead0e Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 23 Apr 2024 08:06:00 +0300 Subject: [PATCH 06/98] Create install-latest-snapshot-to-ubuntu-24-04.yml --- ...nstall-latest-snapshot-to-ubuntu-24-04.yml | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml diff --git a/.github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml b/.github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml new file mode 100644 index 00000000..e4b2b970 --- /dev/null +++ b/.github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml @@ -0,0 +1,27 @@ +name: Install Latest Snapshot to Ubuntu 24.04 +on: [push] + +jobs: + Install-Ubuntu-24-04: + runs-on: ubuntu-24.04 + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + + - run: wget -O maven-metadata.xml https://oss.sonatype.org/service/local/repositories/snapshots/content/io/antmedia/ant-media-server/maven-metadata.xml + #Get latest snapshot + - run: | + export LATEST_SNAPSHOT=$(cat maven-metadata.xml | grep "" | tail -n 1 | xargs | cut -c 10-23) + echo $LATEST_SNAPSHOT + wget -O ant-media-server-community.zip "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.antmedia&a=ant-media-server&v=${LATEST_SNAPSHOT}&c=community&e=zip"; + - run: ./install_ant-media-server.sh -i ant-media-server-community.zip + - run: sudo service antmedia status + - run: sleep 30 + - run: cat /usr/local/antmedia/log/ant-media-server.log + - run: | + if [ $(cat /usr/local/antmedia/log/ant-media-server.log | grep "LiveApp started" | wc -l | xargs) -eq 0 ]; then + echo "LiveApp started log does not exist. Check the logs above" + exit 1; + fi; + - run: cat /usr/local/antmedia/log/antmedia-error.log From 8d1b78365783eea08063aa11efcec9080ad7c00c Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Fri, 26 Apr 2024 11:16:20 +0300 Subject: [PATCH 07/98] Refactor CF template for Ubuntu 22.04 --- cloudformation/antmedia-aws-autoscale-template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudformation/antmedia-aws-autoscale-template.yaml b/cloudformation/antmedia-aws-autoscale-template.yaml index 6c46c9a1..c0aec616 100644 --- a/cloudformation/antmedia-aws-autoscale-template.yaml +++ b/cloudformation/antmedia-aws-autoscale-template.yaml @@ -4,7 +4,7 @@ Description: >- If you have any questions, please just drop a line to contact (at) antmedia.io Parameters: VpcCidrBlock: - Description: 'CIDR value for Wavelength Network' + Description: 'CIDR value for Network' Type: String MinLength: '9' MaxLength: '18' From 5e8fd88698cdc0a6bfa653029f5af0277be94015 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Fri, 26 Apr 2024 11:17:51 +0300 Subject: [PATCH 08/98] Update Lambda runtime --- cloudformation/antmedia-aws-autoscale-template.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudformation/antmedia-aws-autoscale-template.yaml b/cloudformation/antmedia-aws-autoscale-template.yaml index c0aec616..8fe45d7f 100644 --- a/cloudformation/antmedia-aws-autoscale-template.yaml +++ b/cloudformation/antmedia-aws-autoscale-template.yaml @@ -292,7 +292,7 @@ Resources: AMSGetLatestAMI: Type: AWS::Lambda::Function Properties: - Runtime: python3.11 + Runtime: python3.12 Handler: index.handler Role: !Sub ${DescribeImagesRole.Arn} Timeout: 60 @@ -326,7 +326,7 @@ Resources: UbuntuGetLatestAMI: Type: AWS::Lambda::Function Properties: - Runtime: python3.11 + Runtime: python3.12 Handler: index.handler Role: !Sub ${DescribeImagesRole.Arn} Timeout: 60 From ef890deb641cc541819d6a76720002fb10e5fe47 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Fri, 26 Apr 2024 11:23:05 +0300 Subject: [PATCH 09/98] Update helper script (cfn) --- .../antmedia-aws-autoscale-template.yaml | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/cloudformation/antmedia-aws-autoscale-template.yaml b/cloudformation/antmedia-aws-autoscale-template.yaml index 8fe45d7f..8e84c894 100644 --- a/cloudformation/antmedia-aws-autoscale-template.yaml +++ b/cloudformation/antmedia-aws-autoscale-template.yaml @@ -569,15 +569,14 @@ Resources: UserData: Fn::Base64: !Sub | #!/bin/bash - touch /usr/local/antmedia/conf/initialized bash /usr/local/antmedia/change_server_mode.sh cluster ${DBInstance.PrivateIp} apt-get update - apt-get install -y python3-pip - apt-get install -y python3-setuptools + sudo apt-get -y install python3-pip mkdir -p /opt/aws/bin - wget https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz - python3 -m easy_install --script-dir /opt/aws/bin aws-cfn-bootstrap-py3-latest.tar.gz - /opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource OriginGroup --region ${AWS::Region} + sudo pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz + sudo ln -s /usr/local/init/ubuntu/cfn-hup /etc/init.d/cfn-hup + /usr/local/bin/cfn-init -v --stack ${AWS::StackName} --resource LaunchConfigOrigin --configsets setup --region ${AWS::Region} + /usr/local/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource OriginGroup --region ${AWS::Region} TagSpecifications: - ResourceType: instance Tags: @@ -648,12 +647,12 @@ Resources: touch /usr/local/antmedia/conf/initialized bash /usr/local/antmedia/change_server_mode.sh cluster ${DBInstance.PrivateIp} apt-get update - apt-get install -y python3-pip - apt-get install -y python3-setuptools + sudo apt-get -y install python3-pip mkdir -p /opt/aws/bin - wget https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz - python3 -m easy_install --script-dir /opt/aws/bin aws-cfn-bootstrap-py3-latest.tar.gz - /opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource EdgeGroup --region ${AWS::Region} + sudo pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz + sudo ln -s /usr/local/init/ubuntu/cfn-hup /etc/init.d/cfn-hup + /usr/local/bin/cfn-init -v --stack ${AWS::StackName} --resource LaunchConfigEdge --configsets setup --region ${AWS::Region} + /usr/local/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource EdgeGroup --region ${AWS::Region} TagSpecifications: - ResourceType: instance Tags: From 1401f26ccbbdfd462bf7024cde0c9a7f76881f4e Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Fri, 26 Apr 2024 11:46:18 +0300 Subject: [PATCH 10/98] Update MongoDB OS --- cloudformation/antmedia-aws-autoscale-template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudformation/antmedia-aws-autoscale-template.yaml b/cloudformation/antmedia-aws-autoscale-template.yaml index 8e84c894..a3edd256 100644 --- a/cloudformation/antmedia-aws-autoscale-template.yaml +++ b/cloudformation/antmedia-aws-autoscale-template.yaml @@ -380,7 +380,7 @@ Resources: Properties: ServiceToken: !Sub ${UbuntuGetLatestAMI.Arn} Owner: "099720109477" - Name: "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*" + Name: "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*" Architecture: "x86_64" AntMediaVPC: From dd35956482694c9122ca6a1475ae4285605e2efe Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Fri, 26 Apr 2024 18:59:49 +0300 Subject: [PATCH 11/98] Fix cfn issue --- .../antmedia-aws-autoscale-template.yaml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/cloudformation/antmedia-aws-autoscale-template.yaml b/cloudformation/antmedia-aws-autoscale-template.yaml index a3edd256..66ee6c40 100644 --- a/cloudformation/antmedia-aws-autoscale-template.yaml +++ b/cloudformation/antmedia-aws-autoscale-template.yaml @@ -569,13 +569,13 @@ Resources: UserData: Fn::Base64: !Sub | #!/bin/bash + touch /usr/local/antmedia/conf/initialized bash /usr/local/antmedia/change_server_mode.sh cluster ${DBInstance.PrivateIp} apt-get update sudo apt-get -y install python3-pip mkdir -p /opt/aws/bin sudo pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz sudo ln -s /usr/local/init/ubuntu/cfn-hup /etc/init.d/cfn-hup - /usr/local/bin/cfn-init -v --stack ${AWS::StackName} --resource LaunchConfigOrigin --configsets setup --region ${AWS::Region} /usr/local/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource OriginGroup --region ${AWS::Region} TagSpecifications: - ResourceType: instance @@ -646,12 +646,11 @@ Resources: #!/bin/bash touch /usr/local/antmedia/conf/initialized bash /usr/local/antmedia/change_server_mode.sh cluster ${DBInstance.PrivateIp} - apt-get update + sudo apt-get update sudo apt-get -y install python3-pip mkdir -p /opt/aws/bin sudo pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz sudo ln -s /usr/local/init/ubuntu/cfn-hup /etc/init.d/cfn-hup - /usr/local/bin/cfn-init -v --stack ${AWS::StackName} --resource LaunchConfigEdge --configsets setup --region ${AWS::Region} /usr/local/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource EdgeGroup --region ${AWS::Region} TagSpecifications: - ResourceType: instance @@ -902,13 +901,8 @@ Resources: Fn::Base64: !Sub | #!/bin/bash -xe - wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add - - echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list - sudo apt-get update - sudo apt-get install -y mongodb-org python3-pip python3-setuptools - sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mongod.conf - systemctl enable mongod - systemctl restart mongod + wget -P /tmp/ https://raw.githubusercontent.com/ant-media/Scripts/master/install_mongodb.sh + bash /tmp/install_mongodb.sh Outputs: From 6c2633607b5fa31cd4fa87f27d15a7bd5a6ed988 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Sun, 5 May 2024 23:40:46 +0300 Subject: [PATCH 12/98] Update Load Balancer --- .../antmedia-instance-group-template.jinja | 33 ++++++++- .../antmedia-instance-template.jinja | 11 ++- .../antmedia-loadbalancer-template.jinja | 74 +++++++++++++++++++ gcp-jinja-template/antmedia.jinja | 15 +++- gcp-jinja-template/antmedia.yaml | 5 +- 5 files changed, 128 insertions(+), 10 deletions(-) create mode 100644 gcp-jinja-template/antmedia-loadbalancer-template.jinja diff --git a/gcp-jinja-template/antmedia-instance-group-template.jinja b/gcp-jinja-template/antmedia-instance-group-template.jinja index 314cb5aa..bce7bc96 100644 --- a/gcp-jinja-template/antmedia-instance-group-template.jinja +++ b/gcp-jinja-template/antmedia-instance-group-template.jinja @@ -2,18 +2,21 @@ resources: - name: origin-instance-group type: compute.v1.instanceGroupManager properties: - zone: {{ default_zone }} + zone: {{ properties["zone"] }} targetSize: 1 - baseInstanceName: my-instance + baseInstanceName: antmedia-origin instanceTemplate: projects/{{ env["project"] }}/global/instanceTemplates/ams-origin-template namedPorts: - name: http port: 5080 + metadata: + dependsOn: + - ams-origin-template - name: origin-autoscaler type: compute.v1.autoscaler properties: - zone: {{ default_zone }} + zone: {{ properties["zone"] }} target: $(ref.origin-instance-group.selfLink) autoscalingPolicy: minNumReplicas: 1 @@ -22,4 +25,28 @@ resources: cpuUtilization: utilizationTarget: 0.6 +- name: edge-instance-group + type: compute.v1.instanceGroupManager + properties: + zone: {{ properties["zone"] }} + targetSize: 1 + baseInstanceName: antmedia-edge + instanceTemplate: projects/{{ env["project"] }}/global/instanceTemplates/ams-edge-template + namedPorts: + - name: http + port: 5080 + metadata: + dependsOn: + - ams-edge-template +- name: edge-autoscaler + type: compute.v1.autoscaler + properties: + zone: {{ properties["zone"] }} + target: $(ref.edge-instance-group.selfLink) + autoscalingPolicy: + minNumReplicas: 1 + maxNumReplicas: 10 + coolDownPeriodSec: 60 + cpuUtilization: + utilizationTarget: 0.6 diff --git a/gcp-jinja-template/antmedia-instance-template.jinja b/gcp-jinja-template/antmedia-instance-template.jinja index 62f8b10c..f39aeef2 100644 --- a/gcp-jinja-template/antmedia-instance-template.jinja +++ b/gcp-jinja-template/antmedia-instance-template.jinja @@ -21,14 +21,16 @@ resources: boot: true autoDelete: true initializeParams: - sourceImage: projects/antmedia-public-385620/global/images/ams-marketplace282 + sourceImage: projects/{{ env["project"] }}/global/images/ams-marketplace282 networkInterfaces: - network: $(ref.antmedia-vpc-network.selfLink) subnetwork: $(ref.origin-subnet.selfLink) accessConfigs: - name: External NAT type: ONE_TO_ONE_NAT - + tags: + items: + - antmedia - name: ams-edge-template type: compute.v1.instanceTemplate properties: @@ -51,10 +53,13 @@ resources: boot: true autoDelete: true initializeParams: - sourceImage: projects/antmedia-public-385620/global/images/ams-marketplace282 + sourceImage: projects/{{ env["project"] }}/global/images/ams-marketplace282 networkInterfaces: - network: $(ref.antmedia-vpc-network.selfLink) subnetwork: $(ref.edge-subnet.selfLink) accessConfigs: - name: External NAT type: ONE_TO_ONE_NAT + tags: + items: + - antmedia diff --git a/gcp-jinja-template/antmedia-loadbalancer-template.jinja b/gcp-jinja-template/antmedia-loadbalancer-template.jinja new file mode 100644 index 00000000..ad3e801f --- /dev/null +++ b/gcp-jinja-template/antmedia-loadbalancer-template.jinja @@ -0,0 +1,74 @@ +{% set scenarios = ['origin', 'edge'] %} + + +resources: +{% for scenario in scenarios %} +- name: ams-load-balancer-{{ scenario }} + type: compute.v1.globalForwardingRule + properties: + region: {{ properties["region"] }} + loadBalancingScheme: EXTERNAL + target: $(ref.ams-target-proxy-{{ scenario }}.selfLink) + IPAddress: $(ref.lb-ipaddress-{{ scenario }}.address) + IPProtocol: TCP + portRange: 443-443 + +- name: ams-target-proxy-{{ scenario }} + type: compute.v1.targetHttpsProxy + properties: + urlMap: $(ref.ams-{{ scenario }}.selfLink) + sslCertificates: + - $(ref.ams-ssl-cert-{{ scenario }}.selfLink) + +- name: lb-ipaddress-{{ scenario }} + type: compute.v1.globalAddress + +- name: ams-{{ scenario }} + type: compute.v1.urlMap + properties: + defaultService: $(ref.ams-backend-{{ scenario }}.selfLink) + +- name: ams-ssl-cert-{{ scenario }} + type: compute.v1.sslCertificate + properties: + certificate: | + -----BEGIN CERTIFICATE----- + + -----END CERTIFICATE----- + privateKey: | + -----BEGIN PRIVATE KEY----- + + -----END PRIVATE KEY----- + + +- name: ams-backend-{{ scenario }} + type: compute.v1.backendService + properties: + port: 5080 + portName: http + protocol: HTTP + backends: + - name: backend + balancingMode: UTILIZATION + capacityScaler: 1.0 + group: projects/{{ env["project"] }}/zones/{{ properties["zone"] }}/instanceGroups/{{ scenario }}-instance-group + + maxUtilization: 0.8 + connectionDraining: + drainingTimeoutSec: 300 + healthChecks: + - $(ref.ams-health-check-{{ scenario }}.selfLink) + metadata: + dependsOn: + - {{ scenario }}-instance-group + - ams-health-check-{{ scenario }} + +- name: ams-health-check-{{ scenario }} + type: compute.v1.healthCheck + properties: + type: HTTP + httpHealthCheck: + port: 5080 + requestPath: / + +{% endfor %} diff --git a/gcp-jinja-template/antmedia.jinja b/gcp-jinja-template/antmedia.jinja index d3d287ea..988008bd 100644 --- a/gcp-jinja-template/antmedia.jinja +++ b/gcp-jinja-template/antmedia.jinja @@ -16,8 +16,8 @@ limitations under the License. {% set default_zone = "us-central1-a" %} {% set default_region = "us-central1" %} {% set mongodb_machine_type = "e2-standard-2" %} -{% set origin_machine_type = "e2-standard-2" %} -{% set edge_machine_type = "e2-standard-2" %} +{% set origin_machine_type = "c2d-standard-4" %} +{% set edge_machine_type = "c2d-standard-4" %} resources: @@ -32,6 +32,15 @@ resources: zone: {{ default_zone }} origin_machine_type: {{ origin_machine_type }} edge_machine_type: {{ edge_machine_type }} +- name: antmedia-instance-group + type: antmedia-instance-group-template.jinja + properties: + zone: {{ default_zone }} +- name: antmedia-loadbalancer + type: antmedia-loadbalancer-template.jinja + properties: + zone: {{ default_zone }} + region: {{ default_region}} - name: antmedia-firewall type: antmedia-firewall-template.jinja properties: @@ -41,3 +50,5 @@ resources: properties: region: {{ default_region}} autoCreateSubnetworks: false + + \ No newline at end of file diff --git a/gcp-jinja-template/antmedia.yaml b/gcp-jinja-template/antmedia.yaml index 47faf0b7..f1baae8c 100644 --- a/gcp-jinja-template/antmedia.yaml +++ b/gcp-jinja-template/antmedia.yaml @@ -13,13 +13,14 @@ # limitations under the License. imports: +- path: antmedia-vpc-template.jinja - path: antmedia-mongodb-template.jinja - path: antmedia-instance-template.jinja +- path: antmedia-instance-group-template.jinja - path: antmedia-firewall-template.jinja -- path: antmedia-vpc-template.jinja +- path: antmedia-loadbalancer-template.jinja - path: antmedia.jinja resources: - name: antmedia type: antmedia.jinja - From 6bbd7ff5364f59cc9ea76a8c8b1a65c93ff5c54e Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 6 May 2024 15:54:48 +0300 Subject: [PATCH 13/98] Disable temporary --- .github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml b/.github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml index e4b2b970..1cda503c 100644 --- a/.github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml +++ b/.github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml @@ -1,5 +1,5 @@ name: Install Latest Snapshot to Ubuntu 24.04 -on: [push] +#on: [push] jobs: Install-Ubuntu-24-04: From bef4a33f3ffbf5ea7eb299e9784ef46a3412dbc0 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 6 May 2024 15:55:09 +0300 Subject: [PATCH 14/98] disable temporary --- .github/workflows/install-latest-to-ubuntu-24-04.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install-latest-to-ubuntu-24-04.yml b/.github/workflows/install-latest-to-ubuntu-24-04.yml index 7cf9f005..9ca05277 100644 --- a/.github/workflows/install-latest-to-ubuntu-24-04.yml +++ b/.github/workflows/install-latest-to-ubuntu-24-04.yml @@ -1,5 +1,5 @@ name: Install Latest to Ubuntu 24.04 -on: [push] +#on: [push] jobs: Install-Ubuntu-24-04: From 6794ed05e6ea4e79f11faa5fba030b6a33dfed91 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Sun, 12 May 2024 23:42:36 +0300 Subject: [PATCH 15/98] Update cfn for Ubuntu 22.04 --- cloudformation/aws-streaming-wizard/template.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cloudformation/aws-streaming-wizard/template.yaml b/cloudformation/aws-streaming-wizard/template.yaml index 598de5d4..471d11ea 100644 --- a/cloudformation/aws-streaming-wizard/template.yaml +++ b/cloudformation/aws-streaming-wizard/template.yaml @@ -292,13 +292,12 @@ Resources: #!/bin/bash touch /usr/local/antmedia/conf/initialized bash /usr/local/antmedia/change_server_mode.sh cluster ${DBInstance.PrivateIp} - apt-get update - apt-get install -y python3-pip - apt-get install -y python3-setuptools + sudo apt-get update + sudo apt-get -y install python3-pip mkdir -p /opt/aws/bin - wget https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz - python3 -m easy_install --script-dir /opt/aws/bin aws-cfn-bootstrap-py3-latest.tar.gz - /opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource OriginGroup --region ${AWS::Region} + sudo pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz + sudo ln -s /usr/local/init/ubuntu/cfn-hup /etc/init.d/cfn-hup + /usr/local/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource OriginGroup --region ${AWS::Region} TagSpecifications: - ResourceType: instance Tags: From e169ed47affa3b70c8372f316e33da970b6dcbea Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Sun, 12 May 2024 23:43:21 +0300 Subject: [PATCH 16/98] Fix cfn for Ubuntu 22.04 --- cloudformation/aws-streaming-wizard/template.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cloudformation/aws-streaming-wizard/template.yaml b/cloudformation/aws-streaming-wizard/template.yaml index 471d11ea..e10e6ed3 100644 --- a/cloudformation/aws-streaming-wizard/template.yaml +++ b/cloudformation/aws-streaming-wizard/template.yaml @@ -360,13 +360,12 @@ Resources: #!/bin/bash touch /usr/local/antmedia/conf/initialized bash /usr/local/antmedia/change_server_mode.sh cluster ${DBInstance.PrivateIp} - apt-get update - apt-get install -y python3-pip - apt-get install -y python3-setuptools + sudo apt-get update + sudo apt-get -y install python3-pip mkdir -p /opt/aws/bin - wget https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz - python3 -m easy_install --script-dir /opt/aws/bin aws-cfn-bootstrap-py3-latest.tar.gz - /opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource EdgeGroup --region ${AWS::Region} + sudo pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz + sudo ln -s /usr/local/init/ubuntu/cfn-hup /etc/init.d/cfn-hup + /usr/local/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource EdgeGroup --region ${AWS::Region} TagSpecifications: - ResourceType: instance Tags: From 0463c3f04aca804f91951666ea1224bc9a2675bf Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Sun, 12 May 2024 23:44:02 +0300 Subject: [PATCH 17/98] Fix cfn for Ubuntu 22.04 --- .../template-custom-cert.yaml | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/cloudformation/aws-streaming-wizard/template-custom-cert.yaml b/cloudformation/aws-streaming-wizard/template-custom-cert.yaml index debdd014..89e4e60c 100644 --- a/cloudformation/aws-streaming-wizard/template-custom-cert.yaml +++ b/cloudformation/aws-streaming-wizard/template-custom-cert.yaml @@ -345,13 +345,12 @@ Resources: #!/bin/bash touch /usr/local/antmedia/conf/initialized bash /usr/local/antmedia/change_server_mode.sh cluster ${DBInstance.PrivateIp} - apt-get update - apt-get install -y python3-pip - apt-get install -y python3-setuptools + sudo apt-get update + sudo apt-get -y install python3-pip mkdir -p /opt/aws/bin - wget https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz - python3 -m easy_install --script-dir /opt/aws/bin aws-cfn-bootstrap-py3-latest.tar.gz - /opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource OriginGroup --region ${AWS::Region} + sudo pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz + sudo ln -s /usr/local/init/ubuntu/cfn-hup /etc/init.d/cfn-hup + /usr/local/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource OriginGroup --region ${AWS::Region} TagSpecifications: - ResourceType: instance Tags: @@ -414,13 +413,12 @@ Resources: #!/bin/bash touch /usr/local/antmedia/conf/initialized bash /usr/local/antmedia/change_server_mode.sh cluster ${DBInstance.PrivateIp} - apt-get update - apt-get install -y python3-pip - apt-get install -y python3-setuptools + sudo apt-get update + sudo apt-get -y install python3-pip mkdir -p /opt/aws/bin - wget https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz - python3 -m easy_install --script-dir /opt/aws/bin aws-cfn-bootstrap-py3-latest.tar.gz - /opt/aws/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource EdgeGroup --region ${AWS::Region} + sudo pip3 install https://s3.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz + sudo ln -s /usr/local/init/ubuntu/cfn-hup /etc/init.d/cfn-hup + /usr/local/bin/cfn-signal -e $? --stack ${AWS::StackName} --resource EdgeGroup --region ${AWS::Region} TagSpecifications: - ResourceType: instance Tags: From 4603ca7af25a1d1af98267feb0b1620cd5cfb154 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Sun, 12 May 2024 23:45:50 +0300 Subject: [PATCH 18/98] Add new mongodb script --- .../aws-streaming-wizard/template-custom-cert.yaml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cloudformation/aws-streaming-wizard/template-custom-cert.yaml b/cloudformation/aws-streaming-wizard/template-custom-cert.yaml index 89e4e60c..a8f93707 100644 --- a/cloudformation/aws-streaming-wizard/template-custom-cert.yaml +++ b/cloudformation/aws-streaming-wizard/template-custom-cert.yaml @@ -658,13 +658,8 @@ Resources: Fn::Base64: !Sub | #!/bin/bash -xe - wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add - - echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list - sudo apt-get update - sudo apt-get install -y mongodb-org python3-pip python3-setuptools - sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mongod.conf - systemctl enable mongod - systemctl restart mongod + wget -P /tmp/ https://raw.githubusercontent.com/ant-media/Scripts/master/install_mongodb.sh + bash /tmp/install_mongodb.sh Outputs: From 54149fdfdb6e27486653a8d3db2aebee2061233f Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Sun, 12 May 2024 23:46:12 +0300 Subject: [PATCH 19/98] Add new mongodb script --- cloudformation/aws-streaming-wizard/template.yaml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cloudformation/aws-streaming-wizard/template.yaml b/cloudformation/aws-streaming-wizard/template.yaml index e10e6ed3..1d27dd61 100644 --- a/cloudformation/aws-streaming-wizard/template.yaml +++ b/cloudformation/aws-streaming-wizard/template.yaml @@ -605,13 +605,8 @@ Resources: Fn::Base64: !Sub | #!/bin/bash -xe - wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add - - echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list - sudo apt-get update - sudo apt-get install -y mongodb-org python3-pip python3-setuptools - sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mongod.conf - systemctl enable mongod - systemctl restart mongod + wget -P /tmp/ https://raw.githubusercontent.com/ant-media/Scripts/master/install_mongodb.sh + bash /tmp/install_mongodb.sh Outputs: From 26276643ef70c17cbdc50f0c7f1639079b526ad8 Mon Sep 17 00:00:00 2001 From: yashtandon113 <82374739+yashtandon113@users.noreply.github.com> Date: Sun, 19 May 2024 16:38:29 +0530 Subject: [PATCH 20/98] Update antmedia-samples.py --- Selenium/antmedia-samples.py | 111 ++++++++++++++++++++++------------- 1 file changed, 69 insertions(+), 42 deletions(-) diff --git a/Selenium/antmedia-samples.py b/Selenium/antmedia-samples.py index 1a315b1e..a9a23c86 100644 --- a/Selenium/antmedia-samples.py +++ b/Selenium/antmedia-samples.py @@ -10,13 +10,16 @@ from selenium.webdriver.chrome.options import Options -# Function to send notification to Slack -def send_slack_message(webhook_url, message, icon_emoji=":x:"): +# Function to send notification to Slack Channel +def send_slack_message(webhook_url, message, user_id, icon_emoji=":x:"): payload = { - "text": message, + "text": f"<@{user_id}> {message}", "icon_emoji": icon_emoji } - response = requests.post(webhook_url, data={"payload": json.dumps(payload)}) + headers = {'Content-Type': 'application/json'} + #response = requests.post(webhook_url, data={"payload": json.dumps(payload)}) + response = requests.post(webhook_url, data=json.dumps(payload), headers=headers) + if response.status_code != 200: print("Error sending Slack message: ", response.text) @@ -56,26 +59,28 @@ def switch_to_first_tab(driver): # Function to remove advertisement from sample pages -def remove_ad(driver): - element = driver.find_element(By.XPATH, "/html/body/div[3]/div") - driver.execute_script("arguments[0].style.display = 'none';", element) +#def remove_ad(driver): +# element = driver.find_element(By.XPATH, "/html/body/div[3]") +# driver.execute_script("arguments[0].style.display = 'none';", element) +# element1 = driver.find_element(By.XPATH, "/html/body/div[6]/div") +# driver.execute_script("arguments[0].style.display = 'none';", element1) # Function to switch to new window and close the advertisement block def switch_window_and_frame(driver): driver.switch_to.window(driver.window_handles[1]) - time.sleep(10) - remove_ad(driver) - time.sleep(2) + time.sleep(15) driver.switch_to.frame(0) time.sleep(3) webhook_url = os.environ['WEBHOOK_URL'] icon_emoji = ":x:" +user_id = 'U01UMD36SQ0' options = Options() options.add_argument('--headless') +options.add_argument("--window-size=1920,1080"); options.add_argument("--use-fake-ui-for-media-stream") options.add_argument("--use-fake-device-for-media-stream") driver = webdriver.Chrome(options=options) @@ -89,8 +94,8 @@ def switch_window_and_frame(driver): driver.execute_script("window.open('https://antmedia.io/webrtc-samples/webrtc-virtual-background/', '_blank');") driver.switch_to.window(driver.window_handles[1]) time.sleep(20) - remove_ad(driver) - time.sleep(2) + #remove_ad(driver) + #time.sleep(2) driver.switch_to.frame(0) time.sleep(3) driver.find_element(By.XPATH, "/html/body/div/div/div[4]/div[3]/img").click() @@ -105,7 +110,7 @@ def switch_window_and_frame(driver): except: if i==1: message = "Virtual background test is failed, check -> https://antmedia.io/webrtc-samples/webrtc-virtual-background/" - send_slack_message(webhook_url, message, icon_emoji) + send_slack_message(webhook_url, message, user_id, icon_emoji) continue switch_to_first_tab(driver) @@ -115,17 +120,18 @@ def switch_window_and_frame(driver): driver.execute_script("window.open('https://antmedia.io/live-demo/', '_blank');") driver.switch_to.window(driver.window_handles[1]) time.sleep(20) - remove_ad(driver) - time.sleep(2) - driver.find_element(By.XPATH, "/html/body/div[5]/div/article[2]/div[2]/div[1]/div[1]/div/div/p/button[1]").click() + #remove_ad(driver) + #time.sleep(2) + driver.find_element(By.XPATH, "/html/body/div[1]/div/article[2]/div[2]/div[1]/div[1]/div/div/p/button[1]").click() time.sleep(15) - driver.find_element(By.XPATH, "/html/body/div[5]/div/article[2]/div[2]/div[1]/div[1]/div/div/p/button[2]").click() + driver.find_element(By.XPATH, "/html/body/div[1]/div/article[2]/div[2]/div[1]/div[1]/div/div/p/button[2]").click() time.sleep(3) print("Live demo is successful") except: message = "Livedemo test is failed, check -> https://antmedia.io/live-demo/" - send_slack_message(webhook_url, message, icon_emoji) + send_slack_message(webhook_url, message, user_id, icon_emoji) + switch_to_first_tab(driver) @@ -136,14 +142,14 @@ def switch_window_and_frame(driver): driver.find_element(By.XPATH, "/html/body/div/div/div[8]/button[1]").click() time.sleep(10) driver.find_element(By.XPATH, "/html/body/div/div/div[7]/div[1]/a").click() - time.sleep(5) + time.sleep(10) driver.find_element(By.XPATH, "/html/body/div/div/div[8]/button[2]").click() time.sleep(3) print("WebRTC to WebRTC is successful") except: message = "WebRTC to WebRTC test is failed, check -> https://antmedia.io/webrtc-samples/webrtc-publish-webrtc-play/" - send_slack_message(webhook_url, message, icon_emoji) + send_slack_message(webhook_url, message, user_id, icon_emoji) driver.close() driver.switch_to.window(driver.window_handles[1]) @@ -156,14 +162,14 @@ def switch_window_and_frame(driver): driver.find_element(By.XPATH, "/html/body/div/div/div[8]/button[1]").click() time.sleep(10) driver.find_element(By.XPATH, "/html/body/div/div/div[7]/div[1]/a").click() - time.sleep(5) + time.sleep(10) driver.find_element(By.XPATH, "/html/body/div/div/div[8]/button[2]").click() time.sleep(5) print("WebRTC to HLS is successful") except: message = "WebRTC to HLS test is failed, check -> https://antmedia.io/webrtc-samples/webrtc-publish-hls-play/" - send_slack_message(webhook_url, message, icon_emoji) + send_slack_message(webhook_url, message, user_id, icon_emoji) driver.close() driver.switch_to.window(driver.window_handles[1]) @@ -188,7 +194,7 @@ def switch_window_and_frame(driver): except: message = "WebRTC audio publish test is failed, check -> https://antmedia.io/webrtc-samples/webrtc-audio-publish-play/" - send_slack_message(webhook_url, message, icon_emoji) + send_slack_message(webhook_url, message, user_id, icon_emoji) driver.close() driver.switch_to.window(driver.window_handles[1]) @@ -205,7 +211,7 @@ def switch_window_and_frame(driver): except: message = "RTMP to WebRTC test is failed, check -> https://antmedia.io/webrtc-samples/rtmp-publish-wertc-play/" - send_slack_message(webhook_url, message, icon_emoji) + send_slack_message(webhook_url, message, user_id, icon_emoji) switch_to_first_tab(driver) @@ -220,7 +226,7 @@ def switch_window_and_frame(driver): except: message = "RTMP to HLS test is failed, check -> https://antmedia.io/webrtc-samples/rtmp-publish-hls-play/" - send_slack_message(webhook_url, message, icon_emoji) + send_slack_message(webhook_url, message, user_id, icon_emoji) switch_to_first_tab(driver) @@ -238,7 +244,7 @@ def switch_window_and_frame(driver): except: message = "SRT to WebRTC test is failed, check -> https://antmedia.io/webrtc-samples/srt-publish-webrtc-play/" - send_slack_message(webhook_url, message, icon_emoji) + send_slack_message(webhook_url, message, user_id, icon_emoji) switch_to_first_tab(driver) @@ -256,7 +262,7 @@ def switch_window_and_frame(driver): except: message = "SRT to HLS test is failed, check -> https://antmedia.io/webrtc-samples/srt-publish-hls-play/" - send_slack_message(webhook_url, message, icon_emoji) + send_slack_message(webhook_url, message, user_id, icon_emoji) switch_to_first_tab(driver) @@ -264,42 +270,63 @@ def switch_window_and_frame(driver): try: driver.execute_script("window.open('https://antmedia.io/webrtc-samples/deepar-publish-play/', '_blank');") switch_window_and_frame(driver) + print("pass1") driver.find_element(By.XPATH, "/html/body/div/div/select").click() - time.sleep(1) - driver.find_element(By.XPATH, "/html/body/div[1]/div/select/option[6]").click() - time.sleep(1) - driver.find_element(By.XPATH, "/html/body/div[1]/div/div[5]/button[1]").click() + print("pass2") + time.sleep(2) + driver.find_element(By.XPATH, "/html/body/div[1]/div/select/option[3]").click() + print("pass3") + time.sleep(2) + driver.find_element(By.XPATH, "/html/body/div/div/div[5]/button[1]").click() time.sleep(10) - driver.find_element(By.XPATH, "/html/body/div[1]/div/div[5]/button[2]").click() + driver.find_element(By.XPATH, "/html/body/div/div/div[5]/button[2]").click() print("WebRTC Deep AR test is successful") except: message = "WebRTC DeepAR sample test is failed, check -> https://antmedia.io/webrtc-samples/deepar-publish-play/" - send_slack_message(webhook_url, message, icon_emoji) + send_slack_message(webhook_url, message, user_id, icon_emoji) switch_to_first_tab(driver) # Testing Whiteboard sample page try: driver.execute_script("window.open('https://antmedia.io/webrtc-samples/interactive-whiteboard-publish-play/', '_blank');") - switch_window_and_frame(driver) - driver.switch_to.frame("webrtc-publish-frame") - time.sleep(1) - driver.find_element(By.XPATH, "/html/body/div[2]/div/div/div/div[2]/div[6]/button[1]").click() + driver.switch_to.window(driver.window_handles[1]) time.sleep(5) driver.switch_to.frame(0) + time.sleep(2) + driver.find_element(By.XPATH, "/html/body/div[2]/div/div/div/div[2]/div[6]/button[1]").click() + time.sleep(2) + iframe_element = driver.find_element(By.XPATH, "/html/body/div[2]/div/div/div/div[1]/iframe") + driver.switch_to.frame(iframe_element) driver.find_element(By.XPATH, "/html/body/section[2]/canvas[4]").click() time.sleep(2) driver.switch_to.default_content() - driver.switch_to.frame(0) - driver.switch_to.frame("webrtc-play-frame") - driver.find_element(By.XPATH, "/html/body/div[2]/div/div/div/div[3]/div[4]/button[1]").click() + iframe_element1 = driver.find_element(By.XPATH, "/html/body/div/div[2]/div/div/article/div/div/div/div/div/section/div/div/div/div/div/div/div/div/div[2]/iframe") + driver.switch_to.frame(iframe_element1) + driver.find_element(By.XPATH, "/html/body/div[2]/div/div/div/div[2]/div[5]/button[1]").click() time.sleep(10) print("WebRTC white board test is successful") except: message = "WebRTC whiteboard test is failed, check -> https://antmedia.io/webrtc-samples/interactive-whiteboard-publish-play/" - send_slack_message(webhook_url, message, icon_emoji) + send_slack_message(webhook_url, message, user_id, icon_emoji) + +switch_to_first_tab(driver) + +# Testing Conference sample page +try: + driver.execute_script("window.open('https://antmedia.io/webrtc-samples/multitrack-conference-solution/', '_blank');") + switch_window_and_frame(driver) + driver.find_element(By.XPATH, "/html/body/div/div[2]/div[3]/div/div[2]/button[1]").click() + time.sleep(10) + driver.find_element(By.XPATH, "/html/body/div/div[2]/div[3]/div/div[2]/button[2]").click() + time.sleep(3) + print("WebRTC Conference test is successful") + +except: + message = "WebRTC Conference sample test is failed, check -> https://antmedia.io/webrtc-samples/multitrack-conference-solution/" + send_slack_message(webhook_url, message, user_id, icon_emoji) switch_to_first_tab(driver) @@ -319,6 +346,6 @@ def switch_window_and_frame(driver): except: message = "WebRTC data channel test is failed, check -> https://antmedia.io/webrtc-samples/webrtc-data-channel-only/" - send_slack_message(webhook_url, message, icon_emoji) + send_slack_message(webhook_url, message, user_id, icon_emoji) driver.quit() From cc9d7ea89871421595297b4b5288675f6acc8835 Mon Sep 17 00:00:00 2001 From: yashtandon113 <82374739+yashtandon113@users.noreply.github.com> Date: Sun, 19 May 2024 16:42:08 +0530 Subject: [PATCH 21/98] Create samples.yml --- .github/workflows/samples.yml | 68 +++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/samples.yml diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml new file mode 100644 index 00000000..6dbae4e4 --- /dev/null +++ b/.github/workflows/samples.yml @@ -0,0 +1,68 @@ +name: Python Selenium Script + +on: [push] + #schedule: + #- cron: '0 */12 * * *' + +jobs: + run-selenium: + runs-on: ubuntu-latest + + env: + WEBHOOK_URL: ${{ secrets.WEBHOOK }} + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python 3 + uses: actions/setup-python@v3 + with: + python-version: 3.x + + - name: Install dependencies + run: | + pip install selenium + pip install requests + + - name: Install FFmpeg + run: | + sudo apt-get update + sudo apt-get install -y ffmpeg + + - name: Install SRT + run: | + git clone https://github.com/Haivision/srt.git + cd srt + sudo apt-get install tclsh pkg-config cmake libssl-dev build-essential + ./configure + make + sudo make install + cd .. + + - name: Install Chrome + run: | + wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb + sudo dpkg -i google-chrome-stable_current_amd64.deb + + - name: Install ChromeDriver + run: | + wget https://storage.googleapis.com/chrome-for-testing-public/125.0.6422.60/linux64/chromedriver-linux64.zip + unzip chromedriver-linux64.zip + cd chromedriver-linux64 + sudo mv chromedriver /usr/bin/chromedriver + sudo chown root:root /usr/bin/chromedriver + sudo chmod +x /usr/bin/chromedriver + + - name: Run Selenium script + run: | + python antmedia-samples.py + + - name: Install jq + run: sudo apt-get install -y jq + + - name: Send Slack notification on failure + if: ${{ failure() || cancelled() }} + run: | + SLACK_PAYLOAD=$(jq -n --arg text "<@U01UMD36SQ0> GitHub Workflow failed for ${{ github.repository }}" '{text: $text, icon_emoji: ":x:"}') + curl -X POST -H 'Content-type: application/json' --data "$SLACK_PAYLOAD" ${{ env.WEBHOOK_URL }} From 6215f71882e2f10817876b43416b92dbb0816bbb Mon Sep 17 00:00:00 2001 From: yashtandon113 <82374739+yashtandon113@users.noreply.github.com> Date: Sun, 19 May 2024 16:47:10 +0530 Subject: [PATCH 22/98] Update samples.yml --- .github/workflows/samples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml index 6dbae4e4..ec8fa776 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/samples.yml @@ -56,7 +56,7 @@ jobs: - name: Run Selenium script run: | - python antmedia-samples.py + python Selenium/antmedia-samples.py - name: Install jq run: sudo apt-get install -y jq From a83aa6b5d32c6fe7b33696447f81aab24ec4dfe6 Mon Sep 17 00:00:00 2001 From: yashtandon113 <82374739+yashtandon113@users.noreply.github.com> Date: Sun, 19 May 2024 16:56:04 +0530 Subject: [PATCH 23/98] Update antmedia-samples.py --- Selenium/antmedia-samples.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/Selenium/antmedia-samples.py b/Selenium/antmedia-samples.py index a9a23c86..aeaa5670 100644 --- a/Selenium/antmedia-samples.py +++ b/Selenium/antmedia-samples.py @@ -270,12 +270,9 @@ def switch_window_and_frame(driver): try: driver.execute_script("window.open('https://antmedia.io/webrtc-samples/deepar-publish-play/', '_blank');") switch_window_and_frame(driver) - print("pass1") driver.find_element(By.XPATH, "/html/body/div/div/select").click() - print("pass2") time.sleep(2) driver.find_element(By.XPATH, "/html/body/div[1]/div/select/option[3]").click() - print("pass3") time.sleep(2) driver.find_element(By.XPATH, "/html/body/div/div/div[5]/button[1]").click() time.sleep(10) From 0d80b70f4fc4c3a2a4965afed4360fa6510e940f Mon Sep 17 00:00:00 2001 From: yashtandon113 <82374739+yashtandon113@users.noreply.github.com> Date: Sun, 19 May 2024 17:16:35 +0530 Subject: [PATCH 24/98] Update samples.yml --- .github/workflows/samples.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml index ec8fa776..b656259c 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/samples.yml @@ -1,8 +1,8 @@ -name: Python Selenium Script +name: Python Samples Script -on: [push] - #schedule: - #- cron: '0 */12 * * *' +on: + schedule: + - cron: '0 */12 * * *' jobs: run-selenium: From f00738f522b5f1e4e298e652614b123be95027b5 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Fri, 24 May 2024 11:38:51 +0300 Subject: [PATCH 25/98] Enable Ubuntu 24.04 version --- .github/workflows/install-latest-to-ubuntu-24-04.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install-latest-to-ubuntu-24-04.yml b/.github/workflows/install-latest-to-ubuntu-24-04.yml index 9ca05277..7cf9f005 100644 --- a/.github/workflows/install-latest-to-ubuntu-24-04.yml +++ b/.github/workflows/install-latest-to-ubuntu-24-04.yml @@ -1,5 +1,5 @@ name: Install Latest to Ubuntu 24.04 -#on: [push] +on: [push] jobs: Install-Ubuntu-24-04: From 36301a8c355186447d2e1731bc2a7469ac1cf74f Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Fri, 24 May 2024 11:41:08 +0300 Subject: [PATCH 26/98] Enable Ubuntu 24.04 version --- .github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml b/.github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml index 1cda503c..e4b2b970 100644 --- a/.github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml +++ b/.github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml @@ -1,5 +1,5 @@ name: Install Latest Snapshot to Ubuntu 24.04 -#on: [push] +on: [push] jobs: Install-Ubuntu-24-04: From 663e99ef9067eff4d2a1834686563396f763a495 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Thu, 30 May 2024 19:39:11 +0300 Subject: [PATCH 27/98] Add Image ID as a parameter --- gcp-jinja-template/antmedia-instance-template.jinja | 4 ++-- gcp-jinja-template/antmedia.jinja | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcp-jinja-template/antmedia-instance-template.jinja b/gcp-jinja-template/antmedia-instance-template.jinja index f39aeef2..90495a5e 100644 --- a/gcp-jinja-template/antmedia-instance-template.jinja +++ b/gcp-jinja-template/antmedia-instance-template.jinja @@ -21,7 +21,7 @@ resources: boot: true autoDelete: true initializeParams: - sourceImage: projects/{{ env["project"] }}/global/images/ams-marketplace282 + sourceImage: projects/{{ env["project"] }}/global/images/{{ properties["image_id"] }} networkInterfaces: - network: $(ref.antmedia-vpc-network.selfLink) subnetwork: $(ref.origin-subnet.selfLink) @@ -53,7 +53,7 @@ resources: boot: true autoDelete: true initializeParams: - sourceImage: projects/{{ env["project"] }}/global/images/ams-marketplace282 + sourceImage: projects/{{ env["project"] }}/global/images/{{ properties["image_id"] }} networkInterfaces: - network: $(ref.antmedia-vpc-network.selfLink) subnetwork: $(ref.edge-subnet.selfLink) diff --git a/gcp-jinja-template/antmedia.jinja b/gcp-jinja-template/antmedia.jinja index 988008bd..8af57d07 100644 --- a/gcp-jinja-template/antmedia.jinja +++ b/gcp-jinja-template/antmedia.jinja @@ -18,6 +18,8 @@ limitations under the License. {% set mongodb_machine_type = "e2-standard-2" %} {% set origin_machine_type = "c2d-standard-4" %} {% set edge_machine_type = "c2d-standard-4" %} +{% set image_id = "ams-latest" %} + resources: @@ -32,6 +34,8 @@ resources: zone: {{ default_zone }} origin_machine_type: {{ origin_machine_type }} edge_machine_type: {{ edge_machine_type }} + image_id: {{ image_id }} + - name: antmedia-instance-group type: antmedia-instance-group-template.jinja properties: From 21eeb02963a1a264d4268e98b29f47a9c4971b28 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 5 Jun 2024 12:47:43 +0300 Subject: [PATCH 28/98] Add SRT Support --- .../antmedia-aws-autoscale-template.yaml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/cloudformation/antmedia-aws-autoscale-template.yaml b/cloudformation/antmedia-aws-autoscale-template.yaml index 66ee6c40..7849c558 100644 --- a/cloudformation/antmedia-aws-autoscale-template.yaml +++ b/cloudformation/antmedia-aws-autoscale-template.yaml @@ -487,6 +487,15 @@ Resources: LoadBalancerArn: !Ref RTMPLoadBalancer Port: '1935' Protocol: TCP + SRTListener: + Type: 'AWS::ElasticLoadBalancingV2::Listener' + Properties: + DefaultActions: + - Type: forward + TargetGroupArn: !Ref SRTTargetGroup + LoadBalancerArn: !Ref RTMPLoadBalancer + Port: '4200' + Protocol: UDP RTMPTargetGroup: Type: 'AWS::ElasticLoadBalancingV2::TargetGroup' Properties: @@ -496,6 +505,17 @@ Resources: Protocol: TCP UnhealthyThresholdCount: 3 VpcId: !Ref AntMediaVPC + SRTTargetGroup: + Type: 'AWS::ElasticLoadBalancingV2::TargetGroup' + Properties: + HealthCheckIntervalSeconds: 30 + HealthyThresholdCount: 3 + Port: 4200 + Protocol: UDP + UnhealthyThresholdCount: 3 + HealthCheckProtocol: TCP + HealthCheckPort: '5080' + VpcId: !Ref AntMediaVPC RTMPSecurityGroup: Type: 'AWS::EC2::SecurityGroup' Properties: @@ -505,6 +525,10 @@ Resources: FromPort: '1935' ToPort: '1935' CidrIp: '0.0.0.0/0' + - IpProtocol: udp + FromPort: '4200' + ToPort: '4200' + CidrIp: '0.0.0.0/0' SecurityGroupEgress: - IpProtocol: tcp FromPort: 0 @@ -528,6 +552,7 @@ Resources: TargetGroupARNs: - !Ref ALBTargetGroupOrigin - !Ref RTMPTargetGroup + - !Ref SRTTargetGroup Tags: - Key: Name Value: Antmedia-Origin @@ -840,6 +865,9 @@ Resources: - IpProtocol: udp FromPort: '50000' ToPort: '60000' + - IpProtocol: udp + FromPort: '4200' + ToPort: '4200' CidrIp: 0.0.0.0/0 - IpProtocol: tcp FromPort: '5000' From 8b20df3cfe29fe87afba2fb46f54a37589b4aaf6 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 11 Jun 2024 08:42:11 +0300 Subject: [PATCH 29/98] Add livenessProbe and readinessProbe --- kubernetes/ams-k8s-deployment-edge.yaml | 12 ++++++++++++ kubernetes/ams-k8s-deployment-origin.yaml | 12 ++++++++++++ .../ams-k8s-deployment-edge.yaml | 12 ++++++++++++ .../ams-k8s-deployment-origin.yaml | 12 ++++++++++++ 4 files changed, 48 insertions(+) diff --git a/kubernetes/ams-k8s-deployment-edge.yaml b/kubernetes/ams-k8s-deployment-edge.yaml index 2289bf36..ebfb4067 100644 --- a/kubernetes/ams-k8s-deployment-edge.yaml +++ b/kubernetes/ams-k8s-deployment-edge.yaml @@ -45,6 +45,18 @@ spec: # You may also need to add -u and -p parameters for # specifying mongodb username and passwords respectively args: ["-g", "true", "-s", "true", "-r", "true", "-m", "cluster", "-h", "mongo"] + livenessProbe: + httpGet: + path: / + port: 5080 + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: / + port: 5080 + initialDelaySeconds: 30 + periodSeconds: 10 resources: requests: cpu: 4000m diff --git a/kubernetes/ams-k8s-deployment-origin.yaml b/kubernetes/ams-k8s-deployment-origin.yaml index df62784e..2b7f41c0 100644 --- a/kubernetes/ams-k8s-deployment-origin.yaml +++ b/kubernetes/ams-k8s-deployment-origin.yaml @@ -45,6 +45,18 @@ spec: # You may also need to add -u and -p parameters for # specifying mongodb username and passwords respectively args: ["-g", "true", "-s", "true", "-r", "true", "-m", "cluster", "-h", "mongo"] + livenessProbe: + httpGet: + path: / + port: 5080 + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: / + port: 5080 + initialDelaySeconds: 30 + periodSeconds: 10 resources: requests: cpu: 4000m diff --git a/kubernetes/ams-with-turn-server/ams-k8s-deployment-edge.yaml b/kubernetes/ams-with-turn-server/ams-k8s-deployment-edge.yaml index 9b6130b9..f8948f84 100644 --- a/kubernetes/ams-with-turn-server/ams-k8s-deployment-edge.yaml +++ b/kubernetes/ams-with-turn-server/ams-k8s-deployment-edge.yaml @@ -34,6 +34,18 @@ spec: # specifying mongodb username and passwords respectively # args: ["-g", "true", "-s", "true", "-r", "true", "-m", "cluster", "-h", "mongo"] args: ["-r", "true", "-m", "cluster", "-h", "mongo"] + livenessProbe: + httpGet: + path: / + port: 5080 + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: / + port: 5080 + initialDelaySeconds: 30 + periodSeconds: 10 resources: requests: cpu: 4000m diff --git a/kubernetes/ams-with-turn-server/ams-k8s-deployment-origin.yaml b/kubernetes/ams-with-turn-server/ams-k8s-deployment-origin.yaml index 5146252e..81ee2ca9 100644 --- a/kubernetes/ams-with-turn-server/ams-k8s-deployment-origin.yaml +++ b/kubernetes/ams-with-turn-server/ams-k8s-deployment-origin.yaml @@ -34,6 +34,18 @@ spec: # specifying mongodb username and passwords respectively # args: ["-g", "true", "-s", "true", "-r", "true", "-m", "cluster", "-h", "mongo"] args: ["-r", "true", "-m", "cluster", "-h", "mongo"] + livenessProbe: + httpGet: + path: / + port: 5080 + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: / + port: 5080 + initialDelaySeconds: 30 + periodSeconds: 10 resources: requests: cpu: 4000m From 938d2d8ac7b00cbf348b003857664a22c5e7789e Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 24 Jun 2024 13:07:32 +0300 Subject: [PATCH 30/98] Update initialDelaySeconds time --- kubernetes/ams-k8s-deployment-edge.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kubernetes/ams-k8s-deployment-edge.yaml b/kubernetes/ams-k8s-deployment-edge.yaml index ebfb4067..6e4928d6 100644 --- a/kubernetes/ams-k8s-deployment-edge.yaml +++ b/kubernetes/ams-k8s-deployment-edge.yaml @@ -49,13 +49,13 @@ spec: httpGet: path: / port: 5080 - initialDelaySeconds: 30 + initialDelaySeconds: 10 periodSeconds: 10 readinessProbe: httpGet: path: / port: 5080 - initialDelaySeconds: 30 + initialDelaySeconds: 10 periodSeconds: 10 resources: requests: From a2ebe85e0bb560f957a4237c5c5c7613052cca2d Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 24 Jun 2024 13:11:41 +0300 Subject: [PATCH 31/98] Remove proxy body size limit for ingress --- kubernetes/ams-k8s-ingress-edge.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/kubernetes/ams-k8s-ingress-edge.yaml b/kubernetes/ams-k8s-ingress-edge.yaml index aa978215..cfae5895 100644 --- a/kubernetes/ams-k8s-ingress-edge.yaml +++ b/kubernetes/ams-k8s-ingress-edge.yaml @@ -10,6 +10,7 @@ metadata: nginx.ingress.kubernetes.io/session-cookie-max-age: "172800" nginx.org/websocket-services: "ant-media-server" nginx.ingress.kubernetes.io/websocket-services : "ant-media-server" + nginx.ingress.kubernetes.io/proxy-body-size: "0m" spec: rules: - host: test.antmedia.cloud From 4b13143cb4a242bbfffdd2ab330cd0ba24768a80 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 24 Jun 2024 13:11:47 +0300 Subject: [PATCH 32/98] Remove proxy body size limit for ingress --- kubernetes/ams-k8s-ingress-origin.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/kubernetes/ams-k8s-ingress-origin.yaml b/kubernetes/ams-k8s-ingress-origin.yaml index 29df4e16..651ac640 100644 --- a/kubernetes/ams-k8s-ingress-origin.yaml +++ b/kubernetes/ams-k8s-ingress-origin.yaml @@ -10,6 +10,7 @@ metadata: nginx.ingress.kubernetes.io/session-cookie-max-age: "172800" nginx.org/websocket-services: "ant-media-server" nginx.ingress.kubernetes.io/websocket-services : "ant-media-server" + nginx.ingress.kubernetes.io/proxy-body-size: "0m" spec: rules: - host: test.antmedia.cloud From 3fd037b3b5a05529c8cb1dfec66ac2f86f7c5fad Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 24 Jun 2024 13:19:46 +0300 Subject: [PATCH 33/98] Remove proxy body size limit for ingress --- kubernetes/ams-with-turn-server/ams-k8s-ingress-origin.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/kubernetes/ams-with-turn-server/ams-k8s-ingress-origin.yaml b/kubernetes/ams-with-turn-server/ams-k8s-ingress-origin.yaml index 97f9c213..97d1d12e 100644 --- a/kubernetes/ams-with-turn-server/ams-k8s-ingress-origin.yaml +++ b/kubernetes/ams-with-turn-server/ams-k8s-ingress-origin.yaml @@ -8,6 +8,7 @@ metadata: nginx.ingress.kubernetes.io/session-cookie-name: "route" nginx.ingress.kubernetes.io/session-cookie-expires: "172800" nginx.ingress.kubernetes.io/session-cookie-max-age: "172800" + nginx.ingress.kubernetes.io/proxy-body-size: "0m" spec: rules: - host: origin.antmedia.cloud From b3d4105b4f7c6ec5d4052f5b062b9ab22ac0cab9 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 24 Jun 2024 13:19:50 +0300 Subject: [PATCH 34/98] Remove proxy body size limit for ingress --- kubernetes/ams-with-turn-server/ams-k8s-ingress-edge.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/kubernetes/ams-with-turn-server/ams-k8s-ingress-edge.yaml b/kubernetes/ams-with-turn-server/ams-k8s-ingress-edge.yaml index 7a8fb870..787536dd 100644 --- a/kubernetes/ams-with-turn-server/ams-k8s-ingress-edge.yaml +++ b/kubernetes/ams-with-turn-server/ams-k8s-ingress-edge.yaml @@ -8,6 +8,7 @@ metadata: nginx.ingress.kubernetes.io/session-cookie-name: "route" nginx.ingress.kubernetes.io/session-cookie-expires: "172800" nginx.ingress.kubernetes.io/session-cookie-max-age: "172800" + nginx.ingress.kubernetes.io/proxy-body-size: "0m" spec: rules: - host: edge.antmedia.cloud From 0232d546492bbdb02bc3dbeb19c7d25a0d0bf968 Mon Sep 17 00:00:00 2001 From: yashtandon113 <82374739+yashtandon113@users.noreply.github.com> Date: Mon, 24 Jun 2024 21:55:51 +0530 Subject: [PATCH 35/98] Update samples.yml --- .github/workflows/samples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml index b656259c..6ae77951 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/samples.yml @@ -47,7 +47,7 @@ jobs: - name: Install ChromeDriver run: | - wget https://storage.googleapis.com/chrome-for-testing-public/125.0.6422.60/linux64/chromedriver-linux64.zip + wget https://storage.googleapis.com/chrome-for-testing-public/126.0.6478.63/linux64/chromedriver-linux64.zip unzip chromedriver-linux64.zip cd chromedriver-linux64 sudo mv chromedriver /usr/bin/chromedriver From b6b98742de85fa37bfd095f79b45cb92fcb4b8b5 Mon Sep 17 00:00:00 2001 From: yashtandon113 <82374739+yashtandon113@users.noreply.github.com> Date: Wed, 26 Jun 2024 02:09:24 +0530 Subject: [PATCH 36/98] Create .gitkeep --- load-testing/.gitkeep | 1 + 1 file changed, 1 insertion(+) create mode 100644 load-testing/.gitkeep diff --git a/load-testing/.gitkeep b/load-testing/.gitkeep new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/load-testing/.gitkeep @@ -0,0 +1 @@ + From 64494face920fec3cbf0b9ab8bfebbe6ba16776b Mon Sep 17 00:00:00 2001 From: yashtandon113 <82374739+yashtandon113@users.noreply.github.com> Date: Wed, 26 Jun 2024 02:17:32 +0530 Subject: [PATCH 37/98] Create hls_players.sh --- load-testing/hls_players.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 load-testing/hls_players.sh diff --git a/load-testing/hls_players.sh b/load-testing/hls_players.sh new file mode 100644 index 00000000..a6e10424 --- /dev/null +++ b/load-testing/hls_players.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +m3u8_url=$1 +viewers=$2 + +for (( i=1; i <= $viewers; ++i )) +do + COMMAND="ffmpeg -i "$m3u8_url" -codec copy -f null /dev/null" + $COMMAND &>>/dev/null & + echo "running command $COMMAND" + done From e29014acc2f92566d37f6b8c637c0c7d2fd6f6cc Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 1 Jul 2024 13:22:47 +0300 Subject: [PATCH 38/98] Add worflow for ssl (docker) --- .../install-dockerfile-and-check-ssl.yml | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/install-dockerfile-and-check-ssl.yml diff --git a/.github/workflows/install-dockerfile-and-check-ssl.yml b/.github/workflows/install-dockerfile-and-check-ssl.yml new file mode 100644 index 00000000..e00e3274 --- /dev/null +++ b/.github/workflows/install-dockerfile-and-check-ssl.yml @@ -0,0 +1,58 @@ +name: Docker Build and Test + +on: + workflow_dispatch: + inputs: + branch_name: + description: 'build branch name' + required: true + default: 'master' + +jobs: + build: + runs-on: self-hosted + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: stop the AMS service + run: sudo systemctl stop antmedia + + - name: Run Docker service + run: sudo systemctl restart docker + + - name: Build Docker image + run: docker build -f docker/Dockerfile_Process --network=host -t antmediaserver --build-arg LicenseKey="${{ secrets.ENTERPRISE_LICENSE }}" . + + - name: Run Docker container + run: docker run -d --name antmedia --network=host -it antmediaserver + + - name: Clone branch + run: | + git clone --depth=1 -b ${{ inputs.branch_name }} https://github.com/ant-media/Ant-Media-Server.git || git clone --depth=1 https://github.com/ant-media/Ant-Media-Server.git + + - name: Copy enable_ssl.sh from cloned branch to container + run: docker cp Ant-Media-Server/src/main/server/enable_ssl.sh antmedia:/usr/local/antmedia/enable_ssl.sh + + - name: Run enable_ssl.sh inside container + run: docker exec antmedia bash /usr/local/antmedia/enable_ssl.sh + + - name: Verify container is running + run: | + sleep 20 + docker ps -f name=antmedia + if [ $(docker ps -f name=antmedia --format '{{.Names}}') != "antmedia" ]; then + echo "Container is not running" + exit 1 + fi + + - name: Test application + run: | + docker exec antmedia curl -f https://${{ secrets.CI_SSL_TEST_DOMAIN }}:5443 + - name: Stop and remove container + if: ${{ always() }} + run: | + docker stop antmedia + docker rm antmedia + sudo systemctl start antmedia From 7f87177f5a57ff92351338e994f168cc6ee12e1f Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 1 Jul 2024 13:26:09 +0300 Subject: [PATCH 39/98] Update install-dockerfile-and-check-ssl.yml --- .github/workflows/install-dockerfile-and-check-ssl.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/install-dockerfile-and-check-ssl.yml b/.github/workflows/install-dockerfile-and-check-ssl.yml index e00e3274..b45d9450 100644 --- a/.github/workflows/install-dockerfile-and-check-ssl.yml +++ b/.github/workflows/install-dockerfile-and-check-ssl.yml @@ -6,7 +6,6 @@ on: branch_name: description: 'build branch name' required: true - default: 'master' jobs: build: From 0adbde7775607f2e0f9d2468c791d49ab1aa188c Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 1 Jul 2024 13:28:22 +0300 Subject: [PATCH 40/98] Add Branch name --- .github/workflows/install-dockerfile-and-check-ssl.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/install-dockerfile-and-check-ssl.yml b/.github/workflows/install-dockerfile-and-check-ssl.yml index b45d9450..d16ebbb9 100644 --- a/.github/workflows/install-dockerfile-and-check-ssl.yml +++ b/.github/workflows/install-dockerfile-and-check-ssl.yml @@ -15,6 +15,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 + - name: Show current branch + run: echo "Current branch is ${{ github.event.inputs.branch_name }}" + - name: stop the AMS service run: sudo systemctl stop antmedia @@ -29,7 +32,7 @@ jobs: - name: Clone branch run: | - git clone --depth=1 -b ${{ inputs.branch_name }} https://github.com/ant-media/Ant-Media-Server.git || git clone --depth=1 https://github.com/ant-media/Ant-Media-Server.git + git clone --depth=1 -b ${{ github.event.inputs.branch_name }} https://github.com/ant-media/Ant-Media-Server.git || git clone --depth=1 https://github.com/ant-media/Ant-Media-Server.git - name: Copy enable_ssl.sh from cloned branch to container run: docker cp Ant-Media-Server/src/main/server/enable_ssl.sh antmedia:/usr/local/antmedia/enable_ssl.sh From b9a63b39245a63588ba2396b0a1019187beb1aef Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 1 Jul 2024 13:30:27 +0300 Subject: [PATCH 41/98] Update install-dockerfile-and-check-ssl.yml --- .github/workflows/install-dockerfile-and-check-ssl.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/install-dockerfile-and-check-ssl.yml b/.github/workflows/install-dockerfile-and-check-ssl.yml index d16ebbb9..edbef5c4 100644 --- a/.github/workflows/install-dockerfile-and-check-ssl.yml +++ b/.github/workflows/install-dockerfile-and-check-ssl.yml @@ -1,11 +1,6 @@ name: Docker Build and Test -on: - workflow_dispatch: - inputs: - branch_name: - description: 'build branch name' - required: true +on: [push] jobs: build: From 7a62e9847fca6dd896dbfd37f82a664fca422e15 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 1 Jul 2024 13:40:26 +0300 Subject: [PATCH 42/98] Update install-dockerfile-and-check-ssl.yml --- .../install-dockerfile-and-check-ssl.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/install-dockerfile-and-check-ssl.yml b/.github/workflows/install-dockerfile-and-check-ssl.yml index edbef5c4..252353b8 100644 --- a/.github/workflows/install-dockerfile-and-check-ssl.yml +++ b/.github/workflows/install-dockerfile-and-check-ssl.yml @@ -25,12 +25,15 @@ jobs: - name: Run Docker container run: docker run -d --name antmedia --network=host -it antmediaserver - - name: Clone branch - run: | - git clone --depth=1 -b ${{ github.event.inputs.branch_name }} https://github.com/ant-media/Ant-Media-Server.git || git clone --depth=1 https://github.com/ant-media/Ant-Media-Server.git - - - name: Copy enable_ssl.sh from cloned branch to container - run: docker cp Ant-Media-Server/src/main/server/enable_ssl.sh antmedia:/usr/local/antmedia/enable_ssl.sh +# - name: Clone branch +# run: | +# git clone --depth=1 -b ${{ github.event.inputs.branch_name }} https://github.com/ant-media/Ant-Media-Server.git || git clone --depth=1 https://github.com/ant-media/Ant-Media-Server.git + + - name: Download enable_ssl.sh inside container + run: docker exec antmedia wget -O /usr/local/antmedia/enable_ssl.sh https://raw.githubusercontent.com/ant-media/Ant-Media-Server/21b57c461ba8eae496b830e779d2c628f25aecce/src/main/server/enable_ssl.sh + +# - name: Copy enable_ssl.sh from cloned branch to container +# run: docker cp Ant-Media-Server/src/main/server/enable_ssl.sh antmedia:/usr/local/antmedia/enable_ssl.sh - name: Run enable_ssl.sh inside container run: docker exec antmedia bash /usr/local/antmedia/enable_ssl.sh From aed15ba08948266328e85618e3ecc01c6a075875 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 1 Jul 2024 13:44:10 +0300 Subject: [PATCH 43/98] Update install-dockerfile-and-check-ssl.yml --- .github/workflows/install-dockerfile-and-check-ssl.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/install-dockerfile-and-check-ssl.yml b/.github/workflows/install-dockerfile-and-check-ssl.yml index 252353b8..a1f95ef6 100644 --- a/.github/workflows/install-dockerfile-and-check-ssl.yml +++ b/.github/workflows/install-dockerfile-and-check-ssl.yml @@ -36,7 +36,7 @@ jobs: # run: docker cp Ant-Media-Server/src/main/server/enable_ssl.sh antmedia:/usr/local/antmedia/enable_ssl.sh - name: Run enable_ssl.sh inside container - run: docker exec antmedia bash /usr/local/antmedia/enable_ssl.sh + run: docker exec antmedia bash /usr/local/antmedia/enable_ssl.sh -d ${{ secrets.CI_SSL_TEST_DOMAIN }} - name: Verify container is running run: | @@ -53,6 +53,7 @@ jobs: - name: Stop and remove container if: ${{ always() }} run: | - docker stop antmedia - docker rm antmedia - sudo systemctl start antmedia + echo "test" +# docker stop antmedia +# docker rm antmedia +# sudo systemctl start antmedia From 98b269bf469a866a8d0ca0fa3f00b7ffa2330e78 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 1 Jul 2024 13:47:41 +0300 Subject: [PATCH 44/98] Add restart parameter --- .github/workflows/install-dockerfile-and-check-ssl.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install-dockerfile-and-check-ssl.yml b/.github/workflows/install-dockerfile-and-check-ssl.yml index a1f95ef6..676068c2 100644 --- a/.github/workflows/install-dockerfile-and-check-ssl.yml +++ b/.github/workflows/install-dockerfile-and-check-ssl.yml @@ -20,7 +20,7 @@ jobs: run: sudo systemctl restart docker - name: Build Docker image - run: docker build -f docker/Dockerfile_Process --network=host -t antmediaserver --build-arg LicenseKey="${{ secrets.ENTERPRISE_LICENSE }}" . + run: docker build --restart=always -f docker/Dockerfile_Process --network=host -t antmediaserver --build-arg LicenseKey="${{ secrets.ENTERPRISE_LICENSE }}" . - name: Run Docker container run: docker run -d --name antmedia --network=host -it antmediaserver From 739d4d3694431d3f9ca9da3289d9fbec36c7a9eb Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 1 Jul 2024 13:48:48 +0300 Subject: [PATCH 45/98] Update install-dockerfile-and-check-ssl.yml --- .github/workflows/install-dockerfile-and-check-ssl.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install-dockerfile-and-check-ssl.yml b/.github/workflows/install-dockerfile-and-check-ssl.yml index 676068c2..59953b75 100644 --- a/.github/workflows/install-dockerfile-and-check-ssl.yml +++ b/.github/workflows/install-dockerfile-and-check-ssl.yml @@ -20,10 +20,10 @@ jobs: run: sudo systemctl restart docker - name: Build Docker image - run: docker build --restart=always -f docker/Dockerfile_Process --network=host -t antmediaserver --build-arg LicenseKey="${{ secrets.ENTERPRISE_LICENSE }}" . + run: docker build -f docker/Dockerfile_Process --network=host -t antmediaserver --build-arg LicenseKey="${{ secrets.ENTERPRISE_LICENSE }}" . - name: Run Docker container - run: docker run -d --name antmedia --network=host -it antmediaserver + run: docker run --restart=always -d --name antmedia --network=host -it antmediaserver # - name: Clone branch # run: | From 5f3cc0b0550ee2e3b823910eed7be4d75a0387dd Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 1 Jul 2024 13:52:46 +0300 Subject: [PATCH 46/98] Update install-dockerfile-and-check-ssl.yml --- .github/workflows/install-dockerfile-and-check-ssl.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/install-dockerfile-and-check-ssl.yml b/.github/workflows/install-dockerfile-and-check-ssl.yml index 59953b75..77e49d93 100644 --- a/.github/workflows/install-dockerfile-and-check-ssl.yml +++ b/.github/workflows/install-dockerfile-and-check-ssl.yml @@ -53,7 +53,6 @@ jobs: - name: Stop and remove container if: ${{ always() }} run: | - echo "test" -# docker stop antmedia -# docker rm antmedia -# sudo systemctl start antmedia + docker stop antmedia + docker rm antmedia + sudo systemctl start antmedia From 96f4f73d16f99f131798da0d2ca6dabc279b5499 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 1 Jul 2024 18:43:04 +0300 Subject: [PATCH 47/98] Add check SSL step --- .github/workflows/install-dockerfile-and-check-ssl.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/install-dockerfile-and-check-ssl.yml b/.github/workflows/install-dockerfile-and-check-ssl.yml index 77e49d93..a80d8b9e 100644 --- a/.github/workflows/install-dockerfile-and-check-ssl.yml +++ b/.github/workflows/install-dockerfile-and-check-ssl.yml @@ -25,6 +25,15 @@ jobs: - name: Run Docker container run: docker run --restart=always -d --name antmedia --network=host -it antmediaserver + - name: Check if SSL is enabled or not + run: | + set -e + if docker exec antmedia curl -f https://${{ secrets.CI_SSL_TEST_DOMAIN }}:5443; then + echo "Endpoint is reachable." + else + echo "Endpoint is not reachable, but continuing workflow." + fi + # - name: Clone branch # run: | # git clone --depth=1 -b ${{ github.event.inputs.branch_name }} https://github.com/ant-media/Ant-Media-Server.git || git clone --depth=1 https://github.com/ant-media/Ant-Media-Server.git From a4bc94aa9d5e93bc93eccd71a01eeb0881aa079c Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 1 Jul 2024 18:52:59 +0300 Subject: [PATCH 48/98] Add exit code --- .github/workflows/install-dockerfile-and-check-ssl.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/install-dockerfile-and-check-ssl.yml b/.github/workflows/install-dockerfile-and-check-ssl.yml index a80d8b9e..39b6fd58 100644 --- a/.github/workflows/install-dockerfile-and-check-ssl.yml +++ b/.github/workflows/install-dockerfile-and-check-ssl.yml @@ -30,6 +30,7 @@ jobs: set -e if docker exec antmedia curl -f https://${{ secrets.CI_SSL_TEST_DOMAIN }}:5443; then echo "Endpoint is reachable." + exit 1 else echo "Endpoint is not reachable, but continuing workflow." fi From cbc0641b2f391789e1f5a07b31e9bdfe3e53e204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20O=C4=9Fuz=20Mermerkaya?= Date: Tue, 2 Jul 2024 17:14:25 +0300 Subject: [PATCH 49/98] Change commit ref to master --- .github/workflows/install-dockerfile-and-check-ssl.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install-dockerfile-and-check-ssl.yml b/.github/workflows/install-dockerfile-and-check-ssl.yml index 39b6fd58..d6681b2b 100644 --- a/.github/workflows/install-dockerfile-and-check-ssl.yml +++ b/.github/workflows/install-dockerfile-and-check-ssl.yml @@ -40,7 +40,7 @@ jobs: # git clone --depth=1 -b ${{ github.event.inputs.branch_name }} https://github.com/ant-media/Ant-Media-Server.git || git clone --depth=1 https://github.com/ant-media/Ant-Media-Server.git - name: Download enable_ssl.sh inside container - run: docker exec antmedia wget -O /usr/local/antmedia/enable_ssl.sh https://raw.githubusercontent.com/ant-media/Ant-Media-Server/21b57c461ba8eae496b830e779d2c628f25aecce/src/main/server/enable_ssl.sh + run: docker exec antmedia wget -O /usr/local/antmedia/enable_ssl.sh https://raw.githubusercontent.com/ant-media/Ant-Media-Server/master/src/main/server/enable_ssl.sh # - name: Copy enable_ssl.sh from cloned branch to container # run: docker cp Ant-Media-Server/src/main/server/enable_ssl.sh antmedia:/usr/local/antmedia/enable_ssl.sh From 837c9c9fef25e3eaf3a25724dfa0212f60b111f1 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 3 Jul 2024 15:16:16 +0300 Subject: [PATCH 50/98] Update the Dockerfile for MediaPush Plugin --- docker/Dockerfile_Process | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docker/Dockerfile_Process b/docker/Dockerfile_Process index 946836d2..b25c19a7 100644 --- a/docker/Dockerfile_Process +++ b/docker/Dockerfile_Process @@ -1,11 +1,25 @@ +# # This docker file can be used in kubernetes. # It accepts all cluster related parameters at run time. # It means it's very easy to add new containers to the cluster +# +# Usage: +# +# 1. AntMediaServer: Specify the name of the Ant Media Server zip file to complete the installation. +# --build-arg AntMediaServer='ant-media-server.zip' +# +# 2. LicenseKey: Assign your license key to this variable to complete the installation without needing a zip file. +# --build-arg LicenseKey='your-license-key' +# +# 3. InstallMediaPush: Set this variable to 'true' to enable headless Chrome on the server for recording and streaming web pages back to Ant Media Server. +# --build-arg InstallMediaPush='true' +# FROM ubuntu:22.04 ARG AntMediaServer ARG LicenseKey +ARG InstallMediaPush ARG BranchName=master @@ -30,6 +44,14 @@ RUN cd /home \ exit 1; \ fi +RUN if [ "true" = "$InstallMediaPush" ]; then \ + echo "test"; \ + echo "#!/bin/bash\n\$@" > /usr/bin/sudo; \ + chmod +x /usr/bin/sudo; \ + wget -O install_media-push-plugin.sh https://raw.githubusercontent.com/ant-media/Plugins/master/MediaPushPlugin/src/main/script/install_media-push-plugin.sh; \ + bash ./install_media-push-plugin.sh; \ + fi + # # Options: # From eeeeefd6fc9bcc3b1c8d7d10a75c5c6b8f1c56b4 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 3 Jul 2024 15:55:00 +0300 Subject: [PATCH 51/98] Add renew parameter to avoid limit in workflow --- .github/workflows/install-dockerfile-and-check-ssl.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install-dockerfile-and-check-ssl.yml b/.github/workflows/install-dockerfile-and-check-ssl.yml index d6681b2b..b2505311 100644 --- a/.github/workflows/install-dockerfile-and-check-ssl.yml +++ b/.github/workflows/install-dockerfile-and-check-ssl.yml @@ -46,7 +46,7 @@ jobs: # run: docker cp Ant-Media-Server/src/main/server/enable_ssl.sh antmedia:/usr/local/antmedia/enable_ssl.sh - name: Run enable_ssl.sh inside container - run: docker exec antmedia bash /usr/local/antmedia/enable_ssl.sh -d ${{ secrets.CI_SSL_TEST_DOMAIN }} + run: docker exec antmedia bash /usr/local/antmedia/enable_ssl.sh -d ${{ secrets.CI_SSL_TEST_DOMAIN }} -r - name: Verify container is running run: | From 2af861b40c52feefb91c461785df3125cef4a523 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 3 Jul 2024 16:50:10 +0300 Subject: [PATCH 52/98] Add fixed version of enable_ssl.sh --- .github/workflows/install-dockerfile-and-check-ssl.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/install-dockerfile-and-check-ssl.yml b/.github/workflows/install-dockerfile-and-check-ssl.yml index b2505311..77ccf756 100644 --- a/.github/workflows/install-dockerfile-and-check-ssl.yml +++ b/.github/workflows/install-dockerfile-and-check-ssl.yml @@ -40,7 +40,7 @@ jobs: # git clone --depth=1 -b ${{ github.event.inputs.branch_name }} https://github.com/ant-media/Ant-Media-Server.git || git clone --depth=1 https://github.com/ant-media/Ant-Media-Server.git - name: Download enable_ssl.sh inside container - run: docker exec antmedia wget -O /usr/local/antmedia/enable_ssl.sh https://raw.githubusercontent.com/ant-media/Ant-Media-Server/master/src/main/server/enable_ssl.sh + run: docker exec antmedia wget -O /usr/local/antmedia/enable_ssl.sh https://raw.githubusercontent.com/ant-media/Ant-Media-Server/269f866bf9ee03a62757565aa1a4e469c0230954/src/main/server/enable_ssl.sh # - name: Copy enable_ssl.sh from cloned branch to container # run: docker cp Ant-Media-Server/src/main/server/enable_ssl.sh antmedia:/usr/local/antmedia/enable_ssl.sh From 4c097018212fd48184edfcbf5b4f527fc550facc Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 3 Jul 2024 17:02:17 +0300 Subject: [PATCH 53/98] Remove renew parameter --- .github/workflows/install-dockerfile-and-check-ssl.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install-dockerfile-and-check-ssl.yml b/.github/workflows/install-dockerfile-and-check-ssl.yml index 77ccf756..d6681b2b 100644 --- a/.github/workflows/install-dockerfile-and-check-ssl.yml +++ b/.github/workflows/install-dockerfile-and-check-ssl.yml @@ -40,13 +40,13 @@ jobs: # git clone --depth=1 -b ${{ github.event.inputs.branch_name }} https://github.com/ant-media/Ant-Media-Server.git || git clone --depth=1 https://github.com/ant-media/Ant-Media-Server.git - name: Download enable_ssl.sh inside container - run: docker exec antmedia wget -O /usr/local/antmedia/enable_ssl.sh https://raw.githubusercontent.com/ant-media/Ant-Media-Server/269f866bf9ee03a62757565aa1a4e469c0230954/src/main/server/enable_ssl.sh + run: docker exec antmedia wget -O /usr/local/antmedia/enable_ssl.sh https://raw.githubusercontent.com/ant-media/Ant-Media-Server/master/src/main/server/enable_ssl.sh # - name: Copy enable_ssl.sh from cloned branch to container # run: docker cp Ant-Media-Server/src/main/server/enable_ssl.sh antmedia:/usr/local/antmedia/enable_ssl.sh - name: Run enable_ssl.sh inside container - run: docker exec antmedia bash /usr/local/antmedia/enable_ssl.sh -d ${{ secrets.CI_SSL_TEST_DOMAIN }} -r + run: docker exec antmedia bash /usr/local/antmedia/enable_ssl.sh -d ${{ secrets.CI_SSL_TEST_DOMAIN }} - name: Verify container is running run: | From 58bcee4be62b23beec2a2e6856bbd2f9ed7ecc9b Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 3 Jul 2024 17:43:23 +0300 Subject: [PATCH 54/98] Add schedule for workflow --- .github/workflows/install-dockerfile-and-check-ssl.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/install-dockerfile-and-check-ssl.yml b/.github/workflows/install-dockerfile-and-check-ssl.yml index d6681b2b..1c06054a 100644 --- a/.github/workflows/install-dockerfile-and-check-ssl.yml +++ b/.github/workflows/install-dockerfile-and-check-ssl.yml @@ -1,6 +1,10 @@ name: Docker Build and Test -on: [push] +on: +# [push] + workflow_dispatch: + schedule: + - cron: '0 0 */5 * *' jobs: build: From 0a7957e84ecbddc966ad4876ab853ab05fd2c890 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 3 Jul 2024 17:51:22 +0300 Subject: [PATCH 55/98] Update Usage section --- docker/Dockerfile_Process | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile_Process b/docker/Dockerfile_Process index b25c19a7..864818df 100644 --- a/docker/Dockerfile_Process +++ b/docker/Dockerfile_Process @@ -5,13 +5,14 @@ # # Usage: # -# 1. AntMediaServer: Specify the name of the Ant Media Server zip file to complete the installation. +# * AntMediaServer: Specify the name of the Ant Media Server zip file to install that specify Ant Media Server version to the docker image # --build-arg AntMediaServer='ant-media-server.zip' # -# 2. LicenseKey: Assign your license key to this variable to complete the installation without needing a zip file. +# * LicenseKey: Set your license key to this variable to install the latest Ant Media Server automatically to the docker image without needing a zip file. If you use this LicenseKey variable, don't specify AntMediaServer variable (# --build-arg AntMediaServer='ant-media-server.zip' +) # --build-arg LicenseKey='your-license-key' # -# 3. InstallMediaPush: Set this variable to 'true' to enable headless Chrome on the server for recording and streaming web pages back to Ant Media Server. +# * InstallMediaPush: Set this variable to 'true' to enable headless Chrome on the server for recording and streaming web pages back to Ant Media Server. # --build-arg InstallMediaPush='true' # From 808b0962e027c13dea34a074fab5909b3b305aee Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Thu, 4 Jul 2024 11:51:42 +0300 Subject: [PATCH 56/98] Fix description --- docker/Dockerfile_Process | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/Dockerfile_Process b/docker/Dockerfile_Process index 864818df..1708f2ac 100644 --- a/docker/Dockerfile_Process +++ b/docker/Dockerfile_Process @@ -8,8 +8,7 @@ # * AntMediaServer: Specify the name of the Ant Media Server zip file to install that specify Ant Media Server version to the docker image # --build-arg AntMediaServer='ant-media-server.zip' # -# * LicenseKey: Set your license key to this variable to install the latest Ant Media Server automatically to the docker image without needing a zip file. If you use this LicenseKey variable, don't specify AntMediaServer variable (# --build-arg AntMediaServer='ant-media-server.zip' -) +# * LicenseKey: Set your license key to this variable to install the latest Ant Media Server automatically to the docker image without needing a zip file. If you use this LicenseKey variable, don't specify AntMediaServer variable (# --build-arg AntMediaServer='ant-media-server.zip') # --build-arg LicenseKey='your-license-key' # # * InstallMediaPush: Set this variable to 'true' to enable headless Chrome on the server for recording and streaming web pages back to Ant Media Server. From e9fc383f424975f174f9b3da13be316e419f5ba5 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Fri, 5 Jul 2024 13:04:15 +0300 Subject: [PATCH 57/98] Update regex for compatibility --- install_ant-media-server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_ant-media-server.sh b/install_ant-media-server.sh index 164f9c5c..7d5635fd 100755 --- a/install_ant-media-server.sh +++ b/install_ant-media-server.sh @@ -358,7 +358,7 @@ unzip $ANT_MEDIA_SERVER_ZIP_FILE check -if [[ $VERSION == 2.1* || $VERSION == 2.0* || $VERSION == 1.* ]]; then +if [[ $VERSION == 2.1\.+.* || $VERSION == 2.0* || $VERSION == 1.* ]]; then if [ "$ID" == "ubuntu" ]; then $SUDO apt-get install openjdk-8-jre -y $SUDO apt purge openjfx libopenjfx-java libopenjfx-jni -y From f05520fae49fb05fc34da2da617572ac8f1bdee1 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 5 Aug 2024 11:25:03 +0300 Subject: [PATCH 58/98] Add New Relic Dashboard --- monitor/ams-new-relic-dashboard.json | 397 +++++++++++++++++++++++++++ 1 file changed, 397 insertions(+) create mode 100644 monitor/ams-new-relic-dashboard.json diff --git a/monitor/ams-new-relic-dashboard.json b/monitor/ams-new-relic-dashboard.json new file mode 100644 index 00000000..fd2ecf92 --- /dev/null +++ b/monitor/ams-new-relic-dashboard.json @@ -0,0 +1,397 @@ +{ + "name": "Ant Media Server", + "description": null, + "permissions": "PUBLIC_READ_WRITE", + "pages": [ + { + "name": "Ant Media Server", + "description": null, + "widgets": [ + { + "title": "DASH Viewer Counts", + "layout": { + "column": 1, + "row": 1, + "width": 4, + "height": 3 + }, + "linkedEntityGuids": null, + "visualization": { + "id": "viz.pie" + }, + "rawConfiguration": { + "colors": { + "seriesOverrides": [ + { + "color": "#339ac7", + "seriesName": "LiveApp, stream1" + } + ] + }, + "facet": { + "showOtherSeries": true + }, + "legend": { + "enabled": true + }, + "nrqlQueries": [ + { + "accountIds": [ + 4479905 + ], + "query": "SELECT latest(dashViewerCount) AS 'DASH Viewer Count'\nFROM Log\nWHERE event = 'viewerCount' FACET app, streamId \nSINCE 1 minutes ago\n" + } + ], + "platformOptions": { + "ignoreTimeRange": false + } + } + }, + { + "title": "HLS Viewer Counts", + "layout": { + "column": 5, + "row": 1, + "width": 4, + "height": 3 + }, + "linkedEntityGuids": null, + "visualization": { + "id": "viz.pie" + }, + "rawConfiguration": { + "colors": { + "seriesOverrides": [ + { + "color": "#cdc837", + "seriesName": "LiveApp, stream1" + } + ] + }, + "facet": { + "showOtherSeries": true + }, + "legend": { + "enabled": true + }, + "nrqlQueries": [ + { + "accountIds": [ + 4479905 + ], + "query": "SELECT latest(hlsViewerCount) AS 'HLS Viewer Count'\nFROM Log\nWHERE event = 'viewerCount' FACET app, streamId \nSINCE 1 minutes ago\n" + } + ], + "platformOptions": { + "ignoreTimeRange": false + } + } + }, + { + "title": "WebRTC Viewer Counts", + "layout": { + "column": 9, + "row": 1, + "width": 4, + "height": 3 + }, + "linkedEntityGuids": null, + "visualization": { + "id": "viz.pie" + }, + "rawConfiguration": { + "facet": { + "showOtherSeries": true + }, + "legend": { + "enabled": true + }, + "nrqlQueries": [ + { + "accountIds": [ + 4479905 + ], + "query": "SELECT latest(webRTCViewerCount) AS 'WebRTC Viewer Count'\nFROM Log\nWHERE event = 'viewerCount' FACET app, streamId \nSINCE 1 minutes ago\n" + } + ], + "platformOptions": { + "ignoreTimeRange": false + } + } + }, + { + "title": "Publisher Statistics", + "layout": { + "column": 1, + "row": 4, + "width": 6, + "height": 3 + }, + "linkedEntityGuids": null, + "visualization": { + "id": "viz.table" + }, + "rawConfiguration": { + "facet": { + "showOtherSeries": false + }, + "nrqlQueries": [ + { + "accountIds": [ + 4479905 + ], + "query": "SELECT latest(timestamp) FROM Log WHERE event = 'publishStarted' FACET streamId, app, protocol, videoCodec, audioCodec, height, width SINCE 1 day ago" + } + ], + "platformOptions": { + "ignoreTimeRange": false + } + } + }, + { + "title": "Stream Start and End Times", + "layout": { + "column": 7, + "row": 4, + "width": 6, + "height": 3 + }, + "linkedEntityGuids": null, + "visualization": { + "id": "viz.table" + }, + "rawConfiguration": { + "facet": { + "showOtherSeries": false + }, + "nrqlQueries": [ + { + "accountIds": [ + 4479905 + ], + "query": "SELECT\n filter(latest(timestamp), WHERE event = 'publishStarted') AS 'publishStarted',\n filter(latest(timestamp), WHERE event = 'publishEnded') AS 'publishEnded'\nFROM\n Log\nWHERE\n (event = 'publishStarted' OR event = 'publishEnded')\nFACET\n streamId, app\nSINCE\n 1 day ago\n" + } + ], + "platformOptions": { + "ignoreTimeRange": false + } + } + }, + { + "title": "Subscriber Playback Duration", + "layout": { + "column": 1, + "row": 7, + "width": 6, + "height": 3 + }, + "linkedEntityGuids": null, + "visualization": { + "id": "viz.table" + }, + "rawConfiguration": { + "facet": { + "showOtherSeries": false + }, + "nrqlQueries": [ + { + "accountIds": [ + 4479905 + ], + "query": "FROM Log\nSELECT \n filter(latest(timestamp), WHERE event = 'playStartedFirstTime') AS 'playStartTime',\n filter(latest(timestamp), WHERE event = 'playEnded') AS 'playEndTime',\n (filter(latest(timestamp), WHERE event = 'playEnded') - filter(latest(timestamp), WHERE event = 'playStartedFirstTime')) / 1000 / 60 AS 'playDurationMinutes'\nWHERE event IN ('playStartedFirstTime', 'playEnded')\nFACET subscriberId, app, streamId\nSINCE 1 day ago" + } + ], + "platformOptions": { + "ignoreTimeRange": false + } + } + }, + { + "title": "Per User Total Transferred (Mb)", + "layout": { + "column": 7, + "row": 7, + "width": 6, + "height": 3 + }, + "linkedEntityGuids": null, + "visualization": { + "id": "viz.bar" + }, + "rawConfiguration": { + "facet": { + "showOtherSeries": false + }, + "nrqlQueries": [ + { + "accountIds": [ + 4479905 + ], + "query": "SELECT latest(numeric(totalBytesTransferred)) / 1048576 as 'Per User Total Transferred' \nFROM Log \nWHERE event = 'playerStats'\nFACET subscriberId, app, streamId SINCE 1 day ago" + } + ], + "platformOptions": { + "ignoreTimeRange": false + } + } + }, + { + "title": "First Play Time per Subscriber", + "layout": { + "column": 1, + "row": 10, + "width": 4, + "height": 3 + }, + "linkedEntityGuids": null, + "visualization": { + "id": "viz.bar" + }, + "rawConfiguration": { + "facet": { + "showOtherSeries": false + }, + "nrqlQueries": [ + { + "accountIds": [ + 4479905 + ], + "query": "SELECT latest(timestamp)\nFROM Log\nWHERE event = 'playStartedFirstTime'\nFACET subscriberId\nSINCE 1 day ago\n" + } + ], + "platformOptions": { + "ignoreTimeRange": false + } + } + }, + { + "title": "Start time of the viewers", + "layout": { + "column": 5, + "row": 10, + "width": 4, + "height": 3 + }, + "linkedEntityGuids": null, + "visualization": { + "id": "viz.pie" + }, + "rawConfiguration": { + "facet": { + "showOtherSeries": true + }, + "legend": { + "enabled": true + }, + "nrqlQueries": [ + { + "accountIds": [ + 4479905 + ], + "query": "SELECT latest(timestamp)\nFROM Log\nWHERE event = 'playStarted'\nFACET subscriberId\nSINCE 1 day ago\n" + } + ], + "platformOptions": { + "ignoreTimeRange": false + } + } + }, + { + "title": "End time of the viewers", + "layout": { + "column": 9, + "row": 10, + "width": 4, + "height": 3 + }, + "linkedEntityGuids": null, + "visualization": { + "id": "viz.pie" + }, + "rawConfiguration": { + "facet": { + "showOtherSeries": true + }, + "legend": { + "enabled": true + }, + "nrqlQueries": [ + { + "accountIds": [ + 4479905 + ], + "query": "SELECT latest(timestamp)\nFROM Log\nWHERE event = 'playEnded'\nFACET subscriberId\nSINCE 1 day ago\n" + } + ], + "platformOptions": { + "ignoreTimeRange": false + } + } + }, + { + "title": "Subscriber Statistics", + "layout": { + "column": 1, + "row": 13, + "width": 4, + "height": 3 + }, + "linkedEntityGuids": null, + "visualization": { + "id": "viz.table" + }, + "rawConfiguration": { + "facet": { + "showOtherSeries": false + }, + "initialSorting": { + "direction": "desc", + "name": "Timestamp" + }, + "nrqlQueries": [ + { + "accountIds": [ + 4479905 + ], + "query": "SELECT latest(protocol), latest(clientIP), latest(timestamp)\nFROM Log\nWHERE event = 'watchTime'\nFACET subscriberId\nSINCE 1 day ago\n" + } + ], + "platformOptions": { + "ignoreTimeRange": false + } + } + }, + { + "title": "Key Frame Interval ", + "layout": { + "column": 5, + "row": 13, + "width": 4, + "height": 3 + }, + "linkedEntityGuids": null, + "visualization": { + "id": "viz.table" + }, + "rawConfiguration": { + "facet": { + "showOtherSeries": false + }, + "nrqlQueries": [ + { + "accountIds": [ + 4479905 + ], + "query": "SELECT latest(timestamp) FROM Log WHERE event = 'keyFrameStats' FACET streamId, app, keyFramesInLastMinute, keyFrameIntervalMs SINCE 1 day ago" + } + ], + "platformOptions": { + "ignoreTimeRange": false + } + } + } + ] + } + ], + "variables": [] +} \ No newline at end of file From f61e3d4369f19811de6770f7fe552be769ca84f9 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Mon, 5 Aug 2024 11:41:14 +0300 Subject: [PATCH 59/98] Fix version fetching for snapshot --- .github/workflows/install-latest-snapshot-to-ubuntu-22-04.yml | 2 +- .github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install-latest-snapshot-to-ubuntu-22-04.yml b/.github/workflows/install-latest-snapshot-to-ubuntu-22-04.yml index ecba1b13..b11eb6d5 100644 --- a/.github/workflows/install-latest-snapshot-to-ubuntu-22-04.yml +++ b/.github/workflows/install-latest-snapshot-to-ubuntu-22-04.yml @@ -12,7 +12,7 @@ jobs: - run: wget -O maven-metadata.xml https://oss.sonatype.org/service/local/repositories/snapshots/content/io/antmedia/ant-media-server/maven-metadata.xml #Get latest snapshot - run: | - export LATEST_SNAPSHOT=$(cat maven-metadata.xml | grep "" | tail -n 1 | xargs | cut -c 10-23) + export LATEST_SNAPSHOT=$(grep -oP '(?<=)[^<]+' maven-metadata.xml| tail -1) echo $LATEST_SNAPSHOT wget -O ant-media-server-community.zip "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.antmedia&a=ant-media-server&v=${LATEST_SNAPSHOT}&c=community&e=zip"; - run: ./install_ant-media-server.sh -i ant-media-server-community.zip diff --git a/.github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml b/.github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml index e4b2b970..884c2141 100644 --- a/.github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml +++ b/.github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml @@ -12,7 +12,7 @@ jobs: - run: wget -O maven-metadata.xml https://oss.sonatype.org/service/local/repositories/snapshots/content/io/antmedia/ant-media-server/maven-metadata.xml #Get latest snapshot - run: | - export LATEST_SNAPSHOT=$(cat maven-metadata.xml | grep "" | tail -n 1 | xargs | cut -c 10-23) + export LATEST_SNAPSHOT=$(grep -oP '(?<=)[^<]+' maven-metadata.xml| tail -1) echo $LATEST_SNAPSHOT wget -O ant-media-server-community.zip "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=io.antmedia&a=ant-media-server&v=${LATEST_SNAPSHOT}&c=community&e=zip"; - run: ./install_ant-media-server.sh -i ant-media-server-community.zip From 27b00bb36ad027b70db49fa8a40322058f6b48ce Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Fri, 9 Aug 2024 17:30:15 +0300 Subject: [PATCH 60/98] Remove default accountIds --- monitor/ams-new-relic-dashboard.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/monitor/ams-new-relic-dashboard.json b/monitor/ams-new-relic-dashboard.json index fd2ecf92..f872a29b 100644 --- a/monitor/ams-new-relic-dashboard.json +++ b/monitor/ams-new-relic-dashboard.json @@ -37,7 +37,7 @@ "nrqlQueries": [ { "accountIds": [ - 4479905 + 0000000 ], "query": "SELECT latest(dashViewerCount) AS 'DASH Viewer Count'\nFROM Log\nWHERE event = 'viewerCount' FACET app, streamId \nSINCE 1 minutes ago\n" } @@ -77,7 +77,7 @@ "nrqlQueries": [ { "accountIds": [ - 4479905 + 0000000 ], "query": "SELECT latest(hlsViewerCount) AS 'HLS Viewer Count'\nFROM Log\nWHERE event = 'viewerCount' FACET app, streamId \nSINCE 1 minutes ago\n" } @@ -109,7 +109,7 @@ "nrqlQueries": [ { "accountIds": [ - 4479905 + 0000000 ], "query": "SELECT latest(webRTCViewerCount) AS 'WebRTC Viewer Count'\nFROM Log\nWHERE event = 'viewerCount' FACET app, streamId \nSINCE 1 minutes ago\n" } @@ -138,7 +138,7 @@ "nrqlQueries": [ { "accountIds": [ - 4479905 + 0000000 ], "query": "SELECT latest(timestamp) FROM Log WHERE event = 'publishStarted' FACET streamId, app, protocol, videoCodec, audioCodec, height, width SINCE 1 day ago" } @@ -167,7 +167,7 @@ "nrqlQueries": [ { "accountIds": [ - 4479905 + 0000000 ], "query": "SELECT\n filter(latest(timestamp), WHERE event = 'publishStarted') AS 'publishStarted',\n filter(latest(timestamp), WHERE event = 'publishEnded') AS 'publishEnded'\nFROM\n Log\nWHERE\n (event = 'publishStarted' OR event = 'publishEnded')\nFACET\n streamId, app\nSINCE\n 1 day ago\n" } @@ -196,7 +196,7 @@ "nrqlQueries": [ { "accountIds": [ - 4479905 + 0000000 ], "query": "FROM Log\nSELECT \n filter(latest(timestamp), WHERE event = 'playStartedFirstTime') AS 'playStartTime',\n filter(latest(timestamp), WHERE event = 'playEnded') AS 'playEndTime',\n (filter(latest(timestamp), WHERE event = 'playEnded') - filter(latest(timestamp), WHERE event = 'playStartedFirstTime')) / 1000 / 60 AS 'playDurationMinutes'\nWHERE event IN ('playStartedFirstTime', 'playEnded')\nFACET subscriberId, app, streamId\nSINCE 1 day ago" } @@ -225,7 +225,7 @@ "nrqlQueries": [ { "accountIds": [ - 4479905 + 0000000 ], "query": "SELECT latest(numeric(totalBytesTransferred)) / 1048576 as 'Per User Total Transferred' \nFROM Log \nWHERE event = 'playerStats'\nFACET subscriberId, app, streamId SINCE 1 day ago" } @@ -254,7 +254,7 @@ "nrqlQueries": [ { "accountIds": [ - 4479905 + 0000000 ], "query": "SELECT latest(timestamp)\nFROM Log\nWHERE event = 'playStartedFirstTime'\nFACET subscriberId\nSINCE 1 day ago\n" } @@ -286,7 +286,7 @@ "nrqlQueries": [ { "accountIds": [ - 4479905 + 0000000 ], "query": "SELECT latest(timestamp)\nFROM Log\nWHERE event = 'playStarted'\nFACET subscriberId\nSINCE 1 day ago\n" } @@ -318,7 +318,7 @@ "nrqlQueries": [ { "accountIds": [ - 4479905 + 0000000 ], "query": "SELECT latest(timestamp)\nFROM Log\nWHERE event = 'playEnded'\nFACET subscriberId\nSINCE 1 day ago\n" } @@ -351,7 +351,7 @@ "nrqlQueries": [ { "accountIds": [ - 4479905 + 0000000 ], "query": "SELECT latest(protocol), latest(clientIP), latest(timestamp)\nFROM Log\nWHERE event = 'watchTime'\nFACET subscriberId\nSINCE 1 day ago\n" } @@ -380,7 +380,7 @@ "nrqlQueries": [ { "accountIds": [ - 4479905 + 0000000 ], "query": "SELECT latest(timestamp) FROM Log WHERE event = 'keyFrameStats' FACET streamId, app, keyFramesInLastMinute, keyFrameIntervalMs SINCE 1 day ago" } @@ -394,4 +394,4 @@ } ], "variables": [] -} \ No newline at end of file +} From f39764967369d61c8cfc8a424deb6d17d9ed7cb0 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 14 Aug 2024 15:54:19 +0300 Subject: [PATCH 61/98] Update MongoDB version 5 to 6 --- kubernetes/ams-k8s-mongodb.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/ams-k8s-mongodb.yaml b/kubernetes/ams-k8s-mongodb.yaml index 0c9229bd..46427a6e 100644 --- a/kubernetes/ams-k8s-mongodb.yaml +++ b/kubernetes/ams-k8s-mongodb.yaml @@ -26,7 +26,7 @@ spec: containers: - name: mongodb imagePullPolicy: Always - image: mongo:5.0.6 + image: mongo:6.0 ports: - containerPort: 27017 From 9fa38e8baa09fe0c6f215f5ecd8bf0489ea9d9e5 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 14 Aug 2024 15:55:02 +0300 Subject: [PATCH 62/98] Update MongoDB version 5 to 6 --- kubernetes/ams-with-turn-server/ams-k8s-mongodb.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/ams-with-turn-server/ams-k8s-mongodb.yaml b/kubernetes/ams-with-turn-server/ams-k8s-mongodb.yaml index 0c9229bd..46427a6e 100644 --- a/kubernetes/ams-with-turn-server/ams-k8s-mongodb.yaml +++ b/kubernetes/ams-with-turn-server/ams-k8s-mongodb.yaml @@ -26,7 +26,7 @@ spec: containers: - name: mongodb imagePullPolicy: Always - image: mongo:5.0.6 + image: mongo:6.0 ports: - containerPort: 27017 From 039806e269380c603404646a319ff4cae3099928 Mon Sep 17 00:00:00 2001 From: yashtandon113 <82374739+yashtandon113@users.noreply.github.com> Date: Thu, 15 Aug 2024 16:47:16 +0530 Subject: [PATCH 63/98] Create rtmp_publisher.sh --- load-testing/rtmp_publisher.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 load-testing/rtmp_publisher.sh diff --git a/load-testing/rtmp_publisher.sh b/load-testing/rtmp_publisher.sh new file mode 100644 index 00000000..21a2bf0d --- /dev/null +++ b/load-testing/rtmp_publisher.sh @@ -0,0 +1,11 @@ +#!/bin/bash +Server=$1 +NoOfClients=$2 + +for (( i=1; i <= $NoOfClients; ++i )) +do + COMMAND="ffmpeg -re -stream_loop -1 -i /Users/yashtandon/Downloads/Video/test.mp4 -codec copy -f flv ${Server}_${i}" + $COMMAND >/dev/null 2>&1 & + echo "running command $COMMAND" + sleep 1 +done From c9b072e6ed354129dd8ad705fc2a3508b01cf2da Mon Sep 17 00:00:00 2001 From: yashtandon113 <82374739+yashtandon113@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:41:28 +0530 Subject: [PATCH 64/98] Update rtmp_publisher.sh --- load-testing/rtmp_publisher.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/load-testing/rtmp_publisher.sh b/load-testing/rtmp_publisher.sh index 21a2bf0d..20f0bee2 100644 --- a/load-testing/rtmp_publisher.sh +++ b/load-testing/rtmp_publisher.sh @@ -1,10 +1,11 @@ #!/bin/bash -Server=$1 -NoOfClients=$2 +file=$1 +server=$2 +noofclients=$3 -for (( i=1; i <= $NoOfClients; ++i )) +for (( i=1; i <= $noofclients; ++i )) do - COMMAND="ffmpeg -re -stream_loop -1 -i /Users/yashtandon/Downloads/Video/test.mp4 -codec copy -f flv ${Server}_${i}" + COMMAND="ffmpeg -re -stream_loop -1 -i ${file} -codec copy -f flv ${server}_${i}" $COMMAND >/dev/null 2>&1 & echo "running command $COMMAND" sleep 1 From fc8a09da74d239b5fb32f60a7dca06b6b554e410 Mon Sep 17 00:00:00 2001 From: yashtandon113 <82374739+yashtandon113@users.noreply.github.com> Date: Fri, 16 Aug 2024 02:28:08 +0530 Subject: [PATCH 65/98] Create srt_publishers.sh --- load-testing/srt_publishers.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 load-testing/srt_publishers.sh diff --git a/load-testing/srt_publishers.sh b/load-testing/srt_publishers.sh new file mode 100644 index 00000000..f2f5cbe4 --- /dev/null +++ b/load-testing/srt_publishers.sh @@ -0,0 +1,12 @@ +#!/bin/bash +file=$1 +server=$2 +noofclients=$3 + +for (( i=1; i <= $noofclients; ++i )) +do + COMMAND="ffmpeg -re -stream_loop -1 -i ${file} -codec copy -f mpegts ${server}_${i}" + $COMMAND >/dev/null 2>&1 & + echo "running command $COMMAND" + sleep 1 +done From 45f839f9010205846b849c56ac0c56772daf1d4d Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Fri, 16 Aug 2024 11:04:32 +0300 Subject: [PATCH 66/98] Add hostPath volume to Ant Media Server deployment --- kubernetes/ams-k8s-deployment-edge.yaml | 15 ++++++++++++--- kubernetes/ams-k8s-deployment-origin.yaml | 9 +++++++++ .../ams-k8s-deployment-edge.yaml | 11 ++++++++++- .../ams-k8s-deployment-origin.yaml | 11 ++++++++++- 4 files changed, 41 insertions(+), 5 deletions(-) diff --git a/kubernetes/ams-k8s-deployment-edge.yaml b/kubernetes/ams-k8s-deployment-edge.yaml index 6e4928d6..520dcf95 100644 --- a/kubernetes/ams-k8s-deployment-edge.yaml +++ b/kubernetes/ams-k8s-deployment-edge.yaml @@ -45,20 +45,29 @@ spec: # You may also need to add -u and -p parameters for # specifying mongodb username and passwords respectively args: ["-g", "true", "-s", "true", "-r", "true", "-m", "cluster", "-h", "mongo"] + volumeMounts: + - mountPath: /temp-data + name: temp-volume livenessProbe: httpGet: path: / port: 5080 - initialDelaySeconds: 10 + initialDelaySeconds: 30 periodSeconds: 10 readinessProbe: httpGet: path: / port: 5080 - initialDelaySeconds: 10 + initialDelaySeconds: 30 periodSeconds: 10 resources: requests: cpu: 4000m + volumes: + - hostPath: + path: /temp-data + type: DirectoryOrCreate + name: temp-volume + # imagePullSecrets: - # - name: docker + # - name: docker \ No newline at end of file diff --git a/kubernetes/ams-k8s-deployment-origin.yaml b/kubernetes/ams-k8s-deployment-origin.yaml index 2b7f41c0..1bc1b52a 100644 --- a/kubernetes/ams-k8s-deployment-origin.yaml +++ b/kubernetes/ams-k8s-deployment-origin.yaml @@ -45,6 +45,9 @@ spec: # You may also need to add -u and -p parameters for # specifying mongodb username and passwords respectively args: ["-g", "true", "-s", "true", "-r", "true", "-m", "cluster", "-h", "mongo"] + volumeMounts: + - mountPath: /temp-data + name: temp-volume livenessProbe: httpGet: path: / @@ -60,5 +63,11 @@ spec: resources: requests: cpu: 4000m + volumes: + - hostPath: + path: /temp-data + type: DirectoryOrCreate + name: temp-volume + # imagePullSecrets: # - name: docker diff --git a/kubernetes/ams-with-turn-server/ams-k8s-deployment-edge.yaml b/kubernetes/ams-with-turn-server/ams-k8s-deployment-edge.yaml index f8948f84..23e00a75 100644 --- a/kubernetes/ams-with-turn-server/ams-k8s-deployment-edge.yaml +++ b/kubernetes/ams-with-turn-server/ams-k8s-deployment-edge.yaml @@ -34,6 +34,9 @@ spec: # specifying mongodb username and passwords respectively # args: ["-g", "true", "-s", "true", "-r", "true", "-m", "cluster", "-h", "mongo"] args: ["-r", "true", "-m", "cluster", "-h", "mongo"] + volumeMounts: + - mountPath: /temp-data + name: temp-volume livenessProbe: httpGet: path: / @@ -49,5 +52,11 @@ spec: resources: requests: cpu: 4000m + volumes: + - hostPath: + path: /temp-data + type: DirectoryOrCreate + name: temp-volume + # imagePullSecrets: - # - name: docker + # - name: docker \ No newline at end of file diff --git a/kubernetes/ams-with-turn-server/ams-k8s-deployment-origin.yaml b/kubernetes/ams-with-turn-server/ams-k8s-deployment-origin.yaml index 81ee2ca9..ae5f67b7 100644 --- a/kubernetes/ams-with-turn-server/ams-k8s-deployment-origin.yaml +++ b/kubernetes/ams-with-turn-server/ams-k8s-deployment-origin.yaml @@ -34,6 +34,9 @@ spec: # specifying mongodb username and passwords respectively # args: ["-g", "true", "-s", "true", "-r", "true", "-m", "cluster", "-h", "mongo"] args: ["-r", "true", "-m", "cluster", "-h", "mongo"] + volumeMounts: + - mountPath: /temp-data + name: temp-volume livenessProbe: httpGet: path: / @@ -49,5 +52,11 @@ spec: resources: requests: cpu: 4000m + volumes: + - hostPath: + path: /temp-data + type: DirectoryOrCreate + name: temp-volume + # imagePullSecrets: - # - name: docker + # - name: docker \ No newline at end of file From 696cd7fcdc20eefb7ddd47a5d9f0df5c2fd6e8bc Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Fri, 16 Aug 2024 17:36:30 +0300 Subject: [PATCH 67/98] Update mountPath parameter --- kubernetes/ams-k8s-deployment-edge.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kubernetes/ams-k8s-deployment-edge.yaml b/kubernetes/ams-k8s-deployment-edge.yaml index 520dcf95..71b3d938 100644 --- a/kubernetes/ams-k8s-deployment-edge.yaml +++ b/kubernetes/ams-k8s-deployment-edge.yaml @@ -46,7 +46,7 @@ spec: # specifying mongodb username and passwords respectively args: ["-g", "true", "-s", "true", "-r", "true", "-m", "cluster", "-h", "mongo"] volumeMounts: - - mountPath: /temp-data + - mountPath: /tmp name: temp-volume livenessProbe: httpGet: @@ -70,4 +70,4 @@ spec: name: temp-volume # imagePullSecrets: - # - name: docker \ No newline at end of file + # - name: docker From 6f4e95747fa08207f78c9b3b39b966e556565ab6 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Fri, 16 Aug 2024 17:36:43 +0300 Subject: [PATCH 68/98] Update mountPath parameter --- kubernetes/ams-k8s-deployment-origin.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubernetes/ams-k8s-deployment-origin.yaml b/kubernetes/ams-k8s-deployment-origin.yaml index 1bc1b52a..ec0982c9 100644 --- a/kubernetes/ams-k8s-deployment-origin.yaml +++ b/kubernetes/ams-k8s-deployment-origin.yaml @@ -46,7 +46,7 @@ spec: # specifying mongodb username and passwords respectively args: ["-g", "true", "-s", "true", "-r", "true", "-m", "cluster", "-h", "mongo"] volumeMounts: - - mountPath: /temp-data + - mountPath: /tmp name: temp-volume livenessProbe: httpGet: From 2fc9f4bcddb92a9e875295cae4e547be35c3985e Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Fri, 16 Aug 2024 17:36:53 +0300 Subject: [PATCH 69/98] Update mountPath parameter --- kubernetes/ams-with-turn-server/ams-k8s-deployment-edge.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kubernetes/ams-with-turn-server/ams-k8s-deployment-edge.yaml b/kubernetes/ams-with-turn-server/ams-k8s-deployment-edge.yaml index 23e00a75..33a289c2 100644 --- a/kubernetes/ams-with-turn-server/ams-k8s-deployment-edge.yaml +++ b/kubernetes/ams-with-turn-server/ams-k8s-deployment-edge.yaml @@ -35,7 +35,7 @@ spec: # args: ["-g", "true", "-s", "true", "-r", "true", "-m", "cluster", "-h", "mongo"] args: ["-r", "true", "-m", "cluster", "-h", "mongo"] volumeMounts: - - mountPath: /temp-data + - mountPath: /tmp name: temp-volume livenessProbe: httpGet: @@ -59,4 +59,4 @@ spec: name: temp-volume # imagePullSecrets: - # - name: docker \ No newline at end of file + # - name: docker From 9c73c4f2c0940e24ef831a89d9ce9aab2644e7f5 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Fri, 16 Aug 2024 17:37:04 +0300 Subject: [PATCH 70/98] Update mountPath parameter --- .../ams-with-turn-server/ams-k8s-deployment-origin.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kubernetes/ams-with-turn-server/ams-k8s-deployment-origin.yaml b/kubernetes/ams-with-turn-server/ams-k8s-deployment-origin.yaml index ae5f67b7..43a0039c 100644 --- a/kubernetes/ams-with-turn-server/ams-k8s-deployment-origin.yaml +++ b/kubernetes/ams-with-turn-server/ams-k8s-deployment-origin.yaml @@ -35,7 +35,7 @@ spec: # args: ["-g", "true", "-s", "true", "-r", "true", "-m", "cluster", "-h", "mongo"] args: ["-r", "true", "-m", "cluster", "-h", "mongo"] volumeMounts: - - mountPath: /temp-data + - mountPath: /tmp name: temp-volume livenessProbe: httpGet: @@ -59,4 +59,4 @@ spec: name: temp-volume # imagePullSecrets: - # - name: docker \ No newline at end of file + # - name: docker From c78848198ef3c873e83e7a3bc461626017a6d39d Mon Sep 17 00:00:00 2001 From: yashtandon113 <82374739+yashtandon113@users.noreply.github.com> Date: Sat, 17 Aug 2024 21:02:06 +0530 Subject: [PATCH 71/98] Update samples.yml --- .github/workflows/samples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml index 6ae77951..88df7a76 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/samples.yml @@ -47,7 +47,7 @@ jobs: - name: Install ChromeDriver run: | - wget https://storage.googleapis.com/chrome-for-testing-public/126.0.6478.63/linux64/chromedriver-linux64.zip + wget https://storage.googleapis.com/chrome-for-testing-public/127.0.6533.119/linux64/chromedriver-linux64.zip unzip chromedriver-linux64.zip cd chromedriver-linux64 sudo mv chromedriver /usr/bin/chromedriver From 2cdd8e8cde3704264b2cc48300d3cf3f9e4f5c9b Mon Sep 17 00:00:00 2001 From: yashtandon113 <82374739+yashtandon113@users.noreply.github.com> Date: Tue, 20 Aug 2024 15:50:53 +0530 Subject: [PATCH 72/98] Update vod_transcode.sh --- vod_transcode.sh | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/vod_transcode.sh b/vod_transcode.sh index 942377f2..3d5e1bc3 100644 --- a/vod_transcode.sh +++ b/vod_transcode.sh @@ -1,29 +1,37 @@ #!/bin/bash # -# This bash script converts your VoD files to HLS format. (720p,480p,240p) +# This bash script converts your VoD files to HLS format. (720p, 480p, 240p) # # Installation Instructions # sudo apt-get update && sudo apt-get install ffmpeg -y -# vim [AMS-DIR]/webapps/applications(LiveApp or etc.)/WEB-INF/red5-web.properties -# settings.vodUploadFinishScript=/Script-DIR/vod_transcode.sh +# switch to application advance properties and set the property, +# "vodUploadFinishScript": "/path/to/vod_transcode.sh ", # sudo service antmedia restart -# -# Don't forget to change the Ant Media Server App Name +# Don't forget to change the Ant Media Server App Name in which you want to save the files AMS_APP_NAME="WebRTCAppEE" file=$1 file_name=$(basename $file .mp4) -# Bitrates -# 720p -a=("1280x720" "2500k") -# 480p -b=("640x480" "1500k") -# 240p -c=("320x240" "800k") - +# Bitrates and resolutions +resolutions=("1280x720" "640x480" "320x240") +bitrates=("2500k" "1500k" "800k") +names=("720p" "480p" "240p") cd /usr/local/antmedia/webapps/$AMS_APP_NAME/streams/ -$(command -v ffmpeg) -i $file -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 -s:v:0 ${a[0]} -c:v:0 libx264 -b:v:0 ${a[1]} -s:v:1 ${b[0]} -c:v:1 libx264 -b:v:1 ${b[1]} -s:v:2 ${c[0]} -c:v:2 libx264 -b:v:2 ${c[1]} -c:a aac -f hls -hls_playlist_type vod -master_pl_name ${file_name}.m3u8 -hls_segment_filename ${file_name}_%v/${file_name}%04d.ts -use_localtime_mkdir 1 -var_stream_map "v:0,a:0,name:720p v:1,a:1,name:480p v:2,a:2,name:360p" ${file_name}_%v.m3u8 +# Create directories for each resolution +for name in "${names[@]}"; do + mkdir -p ${file_name}_${name} +done + +$(command -v ffmpeg) -i $file \ + -map 0:v -map 0:a -s:v:0 ${resolutions[0]} -c:v:0 libx264 -b:v:0 ${bitrates[0]} \ + -map 0:v -map 0:a -s:v:1 ${resolutions[1]} -c:v:1 libx264 -b:v:1 ${bitrates[1]} \ + -map 0:v -map 0:a -s:v:2 ${resolutions[2]} -c:v:2 libx264 -b:v:2 ${bitrates[2]} \ + -c:a aac -f hls -hls_playlist_type vod \ + -master_pl_name ${file_name}.m3u8 \ + -hls_segment_filename ${file_name}_%v/${file_name}%04d.ts \ + -var_stream_map "v:0,a:0,name:720p v:1,a:1,name:480p v:2,a:2,name:240p" \ + ${file_name}_%v/${file_name}.m3u8 From 2c454bcdfe0b5935aa9c85efcb4a763d17cc217f Mon Sep 17 00:00:00 2001 From: yashtandon113 <82374739+yashtandon113@users.noreply.github.com> Date: Mon, 23 Sep 2024 02:38:03 +0530 Subject: [PATCH 73/98] Update samples.yml --- .github/workflows/samples.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml index 88df7a76..2864b964 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/samples.yml @@ -47,8 +47,7 @@ jobs: - name: Install ChromeDriver run: | - wget https://storage.googleapis.com/chrome-for-testing-public/127.0.6533.119/linux64/chromedriver-linux64.zip - unzip chromedriver-linux64.zip + wget https://storage.googleapis.com/chrome-for-testing-public/129.0.6668.58/linux64/chromedriver-linux64.zip cd chromedriver-linux64 sudo mv chromedriver /usr/bin/chromedriver sudo chown root:root /usr/bin/chromedriver From 6f50c3f6581998a778df6ba386c809035de9bdcc Mon Sep 17 00:00:00 2001 From: yashtandon113 <82374739+yashtandon113@users.noreply.github.com> Date: Tue, 24 Sep 2024 17:44:36 +0530 Subject: [PATCH 74/98] Update samples.yml --- .github/workflows/samples.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml index 2864b964..3a5d5a6b 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/samples.yml @@ -48,6 +48,7 @@ jobs: - name: Install ChromeDriver run: | wget https://storage.googleapis.com/chrome-for-testing-public/129.0.6668.58/linux64/chromedriver-linux64.zip + unzip chromedriver-linux64.zip cd chromedriver-linux64 sudo mv chromedriver /usr/bin/chromedriver sudo chown root:root /usr/bin/chromedriver From 7cd10f6f3565605d3f2a39840e5b1f0e764f102e Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 24 Sep 2024 18:20:09 +0300 Subject: [PATCH 75/98] Add dnsutils and iptables for SSL support in enable_ssl.sh --- docker/Dockerfile_Process | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile_Process b/docker/Dockerfile_Process index 1708f2ac..013923b3 100644 --- a/docker/Dockerfile_Process +++ b/docker/Dockerfile_Process @@ -24,7 +24,7 @@ ARG InstallMediaPush ARG BranchName=master #Running update and install makes the builder not to use cache which resolves some updates -RUN apt-get update && apt-get install -y curl wget iproute2 cron logrotate +RUN apt-get update && apt-get install -y curl wget iproute2 cron logrotate dnsutils iptables ADD ./${AntMediaServer} /home From 86025abf66bfb01d6791db04e1b728444be18735 Mon Sep 17 00:00:00 2001 From: yashtandon113 <82374739+yashtandon113@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:34:08 +0530 Subject: [PATCH 76/98] Update samples.yml --- .github/workflows/samples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml index 3a5d5a6b..51477105 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/samples.yml @@ -47,7 +47,7 @@ jobs: - name: Install ChromeDriver run: | - wget https://storage.googleapis.com/chrome-for-testing-public/129.0.6668.58/linux64/chromedriver-linux64.zip + wget https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.69/linux64/chromedriver-linux64.zip unzip chromedriver-linux64.zip cd chromedriver-linux64 sudo mv chromedriver /usr/bin/chromedriver From efd717c4b77f75f0870e529ce96caabee115845d Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 20 Nov 2024 01:27:29 +0300 Subject: [PATCH 77/98] Add Debian support to installation script --- install_ant-media-server.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/install_ant-media-server.sh b/install_ant-media-server.sh index 7d5635fd..1e2f3c75 100755 --- a/install_ant-media-server.sh +++ b/install_ant-media-server.sh @@ -176,13 +176,13 @@ distro () { $SUDO apt-get update && $SUDO apt-get install coreutils CUSTOM_JVM=$DEFAULT_JAVA fi - elif [ "$ID" == "ubuntu" ] || [ "$ID" == "centos" ] || [ "$ID" == "rocky" ] || [ "$ID" == "almalinux" ] || [ "$ID" == "rhel" ]; then + elif [ "$ID" == "ubuntu" ] || [ "$ID" == "centos" ] || [ "$ID" == "rocky" ] || [ "$ID" == "almalinux" ] || [ "$ID" == "rhel" ] || [ "$ID" == "debian" ]; then if [ "$VERSION_ID" == "18.04" ] && [ "aarch64" == $ARCH ]; then echo -e "ARM architecture is supported on Ubuntu 20.04. For 18.04 installation, use the link below to install.\nhttps://github.com/ant-media/Ant-Media-Server/wiki/Frequently-Asked-Questions#how-can-i-install-the-ant-media-server-on-ubuntu-1804-with-arm64" exit 1 fi - if [[ $VERSION_ID != 18.04 ]] && [[ $VERSION_ID != 20.04 ]] && [[ $VERSION_ID != 22.04 ]] && [[ $VERSION_ID != 24.04 ]] && [[ $VERSION_ID != 8* ]] && [[ $VERSION_ID != 9* ]]; then + if [[ $VERSION_ID != 18.04 ]] && [[ $VERSION_ID != 20.04 ]] && [[ $VERSION_ID != 22.04 ]] && [[ $VERSION_ID != 24.04 ]] && [[ $VERSION_ID != 8* ]] && [[ $VERSION_ID != 9* ]] && [[ $VERSION_ID != 12 ]]; then echo $msg exit 1 fi @@ -262,7 +262,7 @@ if [ "$UPDATE" == "true" ]; then fi if [ -z "$ANT_MEDIA_SERVER_ZIP_FILE" ]; then - if [ "$ID" == "ubuntu" ]; then + if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then #Added curl package for the minimal OS installations. $SUDO apt-get update $SUDO apt-get install jq curl -y @@ -312,7 +312,7 @@ fi REQUIRED_VERSION="2.6" -if [ "$ID" == "ubuntu" ]; then +if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then $SUDO apt-get update -y $SUDO apt-get install unzip zip libva-drm2 libva-x11-2 libvdpau-dev -y $SUDO unzip -o $ANT_MEDIA_SERVER_ZIP_FILE "ant-media-server/ant-media-server.jar" -d /tmp/ @@ -359,7 +359,7 @@ check if [[ $VERSION == 2.1\.+.* || $VERSION == 2.0* || $VERSION == 1.* ]]; then - if [ "$ID" == "ubuntu" ]; then + if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then $SUDO apt-get install openjdk-8-jre -y $SUDO apt purge openjfx libopenjfx-java libopenjfx-jni -y $SUDO apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 -y @@ -377,14 +377,14 @@ if [[ $VERSION == 2.1\.+.* || $VERSION == 2.0* || $VERSION == 1.* ]]; then elif [[ $VERSION == 2.4* || $VERSION == 2.3* || $VERSION == 2.2* ]]; then - if [ "$ID" == "ubuntu" ]; then + if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then $SUDO apt-get update -y $SUDO apt-get install openjdk-11-jdk -y check fi elif [[ $VERSION == 2.5* || $VERSION == 2.6* || $VERSION == 2.7* ]]; then - if [ "$ID" == "ubuntu" ]; then + if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then $SUDO apt-get update -y $SUDO apt-get install openjdk-11-jre-headless -y check @@ -400,7 +400,7 @@ elif [[ $VERSION == 2.5* || $VERSION == 2.6* || $VERSION == 2.7* ]]; then else # with 2.8 we start to use java17 - if [ "$ID" == "ubuntu" ]; then + if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then $SUDO apt-get update -y $SUDO apt-get install openjdk-17-jre-headless -y check From 65d88eb9127a33d7117e77b0476f950b8a7dc51c Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 20 Nov 2024 01:28:16 +0300 Subject: [PATCH 78/98] Add test for Debian 12 --- .github/actions/deploy-debian-12/action.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/actions/deploy-debian-12/action.yaml diff --git a/.github/actions/deploy-debian-12/action.yaml b/.github/actions/deploy-debian-12/action.yaml new file mode 100644 index 00000000..c845fb60 --- /dev/null +++ b/.github/actions/deploy-debian-12/action.yaml @@ -0,0 +1,18 @@ +name: Deploy on Debian 12 +runs: + using: composite + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Ant Media Server + shell: bash + run: | + apt-get -y install wget which findutils which crontabs unzip + curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) + bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false + /usr/local/antmedia/antmedia start + sleep 40 + if [ $(cat /usr/local/antmedia/log/ant-media-server.log | grep "LiveApp started" | wc -l | xargs) -eq 0 ]; then + echo "LiveApp started log does not exist. Check the logs above" + exit 1; + fi; From a990b489cd05f369cf6bd659650dee6e858c0c0b Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 20 Nov 2024 01:33:00 +0300 Subject: [PATCH 79/98] Add test for Debian 11 and Debian 12 --- .github/actions/deploy-debian-11/action.yml | 18 ++++++++++++++++++ .../{action.yaml => action.yml} | 0 .github/workflows/debian.yml | 16 ++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 .github/actions/deploy-debian-11/action.yml rename .github/actions/deploy-debian-12/{action.yaml => action.yml} (100%) create mode 100644 .github/workflows/debian.yml diff --git a/.github/actions/deploy-debian-11/action.yml b/.github/actions/deploy-debian-11/action.yml new file mode 100644 index 00000000..3e4e35ae --- /dev/null +++ b/.github/actions/deploy-debian-11/action.yml @@ -0,0 +1,18 @@ +name: Deploy on Debian 11 +runs: + using: composite + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install Ant Media Server + shell: bash + run: | + apt-get -y install wget which findutils which crontabs unzip + curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) + bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false + /usr/local/antmedia/antmedia start + sleep 40 + if [ $(cat /usr/local/antmedia/log/ant-media-server.log | grep "LiveApp started" | wc -l | xargs) -eq 0 ]; then + echo "LiveApp started log does not exist. Check the logs above" + exit 1; + fi; diff --git a/.github/actions/deploy-debian-12/action.yaml b/.github/actions/deploy-debian-12/action.yml similarity index 100% rename from .github/actions/deploy-debian-12/action.yaml rename to .github/actions/deploy-debian-12/action.yml diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml new file mode 100644 index 00000000..2ad4b940 --- /dev/null +++ b/.github/workflows/debian.yml @@ -0,0 +1,16 @@ +name: Debian +on: [push] + +jobs: + Debian11: + runs-on: ubuntu-24.04 + container: debian:11 + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/deploy-debian-11 + Debian12: + runs-on: ubuntu-24.04 + container: debian:12 + steps: + - uses: actions/checkout@v3 + - uses: ./.github/actions/deploy-debian-12 From 98f4652c949183ae38a9a2c8a32e218cafb5b01a Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 20 Nov 2024 01:34:46 +0300 Subject: [PATCH 80/98] Fix installation of packages --- .github/actions/deploy-debian-11/action.yml | 1 + .github/actions/deploy-debian-12/action.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/actions/deploy-debian-11/action.yml b/.github/actions/deploy-debian-11/action.yml index 3e4e35ae..5e048660 100644 --- a/.github/actions/deploy-debian-11/action.yml +++ b/.github/actions/deploy-debian-11/action.yml @@ -7,6 +7,7 @@ runs: - name: Install Ant Media Server shell: bash run: | + apt-get update apt-get -y install wget which findutils which crontabs unzip curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false diff --git a/.github/actions/deploy-debian-12/action.yml b/.github/actions/deploy-debian-12/action.yml index c845fb60..bbfdc71a 100644 --- a/.github/actions/deploy-debian-12/action.yml +++ b/.github/actions/deploy-debian-12/action.yml @@ -7,6 +7,7 @@ runs: - name: Install Ant Media Server shell: bash run: | + apt-get update apt-get -y install wget which findutils which crontabs unzip curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false From bf8a814edee4628dc55e5daa1763e1975bd9b0c0 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 20 Nov 2024 01:37:22 +0300 Subject: [PATCH 81/98] Fix installation of packages --- .github/actions/deploy-debian-11/action.yml | 2 +- .github/actions/deploy-debian-12/action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/deploy-debian-11/action.yml b/.github/actions/deploy-debian-11/action.yml index 5e048660..3c570ab8 100644 --- a/.github/actions/deploy-debian-11/action.yml +++ b/.github/actions/deploy-debian-11/action.yml @@ -8,7 +8,7 @@ runs: shell: bash run: | apt-get update - apt-get -y install wget which findutils which crontabs unzip + apt-get -y install wget which findutils unzip curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false /usr/local/antmedia/antmedia start diff --git a/.github/actions/deploy-debian-12/action.yml b/.github/actions/deploy-debian-12/action.yml index bbfdc71a..ce1789c3 100644 --- a/.github/actions/deploy-debian-12/action.yml +++ b/.github/actions/deploy-debian-12/action.yml @@ -8,7 +8,7 @@ runs: shell: bash run: | apt-get update - apt-get -y install wget which findutils which crontabs unzip + apt-get -y install wget which findutils unzip curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false /usr/local/antmedia/antmedia start From f2ed503d096f5d2ebe1d71fe0aa90df44ff45ae8 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 20 Nov 2024 01:38:06 +0300 Subject: [PATCH 82/98] Fix installation of packages --- .github/actions/deploy-debian-11/action.yml | 2 +- .github/actions/deploy-debian-12/action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/deploy-debian-11/action.yml b/.github/actions/deploy-debian-11/action.yml index 3c570ab8..4059308a 100644 --- a/.github/actions/deploy-debian-11/action.yml +++ b/.github/actions/deploy-debian-11/action.yml @@ -8,7 +8,7 @@ runs: shell: bash run: | apt-get update - apt-get -y install wget which findutils unzip + apt-get -y install wget findutils unzip curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false /usr/local/antmedia/antmedia start diff --git a/.github/actions/deploy-debian-12/action.yml b/.github/actions/deploy-debian-12/action.yml index ce1789c3..3ed46c2a 100644 --- a/.github/actions/deploy-debian-12/action.yml +++ b/.github/actions/deploy-debian-12/action.yml @@ -8,7 +8,7 @@ runs: shell: bash run: | apt-get update - apt-get -y install wget which findutils unzip + apt-get -y install wget findutils unzip curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false /usr/local/antmedia/antmedia start From 0a10b7a3ecd72a94ba3b4b08da4d34ffd696b2a3 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 20 Nov 2024 01:40:29 +0300 Subject: [PATCH 83/98] Fix installation of packages --- .github/actions/deploy-debian-11/action.yml | 2 +- .github/actions/deploy-debian-12/action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/deploy-debian-11/action.yml b/.github/actions/deploy-debian-11/action.yml index 4059308a..7b00c9d8 100644 --- a/.github/actions/deploy-debian-11/action.yml +++ b/.github/actions/deploy-debian-11/action.yml @@ -8,7 +8,7 @@ runs: shell: bash run: | apt-get update - apt-get -y install wget findutils unzip + apt-get -y install wget findutils unzip curl curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false /usr/local/antmedia/antmedia start diff --git a/.github/actions/deploy-debian-12/action.yml b/.github/actions/deploy-debian-12/action.yml index 3ed46c2a..66f24c80 100644 --- a/.github/actions/deploy-debian-12/action.yml +++ b/.github/actions/deploy-debian-12/action.yml @@ -8,7 +8,7 @@ runs: shell: bash run: | apt-get update - apt-get -y install wget findutils unzip + apt-get -y install wget findutils unzip curl curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false /usr/local/antmedia/antmedia start From 50258f94b05c87faf64d3221d1e90c44f08755e4 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Wed, 20 Nov 2024 01:44:34 +0300 Subject: [PATCH 84/98] Add Debian 11 support to installation script --- install_ant-media-server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_ant-media-server.sh b/install_ant-media-server.sh index 1e2f3c75..71005f4d 100755 --- a/install_ant-media-server.sh +++ b/install_ant-media-server.sh @@ -182,7 +182,7 @@ distro () { exit 1 fi - if [[ $VERSION_ID != 18.04 ]] && [[ $VERSION_ID != 20.04 ]] && [[ $VERSION_ID != 22.04 ]] && [[ $VERSION_ID != 24.04 ]] && [[ $VERSION_ID != 8* ]] && [[ $VERSION_ID != 9* ]] && [[ $VERSION_ID != 12 ]]; then + if [[ $VERSION_ID != 18.04 ]] && [[ $VERSION_ID != 20.04 ]] && [[ $VERSION_ID != 22.04 ]] && [[ $VERSION_ID != 24.04 ]] && [[ $VERSION_ID != 8* ]] && [[ $VERSION_ID != 9* ]] && [[ $VERSION_ID != 12 ]] && [[ $VERSION_ID != 11 ]]; then echo $msg exit 1 fi From 41beeb39f30c496829505156a35fa31fd83f9b38 Mon Sep 17 00:00:00 2001 From: mekya Date: Tue, 10 Dec 2024 20:14:59 +0300 Subject: [PATCH 85/98] Make origin endpoint use edge server as backup vice versa --- nginx/install_and_configure_nginx.sh | 9 +++++++++ nginx/nginx.conf | 2 ++ 2 files changed, 11 insertions(+) diff --git a/nginx/install_and_configure_nginx.sh b/nginx/install_and_configure_nginx.sh index 03281788..cd11eef2 100644 --- a/nginx/install_and_configure_nginx.sh +++ b/nginx/install_and_configure_nginx.sh @@ -66,8 +66,10 @@ update_nginx_config() { # Generate the server blocks configuration based on the IP addresses origin_server_blocks="" + origin_server_blocks_backup="" for ip in "${origin_server_ips[@]}"; do origin_server_blocks+="\n server $ip:$HTTP_PORT;\n" + origin_server_blocks_backup+="\n server $ip:$HTTP_PORT backup;\n" done rtmp_origin_server_blocks="" @@ -81,14 +83,21 @@ update_nginx_config() { done edge_server_blocks="" + edge_server_blocks_backup="" for ip in "${edge_server_ips[@]}"; do edge_server_blocks+="\n server $ip:$HTTP_PORT;\n" + edge_server_blocks_backup+="\n server $ip:$HTTP_PORT backup;\n" done + sudo sed -i "s/{{ORIGIN_SERVER_BLOCKS}}/$origin_server_blocks/g" $nginx_config + sudo sed -i "s/{{ORIGIN_SERVER_BLOCKS_BACKUP}}/$edge_server_blocks_backup/g" $nginx_config #put edge servers as backup for origin servers + sudo sed -i "s/{{RTMP_SERVER_BLOCKS}}/$rtmp_origin_server_blocks/g" $nginx_config sudo sed -i "s/{{ORIGIN_SRT_SERVER_BLOCKS}}/$srt_origin_server_blocks/g" $nginx_config sudo sed -i "s/{{EDGE_SERVER_BLOCKS}}/$edge_server_blocks/g" $nginx_config + sudo sed -i "s/{{EDGE_SERVER_BLOCKS_BACKUP}}/$origin_server_blocks_backup/g" $nginx_config #put origin servers as backup for edge servers + sudo sed -i "s/{{YOUR_DOMAIN}}/$domain/g" $nginx_config # Check if a ssl enabled name is provided diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 5aae833e..31c8cc70 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -54,6 +54,7 @@ http { upstream antmedia_origin { least_conn; {{ORIGIN_SERVER_BLOCKS}} + {{ORIGIN_SERVER_BLOCKS_BACKUP}} #server {AMS_ORIGIN1_IP}:5080; } @@ -62,6 +63,7 @@ http { upstream antmedia_edge { least_conn; {{EDGE_SERVER_BLOCKS}} + {{EDGE_SERVER_BLOCKS_BACKUP}} #server {AMS_EDGE1_IP}:5080; } From cfdae6e64bf0e666aa8c249013fe3df167639a90 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 17 Dec 2024 13:34:03 +0300 Subject: [PATCH 86/98] Remove RockyLinux 8 --- docker/Dockerfile_RockyLinux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile_RockyLinux b/docker/Dockerfile_RockyLinux index bc59a87c..5aa56aff 100644 --- a/docker/Dockerfile_RockyLinux +++ b/docker/Dockerfile_RockyLinux @@ -1,4 +1,4 @@ -FROM rockylinux/rockylinux:8.6 +FROM rockylinux/rockylinux:9.3 ARG AntMediaServer ARG BranchName=master From 515407c26749f9ef284cc9360dcf5c1c2311179a Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 17 Dec 2024 13:37:14 +0300 Subject: [PATCH 87/98] Remove AlmaLinux 8 support --- .github/workflows/almalinux.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/almalinux.yml b/.github/workflows/almalinux.yml index 91d82559..1f08af36 100644 --- a/.github/workflows/almalinux.yml +++ b/.github/workflows/almalinux.yml @@ -2,14 +2,8 @@ name: AlmaLinux on: [push] jobs: - Almalinux8: - runs-on: ubuntu-20.04 - container: almalinux:8 - steps: - - uses: actions/checkout@v3 - - uses: ./.github/actions/deploy-almalinux Almalinux9: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 container: almalinux:9 steps: - uses: actions/checkout@v3 From f2abb98abb3736d651089cd2e41cdeaac5c4b5aa Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 17 Dec 2024 13:37:28 +0300 Subject: [PATCH 88/98] Remove Centos 8 support --- .github/workflows/centos.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/centos.yml b/.github/workflows/centos.yml index d69e3bec..9b0fbb07 100644 --- a/.github/workflows/centos.yml +++ b/.github/workflows/centos.yml @@ -3,9 +3,8 @@ on: [push] jobs: Centos8: - runs-on: ubuntu-20.04 - container: centos:8 + runs-on: ubuntu-24.04 + container: centos:9 steps: - uses: actions/checkout@v3 - uses: ./.github/actions/deploy-centos - From 44ef24ee02e755a3cd2d79ba73404ed6a60520aa Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 17 Dec 2024 13:37:50 +0300 Subject: [PATCH 89/98] Remove RockyLinux 8 support --- .github/workflows/rockylinux.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/rockylinux.yml b/.github/workflows/rockylinux.yml index 85998ec4..576987af 100644 --- a/.github/workflows/rockylinux.yml +++ b/.github/workflows/rockylinux.yml @@ -2,15 +2,9 @@ name: RockyLinux on: [push] jobs: - RockyLinux8: - runs-on: ubuntu-20.04 - container: rockylinux:8 - steps: - - uses: actions/checkout@v3 - - uses: ./.github/actions/deploy-rockylinux RockyLinux9: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 container: rockylinux:9 steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/deploy-rockylinux-9 + - uses: ./.github/actions/deploy-rockylinux-9 \ No newline at end of file From 0bfa7e75daad8087c3a6fb6aa9a11edbb270eb94 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 17 Dec 2024 13:38:21 +0300 Subject: [PATCH 90/98] Add Ubuntu 24.04 --- .github/workflows/ams-utilizations.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ams-utilizations.yml b/.github/workflows/ams-utilizations.yml index 27c3b3f5..5f58f848 100644 --- a/.github/workflows/ams-utilizations.yml +++ b/.github/workflows/ams-utilizations.yml @@ -25,3 +25,12 @@ jobs: - name: Set up MongoDB run: | bash ./install_mongodb.sh + mongodb_install_ubuntu_24_04: + runs-on: ubuntu-24.04 + + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Set up MongoDB + run: | + bash ./install_mongodb.sh \ No newline at end of file From ee108588ba3bfb04af7d37dca580fbd8b106d573 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 17 Dec 2024 14:01:26 +0300 Subject: [PATCH 91/98] Remove support for Ubuntu 18.04 and RockyLinux, AlmaLinux CentOS 8 from the installation script --- install_ant-media-server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_ant-media-server.sh b/install_ant-media-server.sh index 71005f4d..6beb7008 100755 --- a/install_ant-media-server.sh +++ b/install_ant-media-server.sh @@ -161,7 +161,7 @@ distro () { os_release="/etc/os-release" if [ -f "$os_release" ]; then . $os_release - msg="We are supporting Ubuntu 18.04, Ubuntu 20.04, Ubuntu 22.04, Ubuntu 24.04, Centos 8, Centos 9, RockyLinux 8, RockyLinux 9, AlmaLinux 8 and AlmaLinux 9" + msg="We are supporting Ubuntu 20.04, Ubuntu 22.04, Ubuntu 24.04, Centos 9, RockyLinux 9 and AlmaLinux 9" if [ "$OTHER_DISTRO" == "true" ]; then echo -e """\n- OpenJDK 11 (openjdk-11-jdk)\n- De-archiver (unzip)\n- Commons Daemon (jsvc)\n- Apache Portable Runtime Library (libapr1)\n- SSL Development Files (libssl-dev)\n- Video Acceleration (VA) API (libva-drm2)\n- Video Acceleration (VA) API - X11 runtime (libva-x11-2)\n- Video Decode and Presentation API Library (libvdpau-dev)\n- Crystal HD Video Decoder Library (libcrystalhd-dev)\n""" read -p 'Are you sure that the above packages are installed? Y/N ' CUSTOM_PACKAGES From f3b0bd3fc33af3c76a23f475129e2ac3d97e7599 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 17 Dec 2024 16:33:49 +0300 Subject: [PATCH 92/98] Delete Centos Support --- .github/workflows/centos.yml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 .github/workflows/centos.yml diff --git a/.github/workflows/centos.yml b/.github/workflows/centos.yml deleted file mode 100644 index 9b0fbb07..00000000 --- a/.github/workflows/centos.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: Centos -on: [push] - -jobs: - Centos8: - runs-on: ubuntu-24.04 - container: centos:9 - steps: - - uses: actions/checkout@v3 - - uses: ./.github/actions/deploy-centos From 79ffed03fb28b0d549a622d8cf5b4105373ac9eb Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 17 Dec 2024 19:18:30 +0300 Subject: [PATCH 93/98] Update install_ant-media-server.sh --- install_ant-media-server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_ant-media-server.sh b/install_ant-media-server.sh index 6beb7008..521153d6 100755 --- a/install_ant-media-server.sh +++ b/install_ant-media-server.sh @@ -182,7 +182,7 @@ distro () { exit 1 fi - if [[ $VERSION_ID != 18.04 ]] && [[ $VERSION_ID != 20.04 ]] && [[ $VERSION_ID != 22.04 ]] && [[ $VERSION_ID != 24.04 ]] && [[ $VERSION_ID != 8* ]] && [[ $VERSION_ID != 9* ]] && [[ $VERSION_ID != 12 ]] && [[ $VERSION_ID != 11 ]]; then + if [[ $VERSION_ID != 20.04 ]] && [[ $VERSION_ID != 22.04 ]] && [[ $VERSION_ID != 24.04 ]] && [[ $VERSION_ID != 9* ]] && [[ $VERSION_ID != 12 ]] && [[ $VERSION_ID != 11 ]]; then echo $msg exit 1 fi From d100d3c1761c4ee50ade381a076da543913038fd Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 17 Dec 2024 19:26:10 +0300 Subject: [PATCH 94/98] Add dynamic branch detection to Docker build in GitHub Actions --- .../workflows/ant-media-server-docker-multi-platform.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ant-media-server-docker-multi-platform.yml b/.github/workflows/ant-media-server-docker-multi-platform.yml index 7c24d03c..c8f04620 100644 --- a/.github/workflows/ant-media-server-docker-multi-platform.yml +++ b/.github/workflows/ant-media-server-docker-multi-platform.yml @@ -54,7 +54,11 @@ jobs: run: wget --quiet https://raw.githubusercontent.com/ant-media/Scripts/master/docker/Dockerfile_RockyLinux -O Dockerfile - name: Build Docker image - run: docker build --network=host -t antmediaserver:latest --build-arg AntMediaServer=ant-media-server-community.zip . + env: + BRANCH_NAME: ${{ github.ref_name }} + run: | + echo "Building Docker image with branch: $BRANCH_NAME" + docker build --network=host -t antmediaserver:latest --build-arg AntMediaServer=ant-media-server-community.zip --build-arg BranchName=$BRANCH_NAME . - name: Run the image run: docker run -d -p 5080:5080 --name antmediaserver antmediaserver From d697596eafe6677836ce01228bd24b127886f78e Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 17 Dec 2024 19:33:53 +0300 Subject: [PATCH 95/98] Update ant-media-server-docker-multi-platform.yml --- .../ant-media-server-docker-multi-platform.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ant-media-server-docker-multi-platform.yml b/.github/workflows/ant-media-server-docker-multi-platform.yml index c8f04620..fb63ac60 100644 --- a/.github/workflows/ant-media-server-docker-multi-platform.yml +++ b/.github/workflows/ant-media-server-docker-multi-platform.yml @@ -5,6 +5,8 @@ on: [push] jobs: ams_ubuntu_docker_test: runs-on: ubuntu-latest + env: + BRANCH_NAME: ${{ github.ref_name }} steps: - name: Checkout code uses: actions/checkout@v3 @@ -13,10 +15,10 @@ jobs: run: curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) - name: Download Dockerfile - run: wget --quiet https://raw.githubusercontent.com/ant-media/Scripts/master/docker/Dockerfile_Process -O Dockerfile + run: wget --quiet https://raw.githubusercontent.com/ant-media/Scripts/$BRANCH_NAME/docker/Dockerfile_Process -O Dockerfile - name: Build Docker image - run: docker build --network=host -t antmediaserver:latest --build-arg AntMediaServer=ant-media-server-community.zip . + run: docker build --network=host -t antmediaserver:latest --build-arg AntMediaServer=ant-media-server-community.zip BranchName=$BRANCH_NAME . - name: Run the image run: docker run -d -p 5080:5080 --name antmediaserver antmediaserver @@ -43,6 +45,8 @@ jobs: ams_rockylinux_docker_test: runs-on: ubuntu-latest + env: + BRANCH_NAME: ${{ github.ref_name }} steps: - name: Checkout code uses: actions/checkout@v3 @@ -51,11 +55,9 @@ jobs: run: curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) - name: Download Dockerfile - run: wget --quiet https://raw.githubusercontent.com/ant-media/Scripts/master/docker/Dockerfile_RockyLinux -O Dockerfile + run: wget --quiet https://raw.githubusercontent.com/ant-media/Scripts/$BRANCH_NAME/docker/Dockerfile_RockyLinux -O Dockerfile - name: Build Docker image - env: - BRANCH_NAME: ${{ github.ref_name }} run: | echo "Building Docker image with branch: $BRANCH_NAME" docker build --network=host -t antmediaserver:latest --build-arg AntMediaServer=ant-media-server-community.zip --build-arg BranchName=$BRANCH_NAME . From 59e4a0da540353a8cd5df1441e558457f982448f Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 17 Dec 2024 19:35:58 +0300 Subject: [PATCH 96/98] Update ant-media-server-docker-multi-platform.yml --- .github/workflows/ant-media-server-docker-multi-platform.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ant-media-server-docker-multi-platform.yml b/.github/workflows/ant-media-server-docker-multi-platform.yml index fb63ac60..e54bd41b 100644 --- a/.github/workflows/ant-media-server-docker-multi-platform.yml +++ b/.github/workflows/ant-media-server-docker-multi-platform.yml @@ -55,7 +55,9 @@ jobs: run: curl -L -o ant-media-server-community.zip $(curl -s https://api.github.com/repos/ant-media/Ant-Media-Server/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) - name: Download Dockerfile - run: wget --quiet https://raw.githubusercontent.com/ant-media/Scripts/$BRANCH_NAME/docker/Dockerfile_RockyLinux -O Dockerfile + run: | + echo "Building Docker image with branch: $BRANCH_NAME" + wget --quiet https://raw.githubusercontent.com/ant-media/Scripts/$BRANCH_NAME/docker/Dockerfile_RockyLinux -O Dockerfile - name: Build Docker image run: | From 50ef604b97a48b3a1916373e5b830a1ba27d72b2 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 17 Dec 2024 20:12:58 +0300 Subject: [PATCH 97/98] Update Dockerfile_RockyLinux --- docker/Dockerfile_RockyLinux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile_RockyLinux b/docker/Dockerfile_RockyLinux index 5aa56aff..b92ca13e 100644 --- a/docker/Dockerfile_RockyLinux +++ b/docker/Dockerfile_RockyLinux @@ -4,7 +4,7 @@ ARG AntMediaServer ARG BranchName=master #Running update and install makes the builder not to use cache which resolves some updates -RUN yum install -y curl wget iproute logrotate which findutils which crontabs unzip +RUN yum install -y curl wget iproute logrotate which findutils which crontabs unzip --allowerasing ADD ./${AntMediaServer} /home From 0688c0ac2adb8e5566f4f5806a3d70c61e54c8c8 Mon Sep 17 00:00:00 2001 From: Murat Ugur Eminoglu Date: Tue, 17 Dec 2024 20:15:40 +0300 Subject: [PATCH 98/98] Fix CI --- .github/workflows/ant-media-server-docker-multi-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ant-media-server-docker-multi-platform.yml b/.github/workflows/ant-media-server-docker-multi-platform.yml index e54bd41b..840cab12 100644 --- a/.github/workflows/ant-media-server-docker-multi-platform.yml +++ b/.github/workflows/ant-media-server-docker-multi-platform.yml @@ -18,7 +18,7 @@ jobs: run: wget --quiet https://raw.githubusercontent.com/ant-media/Scripts/$BRANCH_NAME/docker/Dockerfile_Process -O Dockerfile - name: Build Docker image - run: docker build --network=host -t antmediaserver:latest --build-arg AntMediaServer=ant-media-server-community.zip BranchName=$BRANCH_NAME . + run: docker build --network=host -t antmediaserver:latest --build-arg AntMediaServer=ant-media-server-community.zip --build-arg BranchName=$BRANCH_NAME . - name: Run the image run: docker run -d -p 5080:5080 --name antmediaserver antmediaserver