Skip to content

Commit

Permalink
Merge branch 'master' into add-supervisor-support
Browse files Browse the repository at this point in the history
  • Loading branch information
mekya authored Jan 19, 2025
2 parents d40cd9d + c04b9ab commit b9e2885
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
run: |
echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
yum -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)
curl -L -o ant-media-server-community.zip https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.11.3/ant-media-server-community-2.11.3.zip
bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false
/usr/local/antmedia/antmedia start
sleep 30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ runs:
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
yum -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)
curl -L -o ant-media-server-community.zip https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.11.3/ant-media-server-community-2.11.3.zip
bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false
/usr/local/antmedia/antmedia start
sleep 30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ runs:
run: |
echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
yum -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)
curl -L -o ant-media-server-community.zip https://github.com/ant-media/Ant-Media-Server/releases/download/ams-v2.11.3/ant-media-server-community-2.11.3.zip
bash ./install_ant-media-server.sh -i ant-media-server-community.zip -s false
/usr/local/antmedia/antmedia start
sleep 30
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/centos8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Centos
on: [push]

jobs:
Centos8:
runs-on: ubuntu-24.04
container: centos:8
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/deploy-centos-8
6 changes: 6 additions & 0 deletions .github/workflows/rockylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: RockyLinux
on: [push]

jobs:
RockyLinux8:
runs-on: ubuntu-24.04
container: rockylinux:8
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/deploy-rockylinux-8
RockyLinux9:
runs-on: ubuntu-24.04
container: rockylinux:9
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/uninstall-ams.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Uninstall Ant Media Server
on: [push]

jobs:
test-uninstall:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up test environment
run: |
sudo apt-get update
sudo apt-get install -y curl systemd
- name: Download and install Ant Media Server
run: |
wget https://raw.githubusercontent.com/ant-media/Scripts/refs/heads/master/install_ant-media-server.sh
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
- name: Verify AMS Installation
run: |
sleep 30
systemctl is-active antmedia
test -d /usr/local/antmedia
ps -aux |grep antmedia
- name: Run uninstall script
run: |
wget https://raw.githubusercontent.com/ant-media/Ant-Media-Server/refs/heads/master/src/main/server/uninstall.sh
sudo bash ./uninstall.sh <<< "yes"
- name: Verify uninstallation
run: |
# Check if service file is removed
test ! -f /etc/systemd/system/antmedia.service
# Check if installation directory is removed
test ! -d /usr/local/antmedia
# Check if log directory is removed
test ! -d /var/log/antmedia
11 changes: 10 additions & 1 deletion install_ant-media-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ distro () {
exit 1
fi

if [[ $VERSION_ID != 20.04 ]] && [[ $VERSION_ID != 22.04 ]] && [[ $VERSION_ID != 24.04 ]] && [[ $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 != 8* ]] && [[ $VERSION_ID != 9* ]] && [[ $VERSION_ID != 12 ]] && [[ $VERSION_ID != 11 ]]; then
echo $msg
exit 1
fi
Expand Down Expand Up @@ -333,6 +333,15 @@ elif [ "$ID" == "centos" ] || [ "$ID" == "rocky" ] || [ "$ID" == "almalinux" ] |
$SUDO yum -y install unzip zip libva libvdpau
$SUDO unzip -o $ANT_MEDIA_SERVER_ZIP_FILE "ant-media-server/ant-media-server.jar" -d /tmp/
VERSION=$(unzip -p /tmp/ant-media-server/ant-media-server.jar | grep -a "Implementation-Version"|cut -d' ' -f2 | tr -d '\r')
OS_VERSION=$(echo $VERSION_ID | cut -d. -f1)

if [ "$OS_VERSION" == "8" ]; then
if [[ "$(printf '%s\n' "$VERSION" "2.12.0" | sort -V | head -n1)" == "2.12.0" ]]; then
echo -e "${RED}AMS version 2.12.0 and above (including version $VERSION) is not supported on $ID 8 distributions.${NC}"
exit 1
fi
fi

if [ "$(printf '%s\n' "$REQUIRED_VERSION" "$VERSION" | sort -V | head -n1)" != "$REQUIRED_VERSION" ]; then
check_version
$SUDO yum -y install libcrystalhd
Expand Down
13 changes: 13 additions & 0 deletions kubernetes/ams-k8s-deployment-edge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +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"]
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
volumeMounts:
- mountPath: /tmp
name: temp-volume
- mountPath: /var/log/antmedia/
name: log-storage
subPath: ${POD_NAME}
livenessProbe:
httpGet:
path: /
Expand All @@ -68,6 +77,10 @@ spec:
path: /temp-data
type: DirectoryOrCreate
name: temp-volume
- hostPath:
path: /mnt/logs/antmedia
type: DirectoryOrCreate
name: log-storage

# imagePullSecrets:
# - name: docker
14 changes: 13 additions & 1 deletion kubernetes/ams-k8s-deployment-origin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +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"]
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
volumeMounts:
- mountPath: /tmp
name: temp-volume
- mountPath: /var/log/antmedia/
name: log-storage
subPath: ${POD_NAME}
livenessProbe:
httpGet:
path: /
Expand All @@ -68,6 +77,9 @@ spec:
path: /temp-data
type: DirectoryOrCreate
name: temp-volume

- hostPath:
path: /mnt/logs/antmedia
type: DirectoryOrCreate
name: log-storage
# imagePullSecrets:
# - name: docker

0 comments on commit b9e2885

Please sign in to comment.