There are anyway to use a linux as worker for my nas? reddit / selfhosted ---------------------------------------------------------------------- cyl3el2cleal2 · 2023-10-31 08:06 I have a nas (synology) and a mini pc(will install linux + docker) then I would like to use my nas drive as the storage (like storing photos) then use the docker on my linux machine and mount nas drive volume. But this should work when I manage on my linux machine. It will be easier to manage on my nas then use my linux machine as a node/worker for running containers. So if you have any suggestions for this concept please let me know ---------------------------------------------------------------------- ElevenNotes · 2023-10-31 08:10 Mount your NAS via NFS on your mini PC. Make sure when you run a container that the user and group ID in the container match the UID/GID on the NAS. ---------------------------------------------------------------------- cyl3el2cleal2 · 2023-10-31 08:30 Sure. This way I have to manage on linux machine. My question is how to make it easier for manage worker on my nas. ---------------------------------------------------------------------- ElevenNotes · 2023-10-31 08:38 What do you mean with "worker on my nas"? Nothing runs on your NAS. ---------------------------------------------------------------------- cyl3el2cleal2 · 2023-10-31 08:41 https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHVqqbnbMazSWh9N rp0_R2tBd8HaofPP1C0g I mean use my linux machine as a worker. Look this image ---------------------------------------------------------------------- cyl3el2cleal2 · 2023-10-31 08:42 https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRHVqqbnbMazSWh9N rp0_R2tBd8HaofPP1C0g I mean use my linux machine as a worker. Look this image ---------------------------------------------------------------------- thekrautboy · 2023-10-31 08:47 See if you can give the people over on /r/HomeNetworking and /r/Homelab a headache with this. ---------------------------------------------------------------------- DecideUK · 2023-10-31 09:16 I can stare at the image all day long - but this doesn't help me understand "manager worker". ---------------------------------------------------------------------- cyl3el2cleal2 · 2023-10-31 09:44 https://en.m.wikipedia.org/wiki/Master/slave_(technology)#:~:text=Mast er%2Fslave%20is%20the%20historical,serves%20as%20their%20communication %20hub. ---------------------------------------------------------------------- ElevenNotes · 2023-10-31 09:50 Worker for what? Do you want to run k8s? ---------------------------------------------------------------------- cyl3el2cleal2 · 2023-10-31 09:55 just running containers with binding data volume to my nas. Maybe adding some monitoring tool that’ll export to nas(master). ---------------------------------------------------------------------- yakzazazord · 2023-10-31 09:56 What kind of stuff you want to run on your NAS ? your image doesnt make much sense.. ---------------------------------------------------------------------- HoneyNutz · 2023-10-31 09:59 Me in 2023 not realizing slave/master terminology was replaced with worker/master. My age is showing cracks!! ---------------------------------------------------------------------- cyl3el2cleal2 · 2023-10-31 09:59 My nas focus on storing data. My linux machine has better performance so I want to run heavy task(container) on this machine. ---------------------------------------------------------------------- cyl3el2cleal2 · 2023-10-31 10:05 Just similar concept ---------------------------------------------------------------------- ElevenNotes · 2023-10-31 10:17 and you can't do that with mountin the NAS storage via NFS into your containers? ---------------------------------------------------------------------- peteyhasnoshoes · 2023-10-31 10:40 You may be able to use swarm mode or k8s with your NAS as a master and other box as as a worker, but really theres very little point. As others have said, exporting volumes from your NAS via NFS and managing the worker using portainer or ssh to manage the worker directly might be better. This kind of situation, where you have heterogeneous management systems with cross-cutting concerns is a great fit for Ansible - your playbook could provision the NFS volumes form the NAS and push the compose files to the worker at the same time, saving you from having to log in on both ---------------------------------------------------------------------- yakzazazord · 2023-10-31 10:43 cant see why he wouldnt be able to that through a NFS bind.Pretty sure much OP is new to this. ---------------------------------------------------------------------- sebastianelisa · 2023-10-31 10:56 Yes, so? Mount the Storage from your NAS using NFS as said and run the containers there. But I think there is a point that none of us gets..? ---------------------------------------------------------------------- KillerTic · 2023-10-31 11:09 I am not sure I 100% understand your question to be honest. So you have a NAS and want to mount a picture directory into a container, right? I am doing that via NFS shares. A bit of nightmare to get the permissions to work, but this is at least what I do. ---------------------------------------------------------------------- _nix-addict · 2023-10-31 11:12 You need to mount your NAS share to your "worker" Linux computer and then point whatever container that is running on your "worker" to the network mounted share. ---------------------------------------------------------------------- cyl3el2cleal2 · 2023-10-31 11:55 I will try swarm mode. K8S is too heavy. Portainer is a great tool but I need to ssh for mounting drive every time I want to use NFS. ---------------------------------------------------------------------- jkirkcaldy · 2023-10-31 12:03 I think you have a fundamental misunderstanding of what you are trying to achieve. And are over complicating things which is confusing everyone. It would help greatly if you could give some indication of what containers you actually want to use. From the sounds of it you want a file server which is your nas. Then you want to run an application in a docker container on your Linux machine. Using Plex as an example, you would mount your Plex directories on your Linux server via NFS, then start the Plex container pointing at the mounted directory on the Linux server. Nothing would run on your nas apart from the nfs file server. The image you linked looks a bit more like a distributed worker. I use something similar where one server runs the core services and then I run specific workers on multiple other machines to distribute and increase the processing power. I don’t believe this is what you want to do as if it was, you would probably know it. ---------------------------------------------------------------------- Interesting_Ad_5676 · 2023-10-31 12:04 Do you would like to use Linux system as docker host and you want to have storage exposed by NAS for this docker host ? If that is the intent of your question, yes it can be done. Expose nas storage over nfs. Mount the nfs in Linux. Refer the mount point directory as docker storage in docker-compose file. That's it. No big fuss. You can even soft link /var/docker directory to your nfs share, if required. ---------------------------------------------------------------------- cyl3el2cleal2 · 2023-10-31 12:14 I need a solution that’ll handling mounting volume on worker, manage permissions, monitoring worker machines, logging, add/edit worker(nice to have) Portainer can do 60/100 I guess. ---------------------------------------------------------------------- heehoX · 2023-10-31 12:18 You don't have to SSH everytime. You can just add the NFS share to your fstab and it will automatically mount when you boot your machine. ---------------------------------------------------------------------- flaming_m0e · 2023-10-31 12:51 >but I need to ssh for mounting drive every time I want to use NFS. Wut? ---------------------------------------------------------------------- Eirikr70 · 2023-10-31 13:41 I would rather call it a three tier architecture. ---------------------------------------------------------------------- tech2but1 · 2023-10-31 14:55 OP hasn't found ```/etc/fstab``` yet. ---------------------------------------------------------------------- tech2but1 · 2023-10-31 14:56 Like a wedding cake? ---------------------------------------------------------------------- Eirikr70 · 2023-10-31 15:26 Exactly ! ---------------------------------------------------------------------- phein4242 · 2023-10-31 16:23 http://www.catb.org/~esr/faqs/smart-questions.html ---------------------------------------------------------------------- cyl3el2cleal2 · 2023-10-31 21:02 I know what’s going to make it happen with manually configuring. But do you tools that are invented for this situation? Thank you ---------------------------------------------------------------------- _nix-addict · 2023-10-31 22:13 There are plenty of tools to orchestrate this kind of deployment but setting any of them up is likely to be non-trivial. Unless you are doing this at scale and need to repeat the action 'n' times I would not bother to automate this. Any sufficiently sophisticated imperative/declarative IaC tool should be able to achieve this state. ---------------------------------------------------------------------- cyl3el2cleal2 · 2023-11-01 08:03 I know exactly what you said about the basics. but I looking for tools or something that well handles this situation on a centralization side. ---------------------------------------------------------------------- sebastianelisa · 2023-11-01 09:40 I don't think that exists. You'll still need to create the storage on the NAS and the containers on your server. Even if you let's say can Install portainer on the NAS and use the Docker installation on the server you'll still have two interfaces ---------------------------------------------------------------------- cyl3el2cleal2 · 2023-11-01 12:51 Okay I could be a good open source project. 🫣