Skip to content

Commit

Permalink
Merge branch 'master' into aws-custom-cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
muratugureminoglu authored May 13, 2024
2 parents 8b550f6 + c2bd036 commit 9d60684
Show file tree
Hide file tree
Showing 14 changed files with 1,148 additions and 70 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/check-marketplace-jwt-token.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Marketplace SSL Test

#run tests on schedule because we don't want to generate a subdomain everytime
on:
schedule:
- cron: '0 0 * * 1'



jobs:
run_build:
name: Marketplace SSL Test
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Run enable_ssl.sh for marketplace
uses: appleboy/ssh-action@master
with:
#OVH_REMOTE_HOST has marketplace version deployed
host: ${{ secrets.OVH_REMOTE_HOST }}
username: ${{ secrets.OVH_REMOTE_USERNAME }}
key: ${{ secrets.OVH_SSH_PRIVATE_KEY }}
port: ${{ secrets.OVH_REMOTE_PORT }}
# If the version is not marketplace, following enable_ssl.sh script fails
script: |
SECRET_KEY=$(openssl rand -base64 32 | head -c 32)
sudo sed -i "/^server.jwtServerControlEnabled=/s|.*|server.jwtServerControlEnabled=true|" /usr/local/antmedia/conf/red5.properties
sudo sed -i "/^server.jwtServerSecretKey=/s|.*|server.jwtServerSecretKey=$SECRET_KEY|" /usr/local/antmedia/conf/red5.properties
sudo service antmedia restart
sleep 20
OUTPUT=$(sudo bash /usr/local/antmedia/enable_ssl.sh)
echo "OUTPUT -> $OUTPUT";
HTTPS_URL=$(echo "$OUTPUT" | grep 'You can use this url: '| grep -o 'https://[^ ]*')
echo "HTTPS_URL -> $HTTPS_URL"
sleep 20
status_code=$(curl -o /dev/null -s -I -w "%{http_code}" "$HTTPS_URL")
if [ "$status_code" -eq 200 ]; then
echo "URL($HTTPS_URL) is working: $status_code"
else
echo "URL($HTTPS_URL) is not working: $status_code"
exit 1;
fi
- name: Run enable_ssl.sh for existing domain
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.OVH_REMOTE_HOST }}
username: ${{ secrets.OVH_REMOTE_USERNAME }}
key: ${{ secrets.OVH_SSH_PRIVATE_KEY }}
port: ${{ secrets.OVH_REMOTE_PORT }}
#restore the old domain to not encounter any issue
script: |
sudo bash /usr/local/antmedia/enable_ssl.sh -d ${{ secrets.OVH_REMOTE_HOST }}
27 changes: 27 additions & 0 deletions .github/workflows/install-latest-snapshot-to-ubuntu-24-04.yml
Original file line number Diff line number Diff line change
@@ -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 "<version>" | 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
2 changes: 1 addition & 1 deletion .github/workflows/install-latest-to-ubuntu-22-04.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
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 -l"${{ secrets.ENTERPRISE_LICENSE }}"
- 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: |
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/install-latest-to-ubuntu-24-04.yml
Original file line number Diff line number Diff line change
@@ -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
31 changes: 31 additions & 0 deletions .github/workflows/upgrade-sh-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: upgrade.sh Validation Test
on: [push]

jobs:
install_and_upgrade_ant_media_server:
runs-on: ubuntu-latest
name: Install Previous Version of Ant Media Server
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install Ant Media Server
run: |
curl --progress-bar -o ams_community.zip -L "$(curl -s -H "Accept: application/vnd.github+json" https://api.github.com/repos/ant-media/Ant-Media-Server/releases | jq -r '.[1].assets[0].browser_download_url')"
wget https://raw.githubusercontent.com/ant-media/Scripts/master/install_ant-media-server.sh
sudo bash ./install_ant-media-server.sh -i ams_community.zip
sleep 30
PREVIOUS_VERSION=$(unzip -p /usr/local/antmedia/ant-media-server.jar | grep -a "Implementation-Version"|cut -d' ' -f2 | tr -d '\r')
echo "Previous Version: $PREVIOUS_VERSION"
wget https://raw.githubusercontent.com/ant-media/Ant-Media-Server/master/src/main/server/upgrade.sh
DIR='/usr/local/antmedia/' sudo bash ./upgrade.sh
sleep 20
wget http://localhost:5080 -O index.html
CURRENT_VERSION=$(unzip -p /usr/local/antmedia/ant-media-server.jar | grep -a "Implementation-Version"|cut -d' ' -f2 | tr -d '\r')
(if [ "$(printf "%s\n" "$PREVIOUS_VERSION" "$CURRENT_VERSION" | sort -V | tail -n 1)" = "$PREVIOUS_VERSION" ];
then
echo "It's not upgraded to the latest release.PREVIOUS_VERSION-> $PREVIOUS_VERSION and CURRENT_VERSION-> $CURRENT_VERSION ";
exit 1;
elif [ "$VERSION_PREVIOUS_THAN_LATEST_RELEASE" != "$CURRENT_VERSION" ]; then
echo "Version upgraded to the latest release -> from PREVIOUS_VERSION-> $PREVIOUS_VERSION to CURRENT_VERSION->$CURRENT_VERSION ";
fi)
Loading

0 comments on commit 9d60684

Please sign in to comment.