Skip to content

An opinionated, containerized mopidy bundle for Kubernetes (alpha)

Notifications You must be signed in to change notification settings

mgoltzsche/mopidy-container

Repository files navigation

Mopidy and Snapcast

This repo aims to provide an opinionated, containerized bundle of Mopidy and Snapcast that runs on both an amd64 linux machine and a Raspberry Pi.

Development

To list the supported targets, run make help.

Prerequisites

Build the application

To build the application container image using skaffold, run:

make image

Test the mopidy container using docker

To test container changes, you can run mopidy simply using docker with the pulseaudio unix socket and cookie mounted:

make run-mopidy

Once mopidy started, you can browse it at http://localhost:6680.

Troubleshooting

When the log doesn't give you sufficient information to find the cause of a problem, you can enable debug logs as follows:

  • To enable Mopidy debug logs, set the env var MOPIDY_OPTS=-v.
  • To enable GStreamer debug logs, set the env var GST_DEBUG=3.

Deploy the application

To deploy the application using skaffold, run:

make deploy

To deploy the application in debug mode (debug ports forwarded), stream its logs and redeploy on source code changes automatically, run:

make debug

To undeploy the application, run:

make undeploy

Apply blueprint updates

To apply blueprint updates to the application codebase, update the kpt package:

  1. Before updating the package, make sure you don't have uncommitted changes in order to be able to distinguish package update changes from others.
  2. Call make blueprint-update or rather kpt pkg update and kpt fn render (applies the configuration within setters.yaml to the manifests and skaffold.yaml).
  3. Before committing the changes, review them carefully and make manual changes if necessary.

TL;DR: Variant Constructor Pattern

Release

The release process is driven by Conventional Commits, letting the CI pipeline generate a version and publish a release depending on the commit messages on the main branch.