summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2023-03-13 07:35:07 -0400
committerGitHub <noreply@github.com>2023-03-13 07:35:07 -0400
commitcd8c7a26b6dbbbc3da6b603e0c6e2c50439ff598 (patch)
tree222c9e8fe94d613239da9c0eb9f040b65d57a9af /packaging
parentbb3cbfcb41505b3cd77abccdecfe548f8ebd0f7f (diff)
Add Amazon Linux 2 to CI and platform support. (#14599)
* Add Amazon Linux 2 to CI and platform support. * Fix conditional in repoconfig spec file. * Fix package testing script. * Add support to kickstart.sh. * Fix pkg-test.sh typo. * Fix CI support package handling. * Make updater log to stderr if running under CI. * Fix broken sed expressions in installer. * Fix updater CI check WRT auto-update checking. * Update .github/scripts/pkg-test.sh Co-authored-by: Tasos Katsoulas <12612986+tkatsoulas@users.noreply.github.com> * Clean up package testing code. * Fix filename matching for package testing. --------- Co-authored-by: Tasos Katsoulas <12612986+tkatsoulas@users.noreply.github.com>
Diffstat (limited to 'packaging')
-rw-r--r--packaging/PLATFORM_SUPPORT.md15
-rwxr-xr-xpackaging/installer/kickstart.sh23
-rwxr-xr-xpackaging/installer/netdata-updater.sh4
-rw-r--r--packaging/repoconfig/netdata-edge.repo.al21
-rw-r--r--packaging/repoconfig/netdata-repo.spec8
-rw-r--r--packaging/repoconfig/netdata.repo.al21
6 files changed, 80 insertions, 12 deletions
diff --git a/packaging/PLATFORM_SUPPORT.md b/packaging/PLATFORM_SUPPORT.md
index cfbad4cb40..8d1b282c3d 100644
--- a/packaging/PLATFORM_SUPPORT.md
+++ b/packaging/PLATFORM_SUPPORT.md
@@ -88,13 +88,14 @@ platforms that we officially support ourselves to the intermediate tier. Our [st
expected to work on these platforms if available. Source-based installs are expected to work on these platforms
with minimal user effort.
-| Platform | Version | Official Native Packages | Notes |
-|---------------|---------|--------------------------|-------------------------------------------------------------------------|
-| Alpine Linux | 3.16 | No | |
-| Alpine Linux | 3.15 | No | |
-| Alpine Linux | 3.14 | No | |
-| Arch Linux | Latest | No | We officially recommend the community packages available for Arch Linux |
-| Manjaro Linux | Latest | No | We officially recommend the community packages available for Arch Linux |
+| Platform | Version | Official Native Packages | Notes |
+|---------------|---------|--------------------------|------------------------------------------------------------------------------------------------------|
+| Alpine Linux | 3.16 | No | |
+| Alpine Linux | 3.15 | No | |
+| Alpine Linux | 3.14 | No | |
+| Amazon Linux | 2 | x86\_64, AArch64 | Scheduled for promotion to Core tier at some point after the release of v1.39.0 of the Netdata Agent |
+| Arch Linux | Latest | No | We officially recommend the community packages available for Arch Linux |
+| Manjaro Linux | Latest | No | We officially recommend the community packages available for Arch Linux |
### Community
diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh
index 9c25ad98e5..88319a26a3 100755
--- a/packaging/installer/kickstart.sh
+++ b/packaging/installer/kickstart.sh
@@ -667,7 +667,7 @@ get_system_info() {
warning "Distribution auto-detection overridden by user. This is not guaranteed to work, and is not officially supported."
fi
- supported_compat_names="debian ubuntu centos fedora opensuse ol arch"
+ supported_compat_names="debian ubuntu centos fedora opensuse ol amzn arch"
if str_in_list "${DISTRO}" "${supported_compat_names}"; then
DISTRO_COMPAT_NAME="${DISTRO}"
@@ -1269,7 +1269,7 @@ pkg_installed() {
dpkg-query --show --showformat '${Status}' "${1}" 2>&1 | cut -f 1 -d ' ' | grep -q '^install$'
return $?
;;
- centos|fedora|opensuse|ol)
+ centos|fedora|opensuse|ol|amzn)
rpm -q "${1}" > /dev/null 2>&1
return $?
;;
@@ -1313,7 +1313,7 @@ netdata_avail_check() {
env DEBIAN_FRONTEND=noninteractive apt-cache policy netdata | grep -q repo.netdata.cloud/repos/;
return $?
;;
- centos|fedora|ol)
+ centos|fedora|ol|amzn)
# shellcheck disable=SC2086
${pm_cmd} search --nogpgcheck -v netdata | grep -qE 'Repo *: netdata(-edge)?$'
return $?
@@ -1482,6 +1482,23 @@ try_package_install() {
INSTALL_TYPE="binpkg-rpm"
NATIVE_VERSION="${INSTALL_VERSION:+"-${INSTALL_VERSION}.${SYSARCH}"}"
;;
+ amzn)
+ if command -v dnf > /dev/null; then
+ pm_cmd="dnf"
+ repo_subcmd="makecache"
+ else
+ pm_cmd="yum"
+ fi
+ repo_prefix="amazonlinux/${SYSVERSION}"
+ pkg_type="rpm"
+ pkg_suffix=".noarch"
+ pkg_vsep="-"
+ pkg_install_opts="${interactive_opts}"
+ repo_update_opts="${interactive_opts}"
+ uninstall_subcmd="remove"
+ INSTALL_TYPE="binpkg-rpm"
+ NATIVE_VERSION="${INSTALL_VERSION:+"-${INSTALL_VERSION}.${SYSARCH}"}"
+ ;;
*)
warning "We do not provide native packages for ${DISTRO}."
return 2
diff --git a/packaging/installer/netdata-updater.sh b/packaging/installer/netdata-updater.sh
index 7ffa0a2364..66d0a585f5 100755
--- a/packaging/installer/netdata-updater.sh
+++ b/packaging/installer/netdata-updater.sh
@@ -838,8 +838,8 @@ ndtmpdir=
trap cleanup EXIT
-if [ -t 2 ]; then
- # we are running on a terminal
+if [ -t 2 ] || [ "${GITHUB_ACTIONS}" ]; then
+ # we are running on a terminal or under CI
# open fd 3 and send it to stderr
exec 3>&2
else
diff --git a/packaging/repoconfig/netdata-edge.repo.al b/packaging/repoconfig/netdata-edge.repo.al
new file mode 100644
index 0000000000..4a300a26e7
--- /dev/null
+++ b/packaging/repoconfig/netdata-edge.repo.al
@@ -0,0 +1,21 @@
+[netdata-edge]
+name=Netdata Edge
+baseurl=https://repo.netdata.cloud/repos/edge/amazonlinux/$releasever/$basearch
+repo_gpgcheck=1
+gpgcheck=1
+gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key
+enabled=1
+sslverify=1
+sslcacert=/etc/pki/tls/certs/ca-bundle.crt
+priority=50
+
+[netdata-repoconfig]
+name=Netdata Repository Config
+baseurl=https://repo.netdata.cloud/repos/repoconfig/amazonlinux/$releasever/$basearch
+repo_gpgcheck=1
+gpgcheck=1
+gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key
+enabled=1
+sslverify=1
+sslcacert=/etc/pki/tls/certs/ca-bundle.crt
+priority=50
diff --git a/packaging/repoconfig/netdata-repo.spec b/packaging/repoconfig/netdata-repo.spec
index cc53fd8cb4..6139e52bbd 100644
--- a/packaging/repoconfig/netdata-repo.spec
+++ b/packaging/repoconfig/netdata-repo.spec
@@ -16,6 +16,8 @@ Source4: netdata.repo.centos
Source5: netdata-edge.repo.centos
Source6: netdata.repo.ol
Source7: netdata-edge.repo.ol
+Source8: netdata.repo.al
+Source9: netdata-edge.repo.al
BuildArch: noarch
@@ -43,9 +45,15 @@ install -pm 644 %{SOURCE3} ./netdata-edge.repo
%endif
%if 0%{?centos_ver}
+# Amazon Linux 2 looks like CentOS, but with extra macros.
+%if 0%{?amzn2}
+install -pm 644 %{SOURCE8} ./netdata.repo
+install -pm 644 %{SOURCE9} ./netdata-edge.repo
+%else
install -pm 644 %{SOURCE4} ./netdata.repo
install -pm 644 %{SOURCE5} ./netdata-edge.repo
%endif
+%endif
%if 0%{?oraclelinux}
install -pm 644 %{SOURCE6} ./netdata.repo
diff --git a/packaging/repoconfig/netdata.repo.al b/packaging/repoconfig/netdata.repo.al
new file mode 100644
index 0000000000..0bacb3a107
--- /dev/null
+++ b/packaging/repoconfig/netdata.repo.al
@@ -0,0 +1,21 @@
+[netdata]
+name=Netdata
+baseurl=https://repo.netdata.cloud/repos/stable/amazonlinux/$releasever/$basearch
+repo_gpgcheck=1
+gpgcheck=1
+gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key
+enabled=1
+sslverify=1
+sslcacert=/etc/pki/tls/certs/ca-bundle.crt
+priority=50
+
+[netdata-repoconfig]
+name=Netdata Repository Config
+baseurl=https://repo.netdata.cloud/repos/repoconfig/amazonlinux/$releasever/$basearch
+repo_gpgcheck=1
+gpgcheck=1
+gpgkey=https://repo.netdata.cloud/netdatabot.gpg.key
+enabled=1
+sslverify=1
+sslcacert=/etc/pki/tls/certs/ca-bundle.crt
+priority=50