@cryptotaxi247 / netdata-1 / commits / cbfc69511

Finish switch to self-hosted RPM repositories. (#14158)

* Update kickstart script to use the new RPM infrastructure. This will preferentially install the new RPM repository configuration packages from the new infrastructure, so that installing native packages on an RPM-based system does not touch PackageCloud at all. * Add documentation about manual setup of RPM repositories. This will be expanded with equivalent info about DEB repositories once we have the new infrastructure set up for those. * Apply suggestions from code review Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud> * Update packaging/installer/methods/packages.md Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>

Austin S. Hemmelgarn committed Dec 21, 2022 at 11:21 UTC cbfc69511f8e4e46aec2f1b98a33a9982d44c2a3
3 files changed +66 -4
packaging/installer/README.md
+4
@@ -80,6 +80,10 @@ operating systems.
80 to="/docs/agent/packaging/installer/methods/kickstart"
81 os="General Linux with one-line installer (recommended)"
82 svg="linux" />
83 + <InstallBox
84 + to="/docs/agent/packaging/installer/methods/packages"
85 + os="Native DEB/RPM packages for Linux"
86 + svg="linux" />
87 <InstallBox
88 to="/docs/agent/packaging/docker"
89 os="Run with Docker"
packaging/installer/kickstart.sh
+15 -4
@@ -28,8 +28,10 @@ KICKSTART_SOURCE="$(
28 PACKAGES_SCRIPT="https://raw.githubusercontent.com/netdata/netdata/master/packaging/installer/install-required-packages.sh"
29 PATH="${PATH}:/usr/local/bin:/usr/local/sbin"
30 PUBLIC_CLOUD_URL="https://app.netdata.cloud"
31 -REPOCONFIG_URL_PREFIX="https://packagecloud.io/netdata/netdata-repoconfig/packages"
32 -REPOCONFIG_VERSION="1-2"
31 +REPOCONFIG_DEB_URL_PREFIX="https://packagecloud.io/netdata/netdata-repoconfig/packages"
32 +REPOCONFIG_DEB_VERSION="1-2"
33 +REPOCONFIG_RPM_URL_PREFIX="https://repo.netdata.cloud/repos/repoconfig"
34 +REPOCONFIG_RPM_VERSION="2-1"
35 START_TIME="$(date +%s)"
36 STATIC_INSTALL_ARCHES="x86_64 armv7l aarch64 ppc64le"
37 TELEMETRY_URL="https://posthog.netdata.cloud/capture/"
@@ -1468,8 +1470,17 @@ try_package_install() {
1470 fi
1471
1472 repoconfig_name="netdata-repo${release}"
1471 - repoconfig_file="${repoconfig_name}${pkg_vsep}${REPOCONFIG_VERSION}${pkg_suffix}.${pkg_type}"
1472 - repoconfig_url="${REPOCONFIG_URL_PREFIX}/${repo_prefix}/${repoconfig_file}/download.${pkg_type}"
1473 +
1474 + case "${pkg_type}" in
1475 + deb)
1476 + repoconfig_file="${repoconfig_name}${pkg_vsep}${REPOCONFIG_DEB_VERSION}${pkg_suffix}.${pkg_type}"
1477 + repoconfig_url="${REPOCONFIG_DEB_URL_PREFIX}/${repo_prefix}/${repoconfig_file}/download.${pkg_type}"
1478 + ;;
1479 + rpm)
1480 + repoconfig_file="${repoconfig_name}${pkg_vsep}${REPOCONFIG_RPM_VERSION}${pkg_suffix}.${pkg_type}"
1481 + repoconfig_url="${REPOCONFIG_RPM_URL_PREFIX}/${repo_prefix}/${SYSARCH}/${repoconfig_file}"
1482 + ;;
1483 + esac
1484
1485 if ! pkg_installed "${repoconfig_name}"; then
1486 progress "Checking for availability of repository configuration package."
packaging/installer/methods/packages.md new
+47
@@ -0,0 +1,47 @@
1 +<!--
2 +title: "Install Netdata using native DEB/RPM packages."
3 +description: "Instructions for how to install Netdata using native DEB or RPM packages."
4 +custom_edit_url: https://github.com/netdata/netdata/edit/master/packaging/installer/methods/packages.md
5 +-->
6 +
7 +# Installing Netdata using native DEB or RPM packages.
8 +
9 +For most common Linux distributions that use either DEB or RPM packages, Netdata provides pre-built native packages
10 +for current releases in-line with our [official platform support policy](/packaging/PLATFORM_SUPPORT.md). These
11 +packages will be used by default when attempting to install on a supported platform using our [kickstart.sh
12 +installer script](/packaging/installer/methods/kickstart.md).
13 +
14 +When using the kickstart script, you can force usage of native DEB or RPM packages by passing the option
15 +`--native-only` when invoking the script. This will cause it to only attempt to use native packages for the install,
16 +and fail if it cannot do so.
17 +
18 +## Manual setup of RPM packages.
19 +
20 +Netdata’s official RPM repositories are hosted at https://repo.netdata.cloud/repos. We provide four groups of
21 +repositories at that top level:
22 +
23 +- `stable`: Contains packages for stable releases of the Netdata Agent.
24 +- `edge`: Contains packages for nightly builds of the Netdata Agent.
25 +- `repoconfig`: Provides packages that set up configuration files for using the other repositories.
26 +- `devel`: Is used for one-off development builds of the Netdata Agent, and can simply be ignored by users.
27 +
28 +Within each top level group of repositories, there are directories for each supported group of distributions:
29 +
30 +- `el`: Is for Red Hat Enterprise Linux and binary compatible distros, such as CentOS, Alma Linux, and Rocky Linux.
31 +- `fedora`: Is for Fedora and binary compatible distros.
32 +- `ol`: Is for Oracle Linux and binary compatible distros.
33 +- `opensuse`: Is for openSUSE and binary compatible distros.
34 +
35 +Under each of those directories is a directory for each supported release of that distribution, and under that a
36 +directory for each supported CPU architecture which contains the actual repository.
37 +
38 +For example, for stable release packages for RHEL 9 on 64-bit x86, the full URL for the repository would be
39 +https://repo.netdata.cloud/repos/stable/el/9/x86\_64/
40 +
41 +Our RPM packages and repository metadata are signed using a GPG key with a user name of ‘Netdatabot’. The
42 +current key fingerprint is `6588FDD7B14721FE7C3115E6F9177B5265F56346`
43 +
44 +If you are explicitly configuring a system to use our repositories, the recommended setup is to download the
45 +appropriate repository configuration package from https://repo.netdata.cloud/repos/repoconfig and install it
46 +directly on the target system using the system package manager. This will ensure any packages needed to use the
47 +repository are also installed, and will help enable a seamless transition if we ever need to change our infrastructure.