From 33faf48e653112cc1ff94f5a50f467fcb8342025 Mon Sep 17 00:00:00 2001 From: Matthias Neugebauer Date: Wed, 30 Dec 2015 21:23:40 +0100 Subject: [PATCH] Upgrade to Wowza 4.3.0 --- Changelog.md | 3 +++ Dockerfile | 5 +++-- README.md | 14 +++++--------- VERSION | 2 +- docker-compose.yml | 2 +- install.sh | 24 +++++++++--------------- interaction.exp | 32 ++++++++++++++++++++++++++++++++ support/systemd/wowza.service | 4 ++-- 8 files changed, 56 insertions(+), 30 deletions(-) create mode 100755 interaction.exp diff --git a/Changelog.md b/Changelog.md index 49f016e..cff3b74 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,8 @@ # Changelog +**4.3.0** +- wowza: upgrade to 4.3.0 + **4.1.2-1** - moved data dir to `/var/lib/wowza` - added `WOWZA_ACCEPT_LICENSE` environment variable diff --git a/Dockerfile b/Dockerfile index f85118b..349c6f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,15 @@ FROM sameersbn/ubuntu:14.04.20151213 MAINTAINER sameer@damagehead.com -ENV WOWZA_VERSION=4.1.2 \ +ENV WOWZA_VERSION=4.3.0 \ WOWZA_DATA_DIR=/var/lib/wowza \ WOWZA_LOG_DIR=/var/log/wowza RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y wget supervisor openjdk-7-jre \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y wget supervisor openjdk-7-jre expect \ && rm -rf /var/lib/apt/lists/* +COPY interaction.exp /app/interaction.exp COPY install.sh /app/install.sh RUN bash /app/install.sh diff --git a/README.md b/README.md index ced0a83..01ab303 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,6 @@ [![Docker Repository on Quay.io](https://quay.io/repository/sameersbn/wowza/status "Docker Repository on Quay.io")](https://quay.io/repository/sameersbn/wowza) -> **NOTICE**: -> -> Due to changes in the WOWZA installer, `4.1.x` is the last version that is made available by this image. - -# sameersbn/wowza:4.1.2-6 +# sameersbn/wowza:4.3.0 - [Introduction](#introduction) - [Contributing](#contributing) @@ -58,7 +54,7 @@ Automated builds of the image are available on [Dockerhub](https://hub.docker.co > **Note**: Builds are also available on [Quay.io](https://quay.io/repository/sameersbn/wowza) ```bash -docker pull sameersbn/wowza:4.1.2-6 +docker pull sameersbn/wowza:4.3.0 ``` Alternatively you can build the image yourself. @@ -81,7 +77,7 @@ docker run --name wowza -d --restart=always \ --env 'WOWZA_KEY=xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx' \ --volume /srv/docker/wowza/data:/var/lib/wowza \ --volume /srv/docker/wowza/log:/var/log/wowza \ - sameersbn/wowza:4.1.2-6 + sameersbn/wowza:4.3.0 ``` **The `--env WOWZA_ACCEPT_LICENSE=yes` parameter in the above command indicates that you agree to the Wowza EULA.** @@ -129,7 +125,7 @@ To upgrade to newer releases: 1. Download the updated Docker image: ```bash - docker pull sameersbn/wowza:4.1.2-6 + docker pull sameersbn/wowza:4.3.0 ``` 2. Stop the currently running image: @@ -149,7 +145,7 @@ To upgrade to newer releases: ```bash docker run -name wowza -d \ [OPTIONS] \ - sameersbn/wowza:4.1.2-6 + sameersbn/wowza:4.3.0 ``` ## Shell Access diff --git a/VERSION b/VERSION index 715b28c..8089590 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.1.2-6 +4.3.0 diff --git a/docker-compose.yml b/docker-compose.yml index ca16077..19663eb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ Wowza: - image: sameersbn/wowza:4.1.2-6 + image: sameersbn/wowza:4.3.0 environment: - WOWZA_ACCEPT_LICENSE=yes - WOWZA_KEY= diff --git a/install.sh b/install.sh index 32a96df..df97e23 100755 --- a/install.sh +++ b/install.sh @@ -1,26 +1,20 @@ #!/bin/bash set -e -WOWZA_INSTALLER_URL="http://www.wowza.com/downloads/WowzaStreamingEngine-4-1-2/WowzaStreamingEngine-${WOWZA_VERSION}.deb.bin" +WOWZA_INSTALLER_URL="https://www.wowza.com/downloads/WowzaStreamingEngine-${WOWZA_VERSION//./-}/WowzaStreamingEngine-${WOWZA_VERSION}-linux-x64-installer.run" +WOWZA_INSTALLER_FILE="WowzaStreamingEngine.run" -# download wowza installer -wget "${WOWZA_INSTALLER_URL}" -O WowzaStreamingEngine-${WOWZA_VERSION}.deb.bin +cd /app -# disable user interaction during install -sed 's/^more <<"EOF"$/cat <<"EOF"/' -i WowzaStreamingEngine-${WOWZA_VERSION}.deb.bin -sed 's/^agreed=$/agreed=1/' -i WowzaStreamingEngine-${WOWZA_VERSION}.deb.bin -sed 's/^ADMINUSER=$/ADMINUSER=admin/' -i WowzaStreamingEngine-${WOWZA_VERSION}.deb.bin -sed 's/\$ADMINUSER \$ADMINPASS1 admin/\$ADMINUSER admin admin/' -i WowzaStreamingEngine-${WOWZA_VERSION}.deb.bin -sed 's/^PWMATCH=$/PWMATCH=1/' -i WowzaStreamingEngine-${WOWZA_VERSION}.deb.bin -sed 's/^VALIDLICKEY=$/VALIDLICKEY=1/' -i WowzaStreamingEngine-${WOWZA_VERSION}.deb.bin -sed 's/STARTSERVICES=$/STARTSERVICES=0/' -i WowzaStreamingEngine-${WOWZA_VERSION}.deb.bin +# download wowza installer +wget "${WOWZA_INSTALLER_URL}" -O "${WOWZA_INSTALLER_FILE}" # install wowza streaming engine -chmod +x WowzaStreamingEngine-${WOWZA_VERSION}.deb.bin -./WowzaStreamingEngine-${WOWZA_VERSION}.deb.bin +chmod +x "${WOWZA_INSTALLER_FILE}" +./interaction.exp -# remove installer -rm -rf WowzaStreamingEngine-${WOWZA_VERSION}.deb.bin WowzaStreamingEngine-${WOWZA_VERSION}.deb +# remove installer and old temporary license +rm -rf "${WOWZA_INSTALLER_FILE}" /usr/local/WowzaStreamingEngine/conf/Server.license # move supervisord.log file to ${WOWZA_LOG_DIR}/supervisor/ sed 's|^logfile=.*|logfile='"${WOWZA_LOG_DIR}"'/supervisor/supervisord.log ;|' -i /etc/supervisor/supervisord.conf diff --git a/interaction.exp b/interaction.exp new file mode 100755 index 0000000..d366ca0 --- /dev/null +++ b/interaction.exp @@ -0,0 +1,32 @@ +#!/usr/bin/expect -f + +# Modified version of https://github.com/simplycycling/ansible-wowza/blob/f6ed47147d6ab318230f978be99322b9fe58d8eb/templates/script.exp.j2 + +set timeout -1 +spawn ./WowzaStreamingEngine.run + +expect { + -gl "*Press *Enter* to continue*" { send -- "\r"; exp_continue } + -gl "*Do you accept this agreement*" +} +send -- "\ry\r" + +expect -gl "*License Key*" +send -- "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxx\r" + +expect -gl "*User Name*" +send -- "admin\r" + +expect -gl "*Password*" +send -- "admin\r" + +expect -gl "*Confirm Password*" +send -- "admin\r" + +expect -gl "*Start Wowza Streaming Engine automatically*" +send -- "n\r" + +expect -gl "*Do you want to continue*" +send -- "y\r" + +expect eof diff --git a/support/systemd/wowza.service b/support/systemd/wowza.service index 562184f..8f542ec 100644 --- a/support/systemd/wowza.service +++ b/support/systemd/wowza.service @@ -6,8 +6,8 @@ Requires=docker.service [Service] ExecStartPre=-/usr/bin/docker kill wowza ExecStartPre=-/usr/bin/docker rm wowza -#ExecStartPre=-/usr/bin/docker pull sameersbn/wowza:4.1.2-6 -ExecStart=/usr/bin/docker run --name wowza --publish 1935:1935 --publish 8086:8086 --publish 8087:8087 --publish 8088:8088 --env 'WOWZA_ACCEPT_LICENSE=yes' --env 'WOWZA_KEY=xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx' --volume /srv/docker/wowza/data:/var/lib/wowza --volume /srv/docker/wowza/log:/var/log/wowza sameersbn/wowza:4.1.2-6 +#ExecStartPre=-/usr/bin/docker pull sameersbn/wowza:4.3.0 +ExecStart=/usr/bin/docker run --name wowza --publish 1935:1935 --publish 8086:8086 --publish 8087:8087 --publish 8088:8088 --env 'WOWZA_ACCEPT_LICENSE=yes' --env 'WOWZA_KEY=xxxx-xxxx-xxxx-xxxx-xxxx-xxxx-xxxx' --volume /srv/docker/wowza/data:/var/lib/wowza --volume /srv/docker/wowza/log:/var/log/wowza sameersbn/wowza:4.3.0 ExecStop=/usr/bin/docker stop wowza [Install]