e6f08a933e
Add upstream stable helm charts for Elastic log monitoring: components: elasticsearch, filebeat, metricbeat, logstash, kibana. This enables build of monitor-helm which contains the helm charts required for the stx-monitor application. A Kibana patch is required for the Helm/Tiller issue with the checksum handling. The Elastic 7.x Apache 2.0 Licensed ("oss") images are included. These helm charts are included when performing: build-pkgs monitor-helm and requires stx-config: build-pkgs stx-monitor-helm build-helm-charts.sh --app stx-monitor Change-Id: Ic9a5b909dfbf60e39f98f3f14fe9bbac2de1d42b Depends-On: Id6e1180f2c4d6b736aaedd73430d0696ae9d0744 Story: 2005733 Task: 33413 Co-Authored-By: Kevin Smith <kevin.smith@windriver.com> Signed-off-by: John Kung <john.kung@windriver.com>
81 lines
1.9 KiB
RPMSpec
81 lines
1.9 KiB
RPMSpec
%global sha 92b6289ae93816717a8453cfe62bad51cbdb8ad0
|
|
%global helm_folder /usr/lib/helm
|
|
%global helmchart_version 0.1.0
|
|
%global _default_patch_flags --no-backup-if-mismatch --prefix=/tmp/junk
|
|
|
|
Summary: Monitor-Helm charts
|
|
Name: monitor-helm
|
|
Version: 1.0
|
|
Release: %{tis_patch_ver}%{?_tis_dist}
|
|
License: Apache-2.0
|
|
Group: base
|
|
Packager: Wind River <info@windriver.com>
|
|
URL: https://github.com/helm/charts/
|
|
|
|
Source0: helm-charts-%{sha}.tar.gz
|
|
Source1: repositories.yaml
|
|
Source2: index.yaml
|
|
|
|
BuildArch: noarch
|
|
|
|
Patch01: 0001-Add-Makefile-for-helm-charts.patch
|
|
Patch02: 0002-kibana-workaround-checksum-for-configmap.yaml.patch
|
|
Patch03: 0003-helm-chart-changes-for-stx-monitor.patch
|
|
|
|
BuildRequires: helm
|
|
|
|
%description
|
|
Monitor Helm charts
|
|
|
|
%prep
|
|
%setup -n helm-charts
|
|
%patch01 -p1
|
|
%patch02 -p1
|
|
%patch03 -p1
|
|
|
|
%build
|
|
# initialize helm and build the toolkit
|
|
# helm init --client-only does not work if there is no networking
|
|
# The following commands do essentially the same as: helm init
|
|
%define helm_home %{getenv:HOME}/.helm
|
|
mkdir %{helm_home}
|
|
mkdir %{helm_home}/repository
|
|
mkdir %{helm_home}/repository/cache
|
|
mkdir %{helm_home}/repository/local
|
|
mkdir %{helm_home}/plugins
|
|
mkdir %{helm_home}/starters
|
|
mkdir %{helm_home}/cache
|
|
mkdir %{helm_home}/cache/archive
|
|
|
|
# Stage a repository file that only has a local repo
|
|
cp %{SOURCE1} %{helm_home}/repository/repositories.yaml
|
|
|
|
# Stage a local repo index that can be updated by the build
|
|
cp %{SOURCE2} %{helm_home}/repository/local/index.yaml
|
|
|
|
# Host a server for the charts
|
|
helm serve --repo-path . &
|
|
helm repo rm local
|
|
helm repo add local http://localhost:8879/charts
|
|
|
|
# Create the tgz files
|
|
cd stable
|
|
make elasticsearch
|
|
make filebeat
|
|
make metricbeat
|
|
make kube-state-metrics
|
|
make kibana
|
|
make nginx-ingress
|
|
make logstash
|
|
|
|
# terminate helm server (the last backgrounded task)
|
|
kill %1
|
|
|
|
%install
|
|
install -d -m 755 ${RPM_BUILD_ROOT}%{helm_folder}
|
|
install -p -D -m 755 stable/*.tgz ${RPM_BUILD_ROOT}%{helm_folder}
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%{helm_folder}/*
|