Running MediaKube-redux
Before gettings started with mediakube-redux, there are some cautions/warnings/disclaimers/CYA stuff I am going to go into.
Consuming or redistributing copywrite protected content IS A CRIME. Proceed with caution when using any type of content downloads using these system. If you do not own or rights to the content, you should not use these systems. The lack of closed caption for ADA or non-native language subtitles is a valid justification for using this system, but again... ensure you have the appropriate rights.
Let's not get ahead of ourselves
Before going any further, we are going to define the applications needed for the mediakube. There are additional features in the helm chart but they are not fully baked yet. The services we are interested in today are:
- transmission - Torrent agent with VPN
- prowlarr - Indexer for *arr apps
- bazarr - Subtitle grabber
- sonarr - TV show tracker
- radarr - Movie tracker
- lidarr - Music tracker
- readarr - Book tracker
- ombi - Request portal
Or if you ask chatGPT to answer like a pirate:
Sonarr be the scallywag that focuses on TV shows, while Radarr be the plunderer that specializes in movies. Ye can set them up to automatically search for new episodes or movies, and they'll download 'em straight to yer hard drive. No more sailin' the seas of the internet lookin' for yer booty!
But that's not all! These arr apps also be havin' features like automatic file renaming and sorting, so ye can keep yer booty organized and easy to find. They be workin' with many popular torrent and Usenet providers, so ye can choose the provider that suits yer fancy. And they be havin' mobile apps and web interfaces, so ye can manage yer booty from anywhere.
But, let me give ye a warning, matey. Ye need to be careful when using these arr apps, as downloading copyrighted material without permission can land ye in some serious trouble with the law. So, keep yer wits about ye, and use these apps at yer own risk.
So, that be the tale of the arr apps, matey! May ye find yer booty and keep yer sails full! Arrr!
(sorry... I couldn't help myself... now back to the program)
Prerequisites
This whole configuration requires the following pieces of software be installed:
- Git
- Kubernetes (I will be using rancher for this tutorial)
- kubectl/helm
- PowerShell
These tools are all required to follow this tutorial but I will point out where things can be substituted. Some other tools I would recommend are:
- VS Code
- Lens
Getting started
The first step in the process is to make sure you have the appropriate Kubernetes context selected.
kubectl config get-contexts
This should show you which cluster you have selected. If this is your first time working with k8s/k3s you probably only have one context available. Contexts are stored in your ~/.kube/config file and if you have issues with kubectl, I recommend resetting the config file... it usually fixes the problem.
Next open VS Code and press ` + ctrl to toggle open the terminal window. If you are running on a Linux or Mac device, type pwsh to enter a powershell session. Then it is time to clone the source code:git clone https://github.com/Xander-Rudolph/mediakube-redux.git
Once the code is cloned, cd into the repo root: cd mediakube-redux
Now to create the startup script: code configure.ps1
This should open a new vs code tab for configure.ps1. The configure script is going to be used for both getting our helm dependency charts as well as to scrub/substitute the various variables that the script will need to provision.
Setting up the configure.ps1 script
The following code will need values specified for everything but I will break those down next... to start just copy the entire code block into the configure.ps1 file you just created (note you can edit these values right here in the browser before you copy and paste):
We need to update the:
$server - this should be the IP address of your NAS. If you do not have a NAS, you will need to update the helm chart's values file and set the debug.useLocalStore to true. Then $media will point to a local path.
$media - the NFS (not SMB) path to the NAS. If debug.useLocalStore is set to true, this should be local path on the host
$localPath - this is where all files associated with the media clusters configs will live. Keep in mind that the path here should be the relative kubernetes path. For example, if you are using rancher desktop on windows, the node will have all the win directories mounted to /mnt/ so for C:\MyMediaKube the path would be /mnt/c/MyMediaKube. Keep in mind that kubernetes is Linux based so pathing uses that format and is case sensitive. I cannot stress this enough as I have spent endless hours looking at issues where it was a capital letter causing the issue.
$vpn_username - This is the PIA VPN user name (the docker image supports others but this helm chart focuses on PIA)
$vpn_password - This is the PIA VPN password
$vpn_LOC - See here and pick an id that matches the location you want to be connected to
Optional:
$username - I believe this is supposed to dictate the auth/api calls to transmission but, as tested, it doesn't appear to be functional
$password - the password for the above username
$pg_password - this is the root admin for the postgres DB
$bazarrdbpass - this is the password for the bazarr apps db
$radarrdbpass - this is the password for the bazarr apps db
$subdomains - this is a list (or a single) subdomain in duckdns
$token - this is the duckdns token
$url - use a subdomain.duckdns.org to run swag
$authelia and $redis work together but are only required if you plan to implement authentication for your services via traefik (a project I'm still working on).
Let's start the engines
Once the configure script is all updated with those values, type the following into the terminal window: ./configure.ps1
This will automatically update all the values in the helm chart, download the dependency charts, and run the helm install for mediakube.
It may take a few minutes to fully start up since it needs to download LOTS of docker images. Depending on your network connection... you might want to go get a coffee.
If you are unfamiliar with kubernetes, or just don't like typing commands out over and over, I recommend the tool Lens which is an extremely easy to use tool that will make troubleshooting infinitely easier. When the cluster is up and running, this is what the pods should look like in Lens (note the cluster has been running for 14 hours in my screenshot):

If there are any showing orange for an extended period of time, check the pod logs to see if there are any errors.
Let's wire it all up now
Everything should be running now on localhost and routed by Traefik. Additionally the settings in the apps should have the base URL defined. So lets hop into Prowlarr:
http://localhost/prowlarr/settings/downloadclients
The download client needs to be configured to talk to the transmission pod, which should look like this:

Hit the test button to ensure it can connect, then hit save.
Next, set the prowlarr applications:
http://localhost/prowlarr/settings/applications
Add each of the following apps, getting the API keys from the follow pages:
http://localhost/sonarr/settings/general
http://localhost/bazarr/settings/general
http://localhost/lidarr/settings/general
http://localhost/radarr/settings/general
http://localhost/readarr/settings/general
An example configuration would be like this (note each has a different port and the baseurl needs to be included):

After setting up all the apps, the download client and paths need to be mapped appropriately in each app:

then hit the plus button on the right under Remote Path Mappings and map the apps "media" directory to transmissions "data" directory:

All of the following need the download and mapping:
http://localhost/sonarr/settings/downloadclients
http://localhost/bazarr/settings/downloadclients
http://localhost/lidarr/settings/downloadclients
http://localhost/radarr/settings/downloadclients
http://localhost/readarr/settings/downloadclients
The local "Root folder" also needs to be defined:
http://localhost/sonarr/settings/mediamanagement
http://localhost/bazarr/settings/mediamanagement
http://localhost/lidarr/settings/mediamanagement
http://localhost/radarr/settings/mediamanagement
http://localhost/readarr/settings/mediamanagement
I map the local root folder to different folders for each service (ex /media/TV for sonarr):

Setting up the request portal
Next up is Ombi. Let's open up ombi and walk through the init for the app:
Then we will update the connections to the apps:
http://localhost/ombi/Settings/Sonarr
http://localhost/ombi/Settings/Radarr
http://localhost/ombi/Settings/Lidarr
EX:
