diff --git a/nessie-image/Dockerfile b/nessie-image/Dockerfile new file mode 100644 index 0000000..7945e15 --- /dev/null +++ b/nessie-image/Dockerfile @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: Apache-2.0 +#!BuildTag: %%IMG_PREFIX%%nessie:%%nessie_version%% +#!BuildTag: %%IMG_PREFIX%%nessie:%%nessie_version%%-%RELEASE% + +ARG SLE_VERSION +FROM registry.suse.com/bci/bci-base:$SLE_VERSION + +# labelprefix=com.suse.application.nessie +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:%%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" +# endlabelprefix + +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..cdb78be --- /dev/null +++ b/nessie/_service @@ -0,0 +1,26 @@ + + + https://github.com/suse-edge/support-tools + git + nessie-v1.0.0 + _auto_ + @PARENT_TAG@ + enable + george.agriogiannis2@suse.com + nessie-v* + nessie-v(\d+\.\d+\.\d+) + \1 + nessie + .git + yes + nessie + + + nessie.obsinfo + + + *.tar + gz + + + diff --git a/nessie/nessie.spec b/nessie/nessie.spec new file mode 100644 index 0000000..c085dda --- /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 + +%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 +%dir %{_docdir}/%{name} +%doc %{_docdir}/%{name}/README.md +%license %{_docdir}/%{name}/LICENSE + +%changelog