Skip to content

Commit

Permalink
Refine installer for lightsail. v5.14.19
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed May 7, 2024
1 parent df32038 commit a18ae88
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 12 deletions.
29 changes: 29 additions & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,34 @@ Be aware that the cache will store the CORS headers as well. This means that if
and obtain HLS without CORS, it will remain without CORS even when a request includes an
Origin header that necessitates CORS.

## Product the Lightsail Installer

Build the image with docker:

```bash
docker rm -f script 2>/dev/null &&
docker rmi srs-script-dev 2>/dev/null || echo OK &&
docker build -t srs-script-dev -f scripts/setup-ubuntu/Dockerfile.script .
```

Create a docker container in daemon:

```bash
docker rm -f script 2>/dev/null &&
docker run -p 2022:2022 -p 2443:2443 -p 1935:1935 -p 8000:8000/udp -p 10080:10080/udp \
--env CANDIDATE=$(ifconfig en0 |grep 'inet ' |awk '{print $2}') \
--privileged -v /sys/fs/cgroup:/sys/fs/cgroup:rw --cgroupns=host \
-d --rm -it -v $(pwd):/g -w /g --name=script srs-script-dev
```

> Note: For Linux server, please use `--privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro` to start docker.
Install Oryx with script:

```bash
docker exec -it -w /tmp script bash /g/scripts/lightsail.sh
```

## Use HELM to Install Oryx

Install [HELM](https://helm.sh/docs/intro/install/) and [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/),
Expand Down Expand Up @@ -1164,6 +1192,7 @@ The following are the update records for the Oryx server.
* API: Support kickoff stream by name. v5.14.16
* AI-Talk: Refine the delay of ASR to 3s. [v5.14.17](https://github.com/ossrs/oryx/releases/tag/v5.14.17)
* AI-Talk: Ignore silent ASR text. v5.14.18
* Refine installer for lightsail. [v5.14.19](https://github.com/ossrs/oryx/releases/tag/v5.14.19)
* v5.13:
* Fix bug for vlive and transcript. v5.13.1
* Support AWS Lightsail install script. v5.13.2
Expand Down
2 changes: 1 addition & 1 deletion platform/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
package main

// The version for platform.
const version = "v5.14.17"
const version = "v5.14.19"
32 changes: 24 additions & 8 deletions scripts/lightsail.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
#!/bin/bash

sudo apt-get update -y &&
sudo apt-get install -y curl docker.io
if [[ $? -ne 0 ]]; then echo "Install curl failed."; exit 1; fi
SUDO=sudo
if [[ $EUID -eq 0 ]]; then
SUDO=
fi
echo "Use SUDO=$SUDO"

if [[ $(curl --version 1>/dev/null 2>/dev/null && docker --version 1>/dev/null 2>/dev/null && echo yes) != yes ]]; then
$SUDO apt-get update -y &&
$SUDO apt-get install -y curl docker.io
if [[ $? -ne 0 ]]; then echo "Error: Install curl failed."; exit 1; fi
fi
echo "Check curl and docker ok."

rm -f linux-oryx-en.tar.gz &&
curl -O -fsSL https://github.com/ossrs/oryx/releases/latest/download/linux-oryx-en.tar.gz
if [[ $? -ne 0 ]]; then echo "Download oryx failed."; exit 1; fi
if [[ $? -ne 0 ]]; then echo "Error: Download oryx failed."; exit 1; fi
echo "Download Oryx ok."

tar xf linux-oryx-en.tar.gz
if [[ $? -ne 0 ]]; then echo "Unpack oryx failed."; exit 1; fi
if [[ $? -ne 0 ]]; then echo "Error: Unpack oryx failed."; exit 1; fi
if [[ ! -f oryx/mgmt/bootstrap ]]; then
echo "Error: No bootstrap found."; exit 1;
fi
echo "Unpack Oryx ok."

sed -i 's|MGMT_PORT=2022|MGMT_PORT=80|g' oryx/mgmt/bootstrap &&
sed -i 's|HTTPS_PORT=2443|HTTPS_PORT=443|g' oryx/mgmt/bootstrap
if [[ $? -ne 0 ]]; then echo "Update bootstrap failed."; exit 1; fi
if [[ $? -ne 0 ]]; then echo "Error: Update bootstrap failed."; exit 1; fi
echo "Update bootstrap ok."

sudo bash oryx/scripts/setup-ubuntu/install.sh
if [[ $? -ne 0 ]]; then echo "Install oryx failed."; exit 1; fi
$SUDO bash oryx/scripts/setup-ubuntu/install.sh
if [[ $? -ne 0 ]]; then echo "Error: Install oryx failed."; exit 1; fi
echo "Install Oryx ok."
2 changes: 1 addition & 1 deletion scripts/setup-aapanel/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Oryx",
"name": "oryx",
"ps": "Oryx(SRS Stack) is an all-in-one, out-of-the-box, and open-source video solution for creating online video services, including live streaming and WebRTC, on the cloud or through self-hosting. Built with SRS, FFmpeg, and WebRTC, it supports various protocols and offers features like authentication, multi-platform streaming, recording, transcoding, virtual live events, AI transcription, AI assistant, Video Dubbing, automatic HTTPS, and HTTP Open API.",
"versions": "5.14.17",
"versions": "5.14.19",
"checks": "/www/server/panel/plugin/oryx",
"author": "Winlin",
"home": "https://github.com/ossrs/oryx"
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup-bt/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Oryx",
"name": "oryx",
"ps": "Oryx(SRS Stack)让你一键拥有自己的视频云解决方案,可以在云上或私有化部署,支持丰富的音视频协议,提供鉴权、私人直播间、多平台转播、录制、转码、虚拟直播、AI字幕、直播间AI助手、视频翻译、自动HTTPS、开放API等丰富功能,基于SRS、FFmpeg和WebRTC构建。",
"versions": "5.14.17",
"versions": "5.14.19",
"checks": "/www/server/panel/plugin/oryx",
"author": "Winlin",
"home": "https://github.com/ossrs/oryx"
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup-droplet/srs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"do_token": "{{env `DIGITALOCEAN_TOKEN`}}",
"image_name": "srs-5-snapshot-{{timestamp}}",
"application_name": "SRS",
"application_version": "5.14.17"
"application_version": "5.14.19"
},
"sensitive-variables": ["do_token"],
"builders": [
Expand Down

0 comments on commit a18ae88

Please sign in to comment.