Community discussions

MikroTik App
 
felted67
newbie
Topic Author
Posts: 25
Joined: Sat Mar 16, 2013 5:24 pm

New container project: "mikrotik.upgrade.server" / "mus"

Mon Sep 02, 2024 1:15 pm

Hello everyone,

I just completed a new container-project for Mikrotik-routeros-based devices.
The project's aim is to have all packages needed for updates/upgrade locally without installing a
separate server in the network environment.

Perhaps this one is useful for someone. I use this regularly from the first (stable) running version.
It's a tiny container with the size of about 40 MBytes and for all available docker-enabled architectures.

The images are available here:
https://hub.docker.com/repository/docke ... ade-server

The source-code is available here:
https://github.com/felted67/mikrotik-al ... ade-server

And the complete documentation is available here:
https://github.com/felted67/mikrotik-al ... tation.pdf

At this time there is no external wiki or knowledge-base, this will follow in the near future.

Please test & try it and if there are suggestions, errors or questions, please leave a comment here.
Thanks and have fun !

Regards,

Detlef
 
GiovanniG
Member
Member
Posts: 383
Joined: Sun Nov 15, 2015 4:12 pm

Re: New container project: "mikrotik.upgrade.server" / "mus"

Thu Sep 19, 2024 12:14 am

Hi, thanks for sharing, does it work con CHR? Can I use it to install node.js and Node red? Thank you!
 
felted67
newbie
Topic Author
Posts: 25
Joined: Sat Mar 16, 2013 5:24 pm

Re: New container project: "mikrotik.upgrade.server" / "mus"

Sat Sep 28, 2024 7:28 pm

Well, this project and the regarding container-images run on most mikrotik-installations.
I use it mainly on a CHR-system, because this gives more cpu-power, a lot of ram- and disk-memory.

Also you could install it on a portainer setup with no modifications: https://www.portainer.io/

Perhaps my alp_rc-container gives you the solution for installing node.js and node red, as this image
is only a openrc-distro without any additional packages. But you must install all components for yourself.

The link is here: https://hub.docker.com/repository/docke ... rc/general.

If your setup don't need kernel-cgroups all packages may be installable. It's an alpine linux-distro under the hood.

If you need more information, please ask you questions here.

Regards,

Detlef
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 4006
Joined: Sun May 01, 2016 7:12 pm
Location: California
Contact:

Re: New container project: "mikrotik.upgrade.server" / "mus"

Sat Sep 28, 2024 7:50 pm

Nifty work.

But is there a reason you're not using the Alpine CDN URLs? In Dockerfile,
RUN echo 'https://ftp.halifax.rwth-aachen.de/alpine/v3.20/main/' >> /etc/apk/repositories \
    && echo 'https://ftp.halifax.rwth-aachen.de/alpine/v3.20/community' >> /etc/apk/repositories \
    && apk add --no-cache --update --upgrade su-exec ca-certificates
Perhaps that' quicker from your locale, or maybe there is some fork needed
...but for shared image likely better to some *.alpinelinux.org given all the supply-chain attacks of late.
 
felted67
newbie
Topic Author
Posts: 25
Joined: Sat Mar 16, 2013 5:24 pm

Re: New container project: "mikrotik.upgrade.server" / "mus"

Sat Sep 28, 2024 8:22 pm

Well,

you are right - perhaps someone could setup another mirror there.
I am using the mirror for default, so I put it in there.

On the other hand, this container is expandable while running.
So I am created a alpine-line-openrc_minimal-container, which could
be used for anything you want (and ros-container supports [no cgroups]).

So you could ssh to the container and install additional components, and therefore
I added the repo...

Again it isn't really needed, but may help in further usecases.
And the size of the container(s) is between 32 and 37 MB, so no real need to be spacesaving at all.

Edit: These mirror is one of the main mirrors here in germany for alpine linux. So no real doubt on the reliability there...

Regards,
Detlef
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 4006
Joined: Sun May 01, 2016 7:12 pm
Location: California
Contact:

Re: New container project: "mikrotik.upgrade.server" / "mus"

Sat Sep 28, 2024 11:20 pm

Fair enough, it on the Alpine mirror list (https://mirrors.alpinelinux.org). The docs use "dl-cdn.alpinelinux.org", so the complex DNS name caught me off guard.

Now you violating the core Docker philosophy with openrc (i.e. one container, one thing) ;). But I'm not such a purist. Especially on some lower-end Mikrotik, it's may very be better to run one container with openrc enabling multiple services - since there just isn't same mem/CPU. Plus, the fact RouterOS does not have any orchestration to dealing with needed "compose" things to help with dealing with collection of containers.

Having a working examples of using openrc to deal with "multiple service in one container" problem on Mikrotik is a good thing. So good work here.
 
felted67
newbie
Topic Author
Posts: 25
Joined: Sat Mar 16, 2013 5:24 pm

Re: New container project: "mikrotik.upgrade.server" / "mus"

Mon Sep 30, 2024 2:39 pm

Well, you are damned right - I break the one-process-one-container rule.

But this is intended in this situation. Because of the fairly small size of the images,
and therefore the minimal use of the disk on the mikrotik device, this is no problem at all.

Breaking the "golden rule" is intended, while therefore I can run several jobs in one container.
This gives the ability to access the running container via a running ssh in parallel.

And also - as you mentioned - it gives the ability to run some processes and also parallel a webserver in one container.
The main reason on my side is, that mikrotik's container-solution has no docker-compose function implemented.

So any kind of simple orchestration is not possible, so I do it in the container (simple way).
This is fairly not an orchestration at this point, but is solves my needs.

Building a lot of different containers for mikrotik in the past, this theory runs as I thought of and makes no trouble at all.

Regards,

Detlef
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 3083
Joined: Mon Apr 08, 2019 1:16 am

Re: New container project: "mikrotik.upgrade.server" / "mus"

Mon Sep 30, 2024 4:16 pm

Well maybe storing the packages in the directory for DUDE is enough.
DUDE stores *.npk in "dude-data/files/*.npk" that are used for the upgrade with right button click, in DUDE client on device in Network Map.
DUDE MT router and other MT routers on the same network, but very remote from here.

Who is online

Users browsing this forum: No registered users and 2 guests