From 3cfed64cdb5ad9df39f3506e0bddf60d96a36ada1e17208a4ba440873e1a8254 Mon Sep 17 00:00:00 2001 From: George Date: Wed, 20 Aug 2025 11:56:42 +0200 Subject: [PATCH] Adding nessie to factory --- nessie-image/Dockerfile | 28 +++++++++++++++ nessie-image/_service | 19 ++++++++++ nessie/_service | 19 ++++++++++ nessie/nessie.spec | 80 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 146 insertions(+) create mode 100644 nessie-image/Dockerfile create mode 100644 nessie-image/_service create mode 100644 nessie/_service create mode 100644 nessie/nessie.spec diff --git a/nessie-image/Dockerfile b/nessie-image/Dockerfile new file mode 100644 index 0000000..f39f6b1 --- /dev/null +++ b/nessie-image/Dockerfile @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: Apache-2.0 +#!BuildTag: %%IMG_PREFIX%%nessie:v%%nessie_version%% +#!BuildTag: %%IMG_PREFIX%%nessie:v%%nessie_version%%-%RELEASE% + +FROM registry.suse.com/bci/bci-base:15.7 + +LABEL org.opencontainers.image.title="nessie" +LABEL org.opencontainers.image.description="Nessie diagnostic tool for SUSE Kubernetes environments" +LABEL org.opencontainers.image.version="%%nessie_version%%" +LABEL org.opencontainers.image.authors="George Agriogiannis " +LABEL org.opencontainers.image.url="https://github.com/suse-edge/support-tools/tree/main/nessie" +LABEL org.opencontainers.image.vendor="SUSE LLC" +LABEL org.opencontainers.image.created="%BUILDTIME%" +LABEL org.opensuse.reference="%%IMG_REPO%%/%%IMG_PREFIX%%nessie:v%%nessie_version%%-%RELEASE%" +LABEL org.openbuildservice.disturl="%DISTURL%" +LABEL com.suse.supportlevel="%%SUPPORT_LEVEL%%" +LABEL com.suse.eula="SUSE Combined EULA February 2024" +LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle" +LABEL com.suse.image-type="application" +LABEL com.suse.release-stage="released" + +RUN zypper --non-interactive refresh && \ + zypper --non-interactive install --no-recommends nessie && \ + zypper clean + +WORKDIR /tmp + +ENTRYPOINT ["/usr/bin/nessie"] diff --git a/nessie-image/_service b/nessie-image/_service new file mode 100644 index 0000000..ea862e3 --- /dev/null +++ b/nessie-image/_service @@ -0,0 +1,19 @@ + + + + + Dockerfile + %%nessie_version%% + nessie + patch + + + Dockerfile + IMG_PREFIX=$(rpm --macros=/root/.rpmmacros -E %{?img_prefix}) + IMG_PREFIX + IMG_REPO=$(rpm --macros=/root/.rpmmacros -E %img_repo) + IMG_REPO + SUPPORT_LEVEL=$(rpm --macros=/root/.rpmmacros -E %support_level) + SUPPORT_LEVEL + + diff --git a/nessie/_service b/nessie/_service new file mode 100644 index 0000000..a4becf3 --- /dev/null +++ b/nessie/_service @@ -0,0 +1,19 @@ + + + https://github.com/suse-edge/support-tools + git + nessie-v1.0.0 + nessie + .git + enable + 1.0.0 + nessie + + + nessie.obsinfo + + + *.tar + gz + + diff --git a/nessie/nessie.spec b/nessie/nessie.spec new file mode 100644 index 0000000..ce1708f --- /dev/null +++ b/nessie/nessie.spec @@ -0,0 +1,80 @@ +# +# spec file for package nessie +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + +Name: nessie +# Version will be set automatically by factory's set_version service +Version: 1.0.0 +Release: 0 +Summary: Node Environment Support Script for Inspection and Export +License: Apache-2.0 +Group: System/Management +URL: https://github.com/suse-edge/support-tools/tree/main/nessie +Source0: %{name}-%{version}.tar.gz +BuildArch: noarch + +# Build dependencies +BuildRequires: python3-devel + +# Runtime dependencies +Requires: python3 +Requires: python3-kubernetes +Requires: python3-PyYAML +Requires: helm +Requires: systemd + +# Optional dependencies for enhanced functionality +Recommends: util-linux +Recommends: kubernetes1.29-client + +%description +Nessie (Node Environment Support Script for Inspection and Export) is a +comprehensive diagnostic tool for SUSE Kubernetes environments. It collects +logs, configurations, and system information from Kubernetes clusters for +troubleshooting and support purposes. + +Key features: +- Collects system service logs and Kubernetes pod logs +- Gathers cluster configurations and Helm releases +- Retrieves node metrics and component versions +- Supports RKE2 and K3s environments +- Fault-tolerant with configurable options +- Can be run directly or as a container + +The tool is designed specifically for SUSE Edge environments and integrates +well with SUSE Linux Micro, RKE2, and K3s distributions. + +%prep +%autosetup + +%build +# Validate Python syntax +python3 -m py_compile nessie.py + +%install +# Install the main script +install -D -m 0755 nessie.py %{buildroot}%{_bindir}/nessie + +# Install documentation files +install -D -m 0644 README.md %{buildroot}%{_docdir}/%{name}/README.md +install -D -m 0644 LICENSE %{buildroot}%{_docdir}/%{name}/LICENSE + +%files +%{_bindir}/nessie +%doc %{_docdir}/%{name}/README.md +%license %{_docdir}/%{name}/LICENSE + +%changelog -- 2.49.0