Skip to content

Conversation

@anarchivist
Copy link
Member

@anarchivist anarchivist commented Nov 25, 2025

This switches Wowza Streaming Engine/Manager from our custom startup scripts to using their default supervisord based setup. In general, this greatly simplifies our custom image.

  • Build from wowzamedia/wowza-streaming-engine-linux:4.9.6.
  • Auto install platform-specific version of OpenJDK 21 and update necessary log4j classes to their appropriate versions.
  • Wrap Python testing scripts in a virtual environment.
  • Readd arm64 to the build matrix.
  • Add healthcheck to the compose file for the API endpoint.
  • Turn Wowza's supervisord config files into templates so we can override them with our preferred settings.
  • Automatically forward supervisord's child process logs to STDOUT and STDERR.

@anarchivist anarchivist force-pushed the AP-515 branch 11 times, most recently from fc71121 to cc4ce8f Compare November 27, 2025 00:28
* Build from wowzamedia/wowza-streaming-engine-linux:4.9.6.
* Auto install platform-specific version of OpenJDK 21 and
  update necessary log4j classes to their appropriate versions.
* Wrap Python testing scripts in a virtual environment.
* Readd arm64 to the build matrix.
* Add healthcheck to the compose file for the API endpoint.
@anarchivist anarchivist changed the title AP-515: upgrade wowza and build arm images AP-515: add 4.9.6 image for cross-platform testing Nov 27, 2025
@anarchivist anarchivist marked this pull request as ready for review November 27, 2025 00:36
logfile=/usr/local/supervisor/supervisord.log ;
pidfile=${SUPERVISORD_PID_FILE} ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
logfile=/dev/stdout ; send supervisor logs to stdout
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to duplicate the logs to stdout (i.e., they're sent twice for the supervisord's process logs):

$ docker compose logs
WARN[0000] The "CI" variable is not set. Defaulting to a blank string.
app-1  | docker-entrypoint.sh running
app-1  | enable-documentation-server.sh running
app-1  | Enabling documentation server
app-1  | Allowing unauthenticated access to documentation server
app-1  | Swagger/OpenAPI documentation server available at http://localhost:8089/api-docs
app-1  | secrets.sh running
app-1  | secrets.sh complete
app-1  | Invoking Wowza's /sbin/entrypoint.sh
app-1  | 2025-12-02 00:07:21,887 INFO Included extra file "/etc/supervisor/conf.d/WowzaStreamingEngine.conf" during parsing
app-1  | 2025-12-02 00:07:21,887 INFO Included extra file "/etc/supervisor/conf.d/WowzaStreamingEngine.conf" during parsing
app-1  | 2025-12-02 00:07:21,887 INFO Included extra file "/etc/supervisor/conf.d/WowzaStreamingEngineManager.conf" during parsing
app-1  | 2025-12-02 00:07:21,887 INFO Included extra file "/etc/supervisor/conf.d/WowzaStreamingEngineManager.conf" during parsing
app-1  | 2025-12-02 00:07:21,887 INFO Set uid to user 40041 succeeded
app-1  | 2025-12-02 00:07:21,887 INFO Set uid to user 40041 succeeded
app-1  | 2025-12-02 00:07:21,892 INFO RPC interface 'supervisor' initialized
app-1  | 2025-12-02 00:07:21,892 INFO RPC interface 'supervisor' initialized
app-1  | 2025-12-02 00:07:21,892 CRIT Server 'unix_http_server' running without any HTTP authentication checking
app-1  | 2025-12-02 00:07:21,892 CRIT Server 'unix_http_server' running without any HTTP authentication checking
app-1  | 2025-12-02 00:07:21,893 INFO supervisord started with pid 1
app-1  | 2025-12-02 00:07:21,893 INFO supervisord started with pid 1
app-1  | 2025-12-02 00:07:22,906 INFO spawned: 'WowzaStreamingEngine' with pid 19
app-1  | 2025-12-02 00:07:22,906 INFO spawned: 'WowzaStreamingEngine' with pid 19
app-1  | 2025-12-02 00:07:22,912 INFO spawned: 'WowzaStreamingEngineManager' with pid 20
app-1  | 2025-12-02 00:07:22,912 INFO spawned: 'WowzaStreamingEngineManager' with pid 20
app-1  | INFO: Main.main: root: /usr/local/WowzaStreamingEngine/manager
app-1  | INFO: Main.main: loadApplication: launch.Application
app-1  | 2025-12-02 00:07:24,512 INFO success: WowzaStreamingEngine entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
app-1  | 2025-12-02 00:07:24,512 INFO success: WowzaStreamingEngine entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
app-1  | 2025-12-02 00:07:24,512 INFO success: WowzaStreamingEngineManager entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
app-1  | 2025-12-02 00:07:24,512 INFO success: WowzaStreamingEngineManager entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

Copy link
Member

@danschmidt5189 danschmidt5189 Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docker recommends a few modifications to this, most notably setting supervisord's logfile to /dev/null:

[supervisord]
nodaemon=true
logfile=/dev/null
logfile_maxbytes=0

[program:app]
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true

I'm not sure why they write program logs to /dev/fd/1 versus the more familar /dev/stdout, when as far as I can tell they're equivalent. From this image:

# ls -l /dev/stdout
lrwxrwxrwx 1 root root 15 Dec  2 07:56 /dev/stdout -> /proc/self/fd/1

# ls -l /proc/self/fd/1
lrwx------ 1 root root 64 Dec  2 07:56 /proc/self/fd/1 -> /dev/pts/0

# ls -l /dev/fd/1
lrwx------ 1 root root 64 Dec  2 07:56 /dev/fd/1 -> /dev/pts/0

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 7bcaad7. nodaemon=true is unnecessary as the Wowza image entrypoint that our entrypoint script execs into calls supervisord -n.

- WOWZA_MANAGER_PASSWORD=${WOWZA_MANAGER_PASSWORD}
- WOWZA_ENABLE_DOCUMENTATION_SERVER=yes
healthcheck:
test: curl -s http://localhost:8087 > /dev/null || exit 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mentioned it in our review this morning but worth asking again here: is there a reason not to include this in the Dockerfile? That would make it easier to configure across environments, and it can still be disabled via healthcheck: { disable: true}.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 7bcaad7.

Copy link
Member

@danschmidt5189 danschmidt5189 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we ought to sort out the logging issue (see the link in my comment for potential guidance). The healthcheck is a minor complaint and IMO not a blocker, but I think it would be an improvement over including that in the Compose file—worth considering.

* follow Docker guidelines for supervisord logging
* move healthcheck to Dockerfile from compose file
Copy link
Member

@danschmidt5189 danschmidt5189 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Now to poke at it on staging. 🚢

@anarchivist anarchivist merged commit 89589bd into main Dec 2, 2025
5 checks passed
@anarchivist anarchivist deleted the AP-515 branch December 2, 2025 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants