Another approach to #selfhosting - this time with quite limited list of functions and more wisdom, I hope.
It is going to be on my trusty Thinkpad x220 with 16 GB and 1 TB ssd, with #Debian and contenerised stack of:
- #Wordpress CMS
- #Moodle #LMS
- Nextcloud AIO
So, obviously, I am writing here to tap some #hivemind wistom, specifically
- What is the least painful way to learn #Docker up to the level I need for this deployment?
- What is the best Moodle LMS image available? I did some research and obviously there is no "official" or "aio" image available. I do not believe I am competent enough to pack my own container, so any and all help would be appreciated.
reshared this
Unus Nemo
in reply to 8Petros [cracking the system for a living] • •@8Petros [cracking the system for a living]
I am sure that you would be competent enough if you get Podman For DevOps . Keep in mind that both Docker and Podman use OCI containers (as do all modern container engines) and a container built with podman would work on either engine. Also because podman was developed to be very docker compatible, anything you have already learned to do with docker is still applicable.
I would also suggest that you build a separate container per service, you are running all the services on one machine with no need for Kubernetes (k8s) and will not worry about distributing your services so you could put all the containers in one pod, which is actually a kubernetes term and not podman, a pod is the smallest unit that can be deployed on a kubernete distributed system (th
... Show more...@8Petros [cracking the system for a living]
I am sure that you would be competent enough if you get Podman For DevOps . Keep in mind that both Docker and Podman use OCI containers (as do all modern container engines) and a container built with podman would work on either engine. Also because podman was developed to be very docker compatible, anything you have already learned to do with docker is still applicable.
I would also suggest that you build a separate container per service, you are running all the services on one machine with no need for Kubernetes (k8s) and will not worry about distributing your services so you could put all the containers in one pod, which is actually a kubernetes term and not podman, a pod is the smallest unit that can be deployed on a kubernete distributed system (though in this case it would not be being deployed by kubernetes, just your container engine), in order use IPC if required. For instance performance between your db (Maria or Postresql) and php-fpm typically do better with socket than tcp/ip. Not to mention that putting them in a pod would simplify starting and stopping the services. Though after you have the services in a container you can play around and see what performs best for you. The biggest reason to use separate containers is because containers are immutable. To make changes to the container you have to rebuild it from the ground up. So it makes sense to keep the build as simple as possible. Putting all the services in one container would be far more complicated and likely create more layers. It would also be much more work to make adjustments. You would definitely do that type of build with
buildahrather than just using a Containerfile (Dockerfile).See if you cannot at least double the RAM in that system, it will help significantly. Especially if you do anything with tmpfs. Your system uses DDR3 and I was able to get 16gb DIMMs for one of my older laptops. Though the price for 16gb v 8gb is insane. I had to pay $80.00 USD a module vs the $16.00 USD for 8gb.
8Petros [cracking the system for a living] likes this.
8Petros [cracking the system for a living]
in reply to Unus Nemo • •Thanks,
I will certainly check the Podman up.
My need for now is to create something good enough to be used. Down the road I hope to gather some people, includind a tech person to optimize the infrastructure.
I am only setting it up myself, because I have to - my focus and abilities lay in using it to educate, agitate and organize people.
8Petros [cracking the system for a living]
in reply to Unus Nemo • •podman.io/
timorl
in reply to 8Petros [cracking the system for a living] • • •Not an expert, but it doesn’t seem to have any disadvantages over Docker (well, being less popular is a bit of a disadvantage, but I guess not much in this case). Most of the reasons @unusnemo mentions for using this are much more important in the case of much bigger projects, enterprise stuff. The main reason for using containers for you is probably just that it should be much easier to configure and maintain, which is about as good with Docker as with Podman I guess.
The RAM thing should be less of a problem with fewer/no containers too, but I dunno, I hear that they don’t have that much overhead. Wuatek has been running on 8GB of RAM for a long time and it’s only a problem during updates, when the linker wants to hog all the memory (so, Gentoo specific, I know I don’t have to tell you not to run Gentoo though ;D).
Although I might as usual be too fond of rawdogging my hosting straight on bare metal, so there definitely is some bias here.
Unus Nemo
in reply to timorl • •@timorl @8Petros [cracking the system for a living]
The largest advantage of podman over docker is that it is daemonless. It requires no active daemon to work. Both use OCI compliant containers and resources built on one environment can be used interchangeably on the other. Podman also runs in userspace by default where, unless you reconfigure it, docker requires escalated privileges. Other than that they are both well respected and highly used container engines.
My preference for podman comes basically from my preference for Fedora, RHEL and Rocky Linux. Where it is most commonly the default solution. I have used docker on many occasions and just find it to be more effort to get the same amount of work done.
I agree with the baremetal approach. I prefer to host on baremetal. My friendica Instance is hosted on ba
... Show more...@timorl @8Petros [cracking the system for a living]
The largest advantage of podman over docker is that it is daemonless. It requires no active daemon to work. Both use OCI compliant containers and resources built on one environment can be used interchangeably on the other. Podman also runs in userspace by default where, unless you reconfigure it, docker requires escalated privileges. Other than that they are both well respected and highly used container engines.
My preference for podman comes basically from my preference for Fedora, RHEL and Rocky Linux. Where it is most commonly the default solution. I have used docker on many occasions and just find it to be more effort to get the same amount of work done.
I agree with the baremetal approach. I prefer to host on baremetal. My friendica Instance is hosted on baremetal, on Rocky Linux 9. It would likely be more practical to setup the environment on baremetal first, and then move it to containers after the fact. As I have already stated containers are immutable, depending less of whether you use docker or podman, they both use OCI containers. So it would be nice to get your setup optimized before going to the effort to put your services in containers. Which in my opinion on a self hosted install is not important at all unless you have a server setup where you have a good reason to compartmentalize everything. If this project is going to be the main purpose of this machine and it is not going to have a lot of other projects running on it then compartmentalization could be moot and only add complexity that is not required for a single project. With that said, thinking long term, it is probably not a bad idea to go ahead and use containers. It would certainly help in moving the setup the another server in the future and the knowledge gained will definitely be beneficial.
Podman being less popular might be an issue if they were entirely disparate systems. Given that they are very compatible, right down to the commands you use, besides the name of the container engine you are invoking, the differences are moot. What you learn for docker will be useful on podman and vice versa. I personally find podman easier to work with due to its tooling and non daemonized nature. This is particularly true for the case of building containers. And as already stated it makes no difference which engine you use to build the container. After it is built it will be an OCI container that can be used on any OCI container engine. Both projects have worked together at times and both engines use the same registries for images.
timorl likes this.
Unus Nemo
in reply to 8Petros [cracking the system for a living] • •@8Petros [cracking the system for a living] @timorl
They have a lot of information there and depending on your skill level may be adequate to learn what you want. It is the podman development teams official website. The book will have you up and running a lot faster, depends on your priorities.
When it comes to installing podman, if it is not already installed (it is by default on Fedora) just use your Debian repo, it will be there. The community offers a lot of documentation and assistance. Though on Gnu/Linux we tend to follow this chain when installing new software.
MS/Windows users tend to be used to downloading software from the web. This is not a common practice for 'nix environment.
EduNET_LK
in reply to 8Petros [cracking the system for a living] • • •Could you prioritize these three things:
- host the listed web applications on your own
- learn Docker
- least pain
8Petros [cracking the system for a living]
in reply to EduNET_LK • •😀
Unus Nemo likes this.
Unus Nemo
in reply to 8Petros [cracking the system for a living] • •@8Petros [cracking the system for a living] @EduNET_LK
If you setup Moodle on a lamp stack instead of using Nextcloud you may find that containers are not even required for your project at all. Not to say containers are bad. I use them for many projects. Just the project I am using them for are intended to be scalable and run as microservices on a distributed network of servers. I also use them in software development which is another topic.
EduNET_LK
in reply to 8Petros [cracking the system for a living] • • •In that case I propose two projects:
- Project A. Web applications on LAMP
- Project B. Learn Docker
Project A covers target 1, therefore has higher priority and should be tackled first. There are tons of LAMP instructions, from setting up the LAMP platform, installing WordPress, installing Moodle, etc. If you are new to Moodle, your starting point could be docs.moodle.org/en/Installatio… or choose one from docs.moodle.org/en/Category:In…. Either way ask in the Installing help forum on moodle.org.
8Petros [cracking the system for a living]
in reply to EduNET_LK • •I am pretty confident I can install "raw" Wordpress (done many times) and Moodle (thank you for pointing me in the right direction).
The only thing I need to confirm is how to install #Nextcloud #AIO without containers (it is contenerized by default).
OK, more checking is in order. Thank you for now - will publish updates here for sure.
like this
Unus Nemo likes this.
EduNET_LK
in reply to 8Petros [cracking the system for a living] • • •OK. Now we are talking about a whole palette of web applications. One has to look at them individually:
- WordPress and Moodle: We both agree that LAMP is feasible and in case of Moodle, the official method.
- Nextcloud: I did only a few "trial" installations. Then followed the official method, which comes packaged in Docker. Everytime it worked! But don't ask me how to maintain it or debug in case of problems. You don't have to, there's a huge choice, see docs.nextcloud.com/server/stab…
Installation on Linux — Nextcloud latest Administration Manual latest documentation
docs.nextcloud.comUnus Nemo
in reply to 8Petros [cracking the system for a living] • •@8Petros [cracking the system for a living]
What are you going to use Nextcloud for? If you have a lamp then you can install the same web apps on it that you would next cloud. Is there something very specific about Nextcloud that you feel you need?