Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Moode OS in a systemd Docker container
#1
Hi,

as explained in my introducing post, I managed to create a script to run moode OS in a docker container. 

Based on my bibliography, this has never been proposed before for a series of good reasons (mainly who need that !  and docker is not designed for)

For the moment this script is not multiarch but only designed for armhf because it was initially made for my volumio primo which consists of a Debian buster distribution on an ASUS tinkerboard platform and its Armhf architecture, however I intend to open the script to all available architectures (armhf,arm64 capable of running raspbian bullseyesOS in this case) in a future version.

At the start of the script there was the excellent dev documentation of moode (§4) and the provision of development packages on Cloudsmith, thanks to Tim and the whole team to make this possible and for such an organization.
The next difficulty was to find a way to run a systemd-based OS (Docker is not intended to run a full integrated OS but more to run one app in fresh and clean minified OS) 
This was so difficult that it was not possible to cook a proper dockerhub image for fast deploy via docker compose,  I had to fall back on a good old fashioned bash script for a step by step installation, this method finally has some advantages because it allows to manage options during the install ...
... and at the end to resolve all the conflicts (mainly http ports) between the host system and the virtualized system. This took me so much time plying around  Rolleyes


Here is the github address of the public repo: https://github.com/chourmovs/moode_tinkerboard

  ###   is working
 - UI and artworks without any restriction ( First time it's slow when building library)
 - MPD access to host /mnt/partition
 - playing any codecs tested (flac, AAV, mp3)
 - Wifi, ethernet, bluetooth
 - Radios
 - Equalizer, parametric equalizer  
  
  ###   is not working
  - Camilla DSP
  - you tell me

Feel free to ask comment, help and report, I'm pretty sure it will open plenty of mental option for plenty of people who know why docker is so important in 2023 

Cheers Vincent
Reply
#2
As a teaser, I am currently working on the final settings to offer you a script allowing via Qemu and Docker to run moode on any platform including AMD64, ARM64, X86_64.
Imagine now on which machine in your fleet you will be able to run the MOode multiroom server for example ^^

See you soon Smile
Reply
#3
(09-10-2023, 12:44 PM)chourmovs Wrote: As a teaser, I am currently working on the final settings to offer you a script allowing via Qemu and Docker to run moode on any platform including AMD64, ARM64, X86_64.
Imagine now on which machine in your fleet you will be able to run the MOode multiroom server for example ^^

See you soon Smile

Sounds interesting :-)
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#4
Nice.

I'll be interested to hear (and/or test) what the performance is like. My meager experience with emulating a pi a few years ago was disappointing...but I'm a dilettante so don't take that as definitive!

I had successfully ported earlier releases of moOde to several different non-pi SBCs driving USB DACs. Lack of i2s and/or drivers kept me from trying to accommodate DAC hats.

The ports worked but the process was not something I'd want to support. As well, casual users would be flustered about the pi-specific configuration options offered in the webUI.

Regards,
Kent
Reply
#5
(09-10-2023, 02:27 PM)TheOldPresbyope Wrote: Nice.
I'll be interested to hear (and/or test) what the performance is like. My meager experience with emulating a pi a few years ago was disappointing...but I'm a dilettante so don't take that as definitive!

Thx, it will depend on your host, my experience is very satisfactory with a 6000+ songs database on a asus tinkerboard v1 (Arm7l, emmc , 2 gig ram), basically moode is php + mysql + workers, so a bit of CPU, RAM and I.O. POWER should manage with ease, and Docker is known to be an efficient virtualization tool.

(09-10-2023, 02:27 PM)TheOldPresbyope Wrote: I had successfully ported earlier releases of moOde to several different non-pi SBCs driving USB DACs. Lack of i2s and/or drivers kept me from trying to accommodate DAC hats.

Non pi SBC without proper driver is not the target here, with docker I was able to access efficiently to the i2s driver of my Asus tinkerboard but we can also imagine a moode server with no sound card to serve as a media relay for multiroom for example (Imagine on a 32 gig RAM HPE proliant microserver GEN10 with opteron processor
or on a core i7 mediacenter with proper sound card drivers ^^)

(09-10-2023, 02:27 PM)TheOldPresbyope Wrote: The ports worked but the process was not something I'd want to support. As well, casual users would be flustered about the pi-specific configuration options offered in the webUI.

I agree, this should come with some explanations for the average user, but we could also imagine some bash script alteration of installed php file to hide specific menu and avoid
confusion in menu

Lets look forward  Smile
Reply
#6
@chourmovs 

I get that your target case is different from mine but I'll keep following your progress.

In my case, regarding performance, I should have said explicitly that I was trying to emulate an arm-based Pi on a modestly muscular amd64 host. Meh. 

Porting moOe to other arm-based SBCs was arduous in the old days but it's pretty straightforward now that @bitlab has developed the current package and image build processes. I have a bunch of said SBCs lying around that were used in some project at one time or another (like when I was still mentoring a local high school's robotics club). Granted, most of them have debian images available which minimizes frustrations.

To make the result seamless for Joe User would require surgery on the frontend javascript/html code as well as the backend php. Every time I think about it I pour myself a glass of wine and wait for the thought to pass. Smile

Keep on truckin' (if you're old enough to remember Robert Crumb and his Mr. Goodbar).

Regards,
Kent
Reply
#7
As an update, I realize that implementing an OS with systemd when you also have to manage multiarch virtualization with QEMU presents quite a few difficulties and is in this case quite poorly documented.
The success encountered with my volumio primo (Debian Buster, armhf, tinkerboard) owes a lot to the proximity of the host and the guest in terms of hardware, OS (and even OS generation) and therefore topology ( systemd, cgroup)
What I tested: docker, podman, Qemu Cli. I think podman has some advantages when it comes to managing systemd but for the moment only nginx starts correctly in my guest, the rest is problematic and the management of the network, MPD and mount points - the vital part of my project - not working)
Qemu as mentioned previously by Kent will undoubtedly pose performance problems (without KVM at least)
Link to the work in progress if by chance a linux specialist could advise: https://github.com/chourmovs/moode_debian

cheers

Vincent
Reply


Forum Jump: