mbecker20 / komodo

🦎 a tool to build and deploy software on many servers 🦎
https://komo.do
GNU General Public License v3.0
1.9k stars 34 forks source link

arm64 images #9

Closed C0untZero closed 4 months ago

C0untZero commented 4 months ago

Any plans on adding arm64 support/images?

Looks like a great project, was just about to spin it up on my RPi5, but alas, no arm image available.

slient2010 commented 4 months ago

I think maybe you can compile the code for your platform.

mbecker20 commented 4 months ago

Did you try running the image and it fails? I will definitely like to support ARM but haven't worked with it myself, just need a bit to see what changes are necessary.

C0untZero commented 4 months ago

Did you try running the image and it fails? I will definitely like to support ARM but haven't worked with it myself, just need a bit to see what changes are necessary.

Yeah, I get the following: image image

I think maybe you can compile the code for your platform.

Could be, never done it though and would require some research on my part.

C0untZero commented 4 months ago

Welp, I just spent an hour trying to build this on my RPi, with no luck. Note I don't have experience with building rust/typescript. I've tried using the included vscode workspace and its tasks.json, but can't seem to complete a full client and frontend build to provide for the docker build of Dockerfile in ./bin/core.

@mbecker20 if you don't have an arm device yourself, I'd suggest setting up a github actions build workflow that could be pointed at an arm virtual env. I'd be willing to help with that if you want. Alternatively if you could walk me through the build process on my RPi that could also produce an initial arm image.

mbecker20 commented 4 months ago

Rpi will likely take forever to compile. Monitor supports spawning AWS ec2 instances for building, I can make an builder which spawns an ARM instance type to build it. And maybe Hetzner to test with.

C0untZero commented 4 months ago

That does sound more efficient, yeah. I'll leave you to it then, thanks for your effort. If there's anything I can help with let me know!

mbecker20 commented 4 months ago

Try this for core: https://github.com/mbecker20/monitor/pkgs/container/monitor_core_aarch64. I also added a periphery-aarch64 binary to the release.

I updated the periphery installer to try to detect arm and use the aarch64 binary if thats detected, it works on this hetzner arm box, maybe see if it works on Rpi?

C0untZero commented 4 months ago

That did it - the image ran. However once started all I get of the web interface is a page with this: image Nothing on the page is clickable. No errors in the container logs. Could this be a misconfiguration on my end?

C0untZero commented 4 months ago

Ah, local_auth is false by default, it seems to be working now! I'll have to try adding an arm periphery later, but thanks a lot for the arm image :)

C0untZero commented 4 months ago

I'll reopen and leave a comment once I test an arm periphery setup.

mbecker20 commented 4 months ago

Awesome thanks. Yeah, a couple people have run into empty auth before looking at the config more carefully. I'll also add a note in the UI for that situation.

mbecker20 commented 4 months ago

Screenshot 2024-07-31 at 12 56 05 PM

C0untZero commented 4 months ago

arm periphery also worked like a charm! thanks!

So this is a monitor instance with an RPi5 hosting the core and a periphery instance, and another RPi4 as just a periphery. Does this make sense btw, is this intended use? ie having a periphery instance where core is? image image

mbecker20 commented 4 months ago

Yeah, if I'm running the Core api on a server I will install periphery on the server hosting the core api. Your setup looks good.

In some other setups, Core can also run with a cloud container runner like Aws ECS, in this case there is no server to install periphery on. I leave it up to the user to decide their setup here.

Thanks for checking periphery on RPi!! I'm glad to know it's easy to compile for arm and will include these builds in future releases.

C0untZero commented 4 months ago

No problem, glad to help, thanks for sharing the project. Im looking forward to when you include docker compose, ill most likely fully migrate to monitor from omv compose. If you ever need an rpi test bed feel free to msg me.