chrisss404 / check-mk-arm

Checkmk for Raspberry Pi.
182 stars 23 forks source link

Build instructions #65

Open FloTheSysadmin opened 3 months ago

FloTheSysadmin commented 3 months ago

Hi, I know the Project is discontinued, but I would like to try to build it with a new Version. Could you provide me with instruction to build it from the Source code in the repo? Help would be greatly appreciated. Thanks

chrisss404 commented 3 months ago

Hi

Hey Flo,

I would like to try to build it with a new Version

What have you tried so far? What are you struggling with?

Could you provide me with instruction to build it from the Source code in the repo?

Sure. Basically you just have to follow the steps from here: https://github.com/Checkmk/checkmk?tab=readme-ov-file#building-on-your-own-packages

Whenever you run into a platform specific problem, like navicli has no arm support, then you need to find a workaround e.g. exclude the module from the build as it is done with following patch: https://github.com/chrisss404/check-mk-arm?tab=readme-ov-file#remove-module-navicli

You can find all required patches for checkmk 2.2.0 in this repo, however, there might have been changes in the newest version which are unaddressed. Meaning you have to figure out how to get around them yourself.

Good luck & BR Christian

FloTheSysadmin commented 2 months ago

Thank you a lot

FloTheSysadmin commented 2 months ago

I've been trying for like three days now, but I cant do it. I have tried tu build the latest checkMK version "clean" (without the patches) and it still fails. I have tried three ubuntu version in a vm but It always fails at

"/root/.cache/bazel/_bazel_root/8f662310c8318904e664eac3c24d5987/external/redis/BUILD.bazel:15:8 Executing genrule @@redis//:build failed: (Exit 1): linux-sandbox failed: error executing Genrule command"

If you use docker could you be so kind and provide me with the Dockerfile or the build Instructions that you used , since there seems to be almost no documentation on building checkMK from source.

Thank you

~Flo

chrisss404 commented 2 months ago

If you use docker could you be so kind and provide me with the Dockerfile or the build Instructions that you used , since there seems to be almost no documentation on building checkMK from source.

I didn't, I always built it directly on the Pi using the bash script you can find in this repository.

However, Martin (@martux69) did, you can find his setup for Checkmk 2.2.0 here: https://github.com/chrisss404/check-mk-arm/tree/2.2.0 / Dockerfile. I don't know its current state, but maybe there is something in there that can help you.

FloTheSysadmin commented 2 months ago

Thank you for your help. I will try this.

martux69 commented 2 months ago

I added my last working dockerfiles for building checkmk-2.2 for bookworm and jammy 64bit and also the patches for it. The patches zip also include the build script I used for building the deb.

FloTheSysadmin commented 2 months ago

I added my last working dockerfiles for building checkmk-2.2 for bookworm and jammy 64bit and also the patches for it. The patches zip also include the build script I used for building the deb.

Thank you

FloTheSysadmin commented 1 month ago

@martux69 How do you actually use the dockerfile? I tried "docker build" on the bookworm & Jammy files, and then ran the image, but it always fails. Is there any specidal preparation that needs to be done ? The baszel executable was already in Place. Coud you give me a short instruction on how you did it in the past? Thank you.

martux69 commented 1 month ago

@FloTheSysadmin After docker build I ran it with this command (eg. for bookworm): podman run -ti -v /opt/build-checkmk/debs:/opt/build-mk/debs -v /opt/build-checkmk/bookworm-2.2/root:/root -v /opt/build-checkmk/patches:/opt/build-mk/patches 3bc7d266b7a6

yennor commented 1 month ago

@FloTheSysadmin If you manage to build it, could you tell here so? and maybe write down the steps you've taken? I've utterly failed myself a few weeks ago...

FloTheSysadmin commented 1 month ago

@FloTheSysadmin If you manage to build it, could you tell here so? and maybe write down the steps you've taken? I've utterly failed myself a few weeks ago...

Hi, I have forked the project to work on tinkering with the patches. I will document the build instructions. If you need the latest (as of now) 2.2.0 version for aarch64 look into the releases of my fork.

yennor commented 1 month ago

@FloTheSysadmin Thanks a lot. worked like a charm. I used this as an opportunity to update to bookworm ;-).

FloTheSysadmin commented 1 month ago

@FloTheSysadmin Thanks a lot. worked like a charm. I used this as an opportunity to update to bookworm ;-).

@yennor Hi, glad it was of use to you :)