Please explain custom apps

Joined
Sep 11, 2021
Messages
11
Hi,

I'm thoroughly confused about what the "custom app" function can do. I'm talking about the built-in Apps/Discover/Custom App UI, not the Truecharts Custom App chart.

I was looking for a way to run a simple web server on TN Scale, and after reading a lot of posts about complicated and not completely well-integrated ways to run a Docker container (hacks, Truecharts' docker-compose), I stumbled upon this "custom app" button. On the surface, it asks questions very similar to how one would configure a single service in docker-compose, which I'm familiar with. So can it run a simple Docker image? But all posts and docs I've read so far have been telling me how Docker and Kubernetes shouldn't mix, and how difficult it is to run Docker images... did I misunderstand them? Or does it run Heml/Kubernetes or whatever "apps" - now that I don't know anything about.

According to the docs (https://www.truenas.com/docs/scale/23.10/scaletutorials/apps/usingcustomapp/), I'm supposed to provide a link to a GitHub repo under "image repository"... but aren't docker images the likes of DockerHub instead of GitHub? What is supposed to be in the GitHub repo?

Anyway, I added a link to nginx image on DockerHub here and installed the app. On the surface (=UI), nothing happened, no sign of any new app whatever. `k3s kubectl get namespace` showed me, however, that my app was created, and it's pod has failed to start with the status "invalidimagename". To me that suggests that the DockerHub URL was not the right choice after all.

So, can anyone explain to me how to use this functionality? The official docs are useless to me, as they don't explain the above key points. It could be a link to an example of a working custom app. Any help would be appreciated.

Add1: Also, how can I delete the previously installed custom app? There's nothing about it on the UI. I'm OK with using the CLI, but I'm unfamiliar with how kubernetes apps can be removed completely.
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
You can't set the image repo, it'll always pull from the docker hub repo. You can set the image name on docker hub, for nginx it's just nginx and then the tag, e.g. stable.

Images built to the image spec that was originated by Docker can be run in any compliant container system, including k8s, k3s and podman.

If it's helpful, here's a custom app deployment for Foundry VTT. May give you some ideas on how it all hangs together. https://foundryvtt.wiki/en/setup/hosting/truenas-scale
 
Joined
Sep 11, 2021
Messages
11
Thank you. After a few attempts, I was also able to figure it out and realise it wasn't that complicated at all. It's only the wording in the docs and the UI being very confusing. Or maybe not confusing to someone who already knows what they mean, but that doesn't make it a good UI. Apps aren't helm charts like all the other apps but containers; Github repo isn't github but the container's repository, same as when using Docker.

It's surprising, that all my search after a simple solution for running a container (nginx in my case) on Scale didn't turn up any mention of "custom apps". I had the strong impression that Docker wasn't meant to work with Scale (which is true but running containers is easy), or that I had to use the docker-compose chart (recently replaced by Docker I think, and it's too complex for a simple container). Maybe my search terms were off, but to a large part I think that the documentation or lack of is at fault.

I ended up using Truecharts' custom-app because it was easy to integrate with their Traefik ingress and get an SSL certificate automatically.
 

majorgear

Dabbler
Joined
Mar 13, 2012
Messages
36
Thank you. After a few attempts, I was also able to figure it out and realise it wasn't that complicated at all. It's only the wording in the docs and the UI being very confusing. Or maybe not confusing to someone who already knows what they mean, but that doesn't make it a good UI. Apps aren't helm charts like all the other apps but containers; Github repo isn't github but the container's repository, same as when using Docker.

It's surprising, that all my search after a simple solution for running a container (nginx in my case) on Scale didn't turn up any mention of "custom apps". I had the strong impression that Docker wasn't meant to work with Scale (which is true but running containers is easy), or that I had to use the docker-compose chart (recently replaced by Docker I think, and it's too complex for a simple container). Maybe my search terms were off, but to a large part I think that the documentation or lack of is at fault.

I ended up using Truecharts' custom-app because it was easy to integrate with their Traefik ingress and get an SSL certificate automatically.
TrueNAS scale uses kubernetes behind the scenes. You can run docker containers inside of kubernetes since it supports containerd and CCI, which are standard interfaces for containers.

You do need to do some translation of docker parameters to kubernetes, but it a docker image will run on it just fine. There are definitely limitations to customer apps version helm charts, such as the ability to define a multiple container POD . AKAIK, that cannot be done in the TrueNAS Scale GUI without a helm chart. It will also show a standard chart version number instead of the container version/tag in the applications interface.

But I run 5-6 docker containers as custom apps without issue.
 
Top