Ns8 on raspberry pi 4?

,

I have tried installing and this is the error i am geting.

I am using rocky linux on arm.

let me destroy and rebuild the server, and see if i will be getting the same error,
could be because of the numerouse configs i tried to get ns8 working on Arm

[rocky@mygen ~]$ sudo bash install.sh ghcr.io/tbaile/core:main
Checking port 80 and 443 are not already in use
Restart journald:
Install dependencies:
NS8 Rocky Linux 9 - BaseOS                      0.0  B/s |   0  B     00:08
Errors during downloading metadata for repository 'ns-baseos':
  - Status code: 404 for https://u4.nethesis.it/mirrorlist?arch=aarch64&repo=BaseOS-9 (IP: 209.38.224.41)
Error: Failed to download metadata for repo 'ns-baseos': Cannot prepare internal mirrorlist: Status code: 404 for https://u4.nethesis.it/mirrorlist?arch=aarch64&repo=BaseOS-9 (IP: 209.38.224.41)

After a fresh rocky linux install version 9.1 i am getting the same error.

WHat could be the issue

and now it seems every other update commands i try to run,

i get this error


[rocky@ns8arm-20240113-0716 ~]$ sudo dnf upgrade
NS8 Rocky Linux 9 - BaseOS                              0.0  B/s |   0  B     00:07
Errors during downloading metadata for repository 'ns-baseos':
  - Status code: 404 for https://u4.nethesis.it/mirrorlist?arch=aarch64&repo=BaseOS-9 (IP: 209.38.224.41)
  - Status code: 404 for https://u4.nethesis.it/mirrorlist?arch=aarch64&repo=BaseOS-9&countme=1 (IP: 209.38.224.41)
Error: Failed to download metadata for repo 'ns-baseos': Cannot prepare internal mirrorlist: Status code: 404 for https://u4.nethesis.it/mirrorlist?arch=aarch64&repo=BaseOS-9 (IP: 209.38.224.41)
[rocky@ns8arm-20240113-0716 ~]$

On x86_64 the rocky-el9 repositories are managed (mirrored) by nethserver, but only for x86_64 not aarch64.

So you need to tweak the install script on rocky-el9 a bit at line 59 so this does not happen.

59     if [[ "${ID}" == rocky ]]; then
60         print_ns_yum_config > /etc/yum.repos.d/nethserver.repo
61         dnf config-manager --save --set-disabled appstream baseos extras
62         rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
63     fi

If you continue with the current installation you probably need to enable the original repo’s and disable nethserver mirrors (out the top of my head) :

dnf config-manager --save --set-enabled appstream baseos
dnf config-manager --save --set-disabled ns-appstream ns-baseos
dnf update

BTW in my short experience it seems to be preferred to run the install.sh script as root (sudo su) instead of with root privileges (sudo install.sh … )

1 Like

Things can be changed if you help us with your …ARM :face_with_hand_over_mouth:

  • The host u4 could mirror arm repos too, or
  • We can patch the install.sh script

We can patch the install.sh script to check for EUID and PATH sanity.

1 Like

sure thing.

I have shared the server ip as well as private SSH key assigned

I’m sorry there is a misunderstanding. I wasn’t asking for an ARM device access, but an “arm” the part of the body the hand is attached to :smiley:

In Italy there is an idiom “tendere una mano e prendersi anche il braccio”, when you lend someone an hand and then he takes also the arm.

I hope Tommaso will speak of ARM development at Fosdem meeting: I’ll try to record the talk for who can’t come.

2 Likes

Kind of decided to never touch arm on EL again, especially now NS8 runs on Debian too. Though have to admit @rocky_altach-sig does provide the minimal tooling in their repo by now such as en device-tree compiler, uboot and other early boot binaries; Epel > 7 finally got a gcc-cross compiler.

So you got me already looking in to that. :slight_smile:

NS8-core does not have special requirements regarding software provided by the distro, can’t be that difficult. the core itself seems to be python in it’s own virtual environment (venv) and golang which has cross-compiling build in.

The issue with EL, or to be precise with DNF/YUM, is it does not handle foreign architects very well. This means you always need to create an image, isso or what ever on the (emulated) target arch.

And here Debian shows its strength and heritage as a multi-arch distro. It’s not hard to apt install whatever arch in to a chrooted environment. You can do pretty much with tools like debootstrap and qemu-user-static on a foreign arch without full emulation.

