Skip to content

Commit

Permalink
Upgrade to Wowza 4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mtneug committed Dec 30, 2015
1 parent 0e3fe75 commit 33faf48
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 30 deletions.
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
FROM sameersbn/ubuntu:14.04.20151213
MAINTAINER [email protected]

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

Expand Down
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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.
Expand All @@ -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.**
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.1.2-6
4.3.0
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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=
Expand Down
24 changes: 9 additions & 15 deletions install.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
32 changes: 32 additions & 0 deletions interaction.exp
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions support/systemd/wowza.service
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 33faf48

Please sign in to comment.