Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat]: enable apt repository for raspberrypi os / raspbian #13428

Open
mfinelli opened this issue Jul 24, 2022 · 6 comments
Open

[Feat]: enable apt repository for raspberrypi os / raspbian #13428

mfinelli opened this issue Jul 24, 2022 · 6 comments
Assignees
Labels
area/packaging Packaging and operating systems support feature request New features

Comments

@mfinelli
Copy link

Problem

No response

Description

Following the guide here (https://learn.netdata.cloud/guides/monitor/pi-hole-raspberry-pi) to enable netdata on a raspberry pi it mentions that it will build netdata from source. Since the project already provides compiled binaries for aarch64 and arm7l architectures, and you maintain a debian apt repository, it would be nice if you could create/enable a repository for raspberry pi OS so that we can manage netdata installations using our normal package manager (noting that the official recommendation is to not use netdata packaged by upstream debian)

I'm selecting blocker for importance because I really want to use netdata agent, but not having a way to install it using my package manager is a show stopper for me. I understand of course if this is not a priority for the project as a whole.

Importance

blocker

Value proposition

  1. updates to netdata using standard package manager
  2. not necessary to compile netdata from source
  3. install/uninstall using package apt
  4. can easily add the netdata repository to apt sources.list and run apt install without needing to download/inspect/trust kickstart.sh

Proposed implementation

You already provide debian deb packages and a debian repository, raspberry pi os is based on debian 11 bullseye (or the legacy edition is based on debian 10 buster).

I'm not exactly sure what is required to create a new repository, but I'm hoping that you can extend what's already in place in order to better support raspberry pi os. I'm also happy to help test/debug if it's necessary.

@mfinelli mfinelli added feature request New features needs triage Issues which need to be manually labelled labels Jul 24, 2022
@ilyam8 ilyam8 added the area/packaging Packaging and operating systems support label Jul 25, 2022
@Ferroin
Copy link
Member

Ferroin commented Jul 25, 2022

This is on our list to properly support long-term, but we currently have no ETA for when that may actually happen (at minimum it won’t be before we finish the migration of our package hosting from Package Cloud to self-hosted infrastructure, but we also have no concrete ETA for when that will be done either).

Short-term, there are two options:

  • If you use the kickstart script as outlined in our documentation, you should end up with a static install under /opt instead of needing to build the agent locally, which should sidestep most of the issues related to building locally. If you decide to take this approach, and it still ends up building locally, that’s (probably) a bug, but should be relatively easy for us to fix quickly.
  • While we don’t currently publish packages for Raspberry Pi OS, we do publish Debian packages for ARMv7 and 64-bit ARMv8A. In theory, these should work as-is on current versions Raspberry Pi OS for the equivalent userspace, we just don’t currently have official support for it and haven’t really tested it thoroughly. If you want to try this approach, you can manually download one of our repository config packages (currently from here for stable versions or here for nightlies), install it by hand by passing the package file as an argument to apt install, and then try installing Netdata, though again this is largely untested (we will try to help if you run into issues, but make no guarantees that even with our help it will be possible to get it working properly).

@Ferroin Ferroin removed the needs triage Issues which need to be manually labelled label Jul 25, 2022
@mfinelli
Copy link
Author

The biggest issue with the kickstart script is that it's not easily automate-able. Ideally I want to be able to plugin to my ansible playbook something like

- name: add netdata signing key
  apt_key: url=https://netdata.cloud/...

- name: add netdata repository
  apt_repository:
    repo: deb https://netdata.cloud/....

- name: install netdata
  apt: name=netdata

And then push out a config file if necessary and be done. And then updates are managed as normal using apt (personally, I really don't like auto-updating software though I know that you can pass a flag to the kickstart script).

I may try to install the vanilla debian package and see how it goes. It suffers from some of the same problems being that there's no repo so I can't apt install and need to manually update the deb as necessary, but I can at least point ansible to a .deb so that it's more automated.

Anyway, thanks for responding, good to know that this is at least on your radar even if there's no ETA yet. If I end up trying out the vanilla deb package I'll update here to let you know how it goes. Cheers

@Ferroin
Copy link
Member

Ferroin commented Jul 27, 2022

The biggest issue with the kickstart script is that it's not easily automate-able. Ideally I want to be able to plugin to my ansible playbook...
And then push out a config file if necessary and be done. And then updates are managed as normal using apt (personally, I really don't like auto-updating software though I know that you can pass a flag to the kickstart script).

FWIW, on platforms we publish packages for, if you turn off auto-updates you can, in fact, just use the system package manager after installing with the kickstart script. The script itself is also intended to be safe to run against an existing install (and mostly idempotent as well for that matter), but there’s currently no good way to detect whether it changed anything or not.

I may try to install the vanilla debian package and see how it goes. It suffers from some of the same problems being that there's no repo so I can't apt install and need to manually update the deb as necessary, but I can at least point ansible to a .deb so that it's more automated.

Actually, provided the package works, you should also be able to use the same repository configuration packages we publish for the Debian repositories (those are what I linked in my previous answer). Once you have the appropriate one of those bootstrapped on the target system by downloading it and installing the package directly, it should be possible to just use APT to directly manage installing and updating Netdata, as well as updating the repository configuration package as it changes. Internally, this is actually how the kickstart script handles installing on platforms that we officially publish packages for.

Alternatively, you could also just use the repo and key URLs directly. Currently, for the stable repo, these are https://packagecloud.io/netdata/netdata/debian (for the repository, with the suite name matching the Debian release codename, so bullseye in your case) and https://packagecloud.io/netdata/netdata/gpgkey (for the signing key). The URLs are the same for the nightly repo, but with the netdata/netdata replaced with netdata/netdata-edge. Do note however that both URLs are subject to change some time within the next few months when we finally move off of PackageCloud (there will be an associated announcement in the release notes about this though, so as long as you keep an eye on those you should have advance notice). Info about this can be found in our documentation.

Anyway, thanks for responding, good to know that this is at least on your radar even if there's no ETA yet. If I end up trying out the vanilla deb package I'll update here to let you know how it goes. Cheers

If you can confirm that the regular Debian package actually does work, we can probably add a special case to the kickstart script so that it treats Raspbian and Raspberry Pi OS as if they were Debian so it automatically uses the Debian packages when installing on these systems instead of falling back to the static builds.

@Ferroin
Copy link
Member

Ferroin commented Jan 29, 2023

#14200 is relevant here.

Essentially, our plan for the time being is to try and get the kickstart script to recognize Raspbian and Raspberry Pi OS as Debian systems so that they use the existing Debian repository infrastructure.

@netdata-community-bot
Copy link

This issue has been mentioned on the Netdata Community Forums. There might be relevant details there:

https://community.netdata.cloud/t/v1-28-this-agent-was-built-without-the-dependencies-for-cloud-and-cannot-be-claimed/680/9

@Ferroin
Copy link
Member

Ferroin commented Mar 6, 2023

A quick update here regarding the information I posted previously for attempting to use the existing packages on these platforms:

We’ve recently merged support for overriding the distribution auto-detection code in the kickstart script, so it should be possible now to use the kickstart script to install the existing native packages. The general approach for this consists of adding --distro-override debian:11:bullseye (replacing 11 and bullseye with the correct corresponding Debian release and codename for whichever version of Raspbian or Raspberry Pi OS you are using).

If you actually get this working correctly, please post back here to let us know so we can add an override in the kickstart script to handle this automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/packaging Packaging and operating systems support feature request New features
Projects
None yet
Development

No branches or pull requests

5 participants