2 Likes

so mark, youre saying if running ARM, then debian is better?

Not better perse, but development is much easier as it’s more versatile.
Just look at the Debian based distro specific for arm SBC’s Armbian,
it runs on about on everything out there.

However still curious if ns8-core provided by @Tbaile runs on rocky-el9 too. :face_with_monocle:
if you still have the rocky pi running try to tweak the install.sh script for testing by marking out line 59 to 63

59    #  if [[ "${ID}" == rocky ]]; then
60    #     print_ns_yum_config > /etc/yum.repos.d/nethserver.repo
61    #     dnf config-manager --save --set-disabled appstream baseos extras
62    #     rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
63    # fi

then as said before fix the repositories :

dnf config-manager --save --set-enabled appstream baseos
dnf config-manager --save --set-disabled ns-appstream ns-baseos
dnf update

than run the install script again as root, thus after sudo su
And report the result…

NOTE: until now it’s just the ns8-core it not capable doing anything, all installations of modules will likely fail!

EDIT Did not succeed installing it on rockylinux el-9. See below

installation of psutil with pip in the virtual environment for the agents fails, also after installing gcc and python3-devel.

gcc -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=597 -DPy_LIMITED_API=0x03060000 -DPSUTIL_LINUX=1 -I/usr/local/agent/pyenv/include -I/usr/include/python3.11 -c psutil/_psutil_common.c -o build/temp.linux-aarch64-cpython-311/psutil/_psutil_common.o
      psutil/_psutil_common.c:9:10: fatal error: Python.h: No such file or directory
          9 | #include <Python.h>

In the above interesting part is the include locations gcc uses:
-I/usr/local/agent/pyenv/include -I/usr/include/python3.11

gcc looks in de {venv}/include and the systems python3.11
Systems python version on debian is 3.11 on el9 it’s 3.9. hence installing python devel on el9 does not help, the header file Python.h lives in /usr/include/python3.9

1 Like

Try python3.11-devel, our Python is not the default 3.9!

And thanks for trying :+1:

1 Like

Did not occur to me this package would exists, it does!

in a test venv it succsed:

(311) root@el9vm01:/opt/venv/311
# pip install --upgrade psutil
Collecting psutil
  Using cached psutil-5.9.7.tar.gz (498 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: psutil
  Building wheel for psutil (pyproject.toml) ... done
  Created wheel for psutil: filename=psutil-5.9.7-cp311-abi3-linux_aarch64.whl size=286009 sha256=4cf473010a4285b08002e9bc6f60347be7d9a23b3b70bd29269212f1f1e72a21
  Stored in directory: /root/.cache/pip/wheels/8a/e0/cf/0387173bc7d441888e75433d029f2d582ecc243b2f03835bc4
Successfully built psutil
Installing collected packages: psutil
Successfully installed psutil-5.9.7

so will try agian!

1 Like

Success on rocky el9 after installing gcc and python3.11-devel.
patched line 59 of install.sh preventing using ns-mirrors:

ns8-core with 1 (leader) node is up:

kudos @Tbaile and @davidep

5 Likes

Ill re attempt a clean install with the patch applied.

great! Do not forget to install gcc and python3.11-devel before running the install script :wink:

i think for gcc, i got that one, but for python 3-11 that had not

Still very much puzzeld how this works with the the github container repository and ns8,
Most likeky because of lack of my interest (never used docker nor podman)

locally rebuild some ns8 modules on debian aarch64:

and pushed them to (my) ghrc.io/markvnl

NOW: How to utilize them :question: :jigsaw: :thinking: :face_with_spiral_eyes:

1 Like

And YOU are puzzled…? :wink:

Wow thats wonderful

You can set a manual override pointing to your repo using module override.

Generally you can do this (I.E. for samba module):

redis-cli hset cluster/override/modules samba ghcr.io/markvnl/samba:latest

This must be ran before installing the module from the UI, be aware that NS8 won’t download again the image if there’s one already, you must remove it beforehand (from root) using podman image rm <image name>

1 Like

Thinks for the reply!

First attempt failed, it still tried to pull in the x86_64 ghcr.io/nethserver/samba-dc:latest and complains it is amd64 instead of arm64.

Will try again later :slight_smile: