TN Scale - Docker - A Guide ?

Janus0006

Dabbler
Joined
Mar 27, 2021
Messages
46
Hi,
I migrated to TN Scale with the mindset to use it as my NAS but also my server running all my littles tools for the core of my Homelab. I curently running couple of docker one a VM like:
Zabbix
Confluence
Unifi Controller
pihole
phpipam
telegraf/grafana/influxdb
flaresolverr
cloudflare-ddns - to keep my DNS up to date with my dynamic IP

but all of them are launched/"managed" via simple .yml files. I'm really not an expert with docker and less with Kubernetees.

At this point, i'm looking for a plan to move my docker to my TN Scale server, but I really don'T know how. I'm unable to find any guide anywhere on how Scale is really working with docker.
On a alpha version, I tried to launch all my docker with docker-compose and my .yml files. And if I remember corectly, at the next update, I lost all my docker config. (Sign tht it's not the way Scale manage the docker)

So, is there any guide, documentation, lab, or anything helping me to learn how I can run my docker environment on my Scale server ? (A search of docker on the forum give way to much result to imagine find my answer rapidly)

Thanks for you help

P.S.: I really love Scale and I would not go back to any other solution, thack all the team behind it.
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
Its best to think of it as TrueNAS SCALE runs docker containers.. not docker itself. It uses Kubernetes to run the containers because Kubernetes has long term industry support.

Each of your tools would be migrated to Kubernetes. Single container apps are easier: https://www.truenas.com/docs/scale/apps/docker/

Multi-container apps will require more work... if you have trouble with a specifc apps, then use these community forums.

https://truecharts.org/ is building up quite a library with some of your tools.
 

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
Most of the Apps on your list are super complex to write SCALE Apps for and not really "add container and go" type of applications.
Some of them are on my personal todo-list for TrueCharts though, so stay posted! :)
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
In the meantime, you can run a VM with docker and support your existing apps. Migrate them one at a time before turning off the VM.
 

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
Or install normal Helm charts for them, that would work for the time being and not interfere with SCALE too much...
 

Janus0006

Dabbler
Joined
Mar 27, 2021
Messages
46
OK, so as I can understand, Scale is not really allow me to run docker. It only runs apps in docker compare to core running apps in jail ...
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
OK, so as I can understand, Scale is not really allow me to run docker. It only runs apps in docker compare to core running apps in jail ...
Not quite, SCALE runs apps in Linux containers compared with CORE running apps in FreeBSD jails.
The apps can be docker containers or helm charts with multiple containers.... Kubernetes is the container management environment.
 

Janus0006

Dabbler
Joined
Mar 27, 2021
Messages
46
The apps can be docker containers or helm charts with multiple containers.... Kubernetes is the container management environment

But can we run any docker from a simple .yml file ? or we must use the app available from catalog ? (Official or Truechart)
 

Janus0006

Dabbler
Joined
Mar 27, 2021
Messages
46
Running docker containers is supported...see the docs. https://www.truenas.com/docs/scale/apps/docker/
I tried the example in this link (pihole) and ... as I already said, i'm not a docker expert, but this example ask us to un pihole, listening on port 9053 tcp/udp for DNS request.

How in real world, you can easily ask to "everything" to make DNS request to 9053 instead of standard 53 ? It's not optimal or standard.

I understand limitation of port over 9000 to be sure no docker will use port used by TN Scale, but personally, I always assign IP dedicated for my docker. In this case, using port 53 of the additional IP will not impact Scale, should be allowed no ?

I know i'm still begining to work with Scale, and must learn how it really works, what are the limits, the possibilities. But for now, where I am in my learning, I'm a but disapointed. If the solution to use docker "correctly" is to launch a linux VM to run my docker, what is the real advantage of Scale over Core ? Linux kernel ?

Thanks for your comment, solution or other.
Sorry if all my question or comment may be interpreted as negative, but it's not. I'm simply trying to understand this system to finally fall in love with it.
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
I tried the example in this link (pihole) and ... as I already said, i'm not a docker expert, but this example ask us to un pihole, listening on port 9053 tcp/udp for DNS request.

How in real world, you can easily ask to "everything" to make DNS request to 9053 instead of standard 53 ? It's not optimal or standard.

I understand limitation of port over 9000 to be sure no docker will use port used by TN Scale, but personally, I always assign IP dedicated for my docker. In this case, using port 53 of the additional IP will not impact Scale, should be allowed no ?

I know i'm still begining to work with Scale, and must learn how it really works, what are the limits, the possibilities. But for now, where I am in my learning, I'm a but disapointed. If the solution to use docker "correctly" is to launch a linux VM to run my docker, what is the real advantage of Scale over Core ? Linux kernel ?

Thanks for your comment, solution or other.
Sorry if all my question or comment may be interpreted as negative, but it's not. I'm simply trying to understand this system to finally fall in love with it.

Agree you want port 53 available to external machines. There is a thread on pi-hole... https://www.truenas.com/community/threads/pihole-on-scale.92758/#post-642269

There are configuration options for port forwarding and networking. https://www.truenas.com/docs/scale/apps/usingapps/

Otherwise start a thread on that topic, if you can't find a good answer.
 

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
Agree you want port 53 available to external machines. There is a thread on pi-hole... https://www.truenas.com/community/threads/pihole-on-scale.92758/#post-642269

There are configuration options for port forwarding and networking. https://www.truenas.com/docs/scale/apps/usingapps/

Otherwise start a thread on that topic, if you can't find a good answer.
I can:
Nodeport does not allow the forwarding of port 53.
I've pihole on my TrueCharts to do list and we use loadbalancer on port 53 (and other low ports) to bypass this restriction when needed :)
 
Last edited:

Janus0006

Dabbler
Joined
Mar 27, 2021
Messages
46
you can run a VM with docker and support your existing apps
Regarding this solution ... Is is possible to migrate a VMWare VM to Scale ? Or I must create a new VM and recreate my docker and import data ?
 
Top