I
I
Interface2022-04-13 20:47:50
Node.js
Interface, 2022-04-13 20:47:50

Application orchestration on a small home server. What can you advise?

Description of the situation:
There is a small home server. (1 physical machine) I want to have several small, small applications on it (node.js, databases, frontend applications, etc.)

At the same time, some of the applications must communicate with each other, have shared resources.

For example, application A can download user files to disk and store them somewhere. Application B can read some of their downloaded files and do some crazy things with them (for example, transcode them with ffmpeg), application C can call application D via rest-api and do something there.

Plus, all these applications (both server and front-end) need to be deployed to the server somehow.

Question: what can be used to somehow organize all this?

You can not use anything at all and do everything in the forehead:
- applications are deployed via scp / rsync / git clone etc.
- when application A starts, it is passed the path in the file system to the shared folder through the environment variable
- the same for application B
- C starts with PORT=4444
- D with something like API_URL=localhost:

4444 very handy mess.

Now all this is partially solved through docker-compose (ports and paths in the FS are configured). But this solution does not cover all issues (it's still not clear how to deploy it all). Plus docker-compose has an incomprehensible status.

There is no real experience with k8s, but it seems that it can solve some of the problems. On the other hand, k8s seems to solve the reverse problem (1 application on many machines, not many applications on one machine). In general, I can not understand how this is an acceptable solution. Can you tell me how reasonable it is to use here?

Plus, k8s is about containers, but it seems to me that containers are not really needed.

What would an ideal solution look like:
- a single place for resource configuration (ports, file system, load balancers, etc.)
- the ability to deploy applications (both front and back)
- minimal monitoring of all this
- an open-source solution
- typing on the application side (so that you can write in typescript ) and the typescript would understand meimport {listenPort} from './config'
- if there would be a convenient UI for all this (eg web UI) it would also be great to have

Is it reasonable to try to use k8s here? Or is it the stretching of an owl on a globe?
If reasonable, what can you advise to use for actually raising k8s? minikube? microk8s?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vyacheslav, 2022-04-13
@Armann

I have the following set of tools in a similar situation:
- containerization - docker
- configuration and launch of containers - docker compose
- web IU to docker - Portainer
- deploy - Gitlab CI

D
Dmitry Shitskov, 2022-04-13
@Zarom

I advise you to do what you like.
Cube orchestration within a single physical server is more of a whim than a necessity. You can only play around to get to know the system. And k8s is most likely just past - wasted resources of one server. minikube, k3s and the like would be the best choice.
To deliver to the cube, you still have to organize the assembly and publication of containers. Enough for delivery and helm.
What would I advise - baremetal with orchestration via Ansible.
As an option - a hypervisor: virtual machines or lxc; Possibly Proxmox. Just in case you need isolation or different OS configurations.

A
Alexander, 2022-04-15
@bagger

Judging by your needs, k3s - Kubernetes for weak servers will do.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question